allure-framework / allure-kotlin

Allure integrations for test frameworks targeting Kotlin and Java with 1.6 source compatibility.
Apache License 2.0
56 stars 21 forks source link

Ktor server and client listeners #80

Open jmflaherty opened 1 year ago

jmflaherty commented 1 year ago

[//]: # ( . Note: for support questions, please use Stackoverflow or Gitter. . This repository's issues are reserved for feature requests and bug reports. . . In case of any problems with Allure Jenkins plugin please use the following repository . to create an issue: https://github.com/jenkinsci/allure-plugin/issues . . Make sure you have a clear name for your issue. The name should start with a capital . letter and no dot is required in the end of the sentence. An example of good issue names: . . - The report is broken in IE11 . - Add an ability to disable default plugins . - Support emoji in test descriptions )

I'm submitting a ...

What is the current behavior?

Allure only reports stacktrace errors and failed assertions by not having a listener to plug into either Ktor server or client.

If the current behavior is a bug, please provide the steps to reproduce and if possible a minimal demo of the problem

n/a

What is the expected behavior?

Having Ktor plug-ins for both server and client to log traffic and embed it into reports generated by Allure.

What is the motivation / use case for changing the behavior?

Tools like Rest Assured are OK for simpler projects, but they lack flexibility and performance. As an alternative, OkHttp and Retrofit are used. But Ktor is increasingly popular as the default Kotlin way of handling network traffic, providing an even better development experience, maintainability, and performance.

The only thing keeping Ktor from being a useful testing tool is the lack of integration with a reporter.

Please tell us about your environment:

Allure version 2.22.0
Test framework testng@7.8.0 and junit5@5.9.3
Allure integration allure-kotlin-android@2.11.2
Generate report using allure-gradle@2.11.2

Other information

[//]: # ( . e.g. detailed explanation, stacktraces, related issues, suggestions . how to fix, links for us to have more context, eg. Stackoverflow, Gitter etc )