Forum Discussion
Hi AlexGnu
As per this Open issue: https://github.com/gradle/gradle/issues/1330 Gradle does not support JUnit listeners, so you cannot use this method with gradle.
However in my project I was able to workaround that, using the created JUnit XML reports during build, and upload them to Zephyr using the JUnit XML API in an <Exec> type gradle task to run a command line running a py script.
This py script uploads multiple XML files to Zephyr, editing them so that when the test cases are automatically created (if they don't exist) their name will include just the test method name, without the full package and class names, making it more readable in Zephyr.
Just change the script locally to point to the right xml files folder.
The script can be found here: https://gist.github.com/yyahav/c5f7791bd3bb9ec9148ebbdf9aeb5914/raw/57547823a565b45cf7a137e5531cabb0...
You probably already have an API token, if not you need to create one. Create here: https://support.smartbear.com/zephyr-scale-cloud/docs/rest-api/generating-api-access-tokens.html The token should be passed as a '--token <tokenId>' to the script.
Related Content
- 4 years ago
- 10 months ago
- 3 years ago
Recent Discussions
- 10 days ago