Forum Discussion
Hi gqdabien ,
You can create Junit XML reports using this method: https://docs.pytest.org/en/latest/how-to/output.html#creating-junitxml-format-files
Then use Zephyr test executions - upload JUnit XML API https://support.smartbear.com/zephyr-scale-cloud/api-docs/#tag/Automations/operation/createJUnitExecutions
I created a py script that uploads multiple XML files to Zephyr, after editing them in such a way 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/57547823a565b45cf7a137e5531cabb073d0673c/zephyrUpload.py
You will need to create an API token so you can use it. Create one 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
- 5 years ago
Recent Discussions
- 2 months ago