Skip to content

Question. Is it possible to get 1 "unified" test result for parametrized test? #7498

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
DenKos363 opened this issue Jul 14, 2020 · 3 comments
Labels
type: question general question, might be closed after 2 weeks of inactivity

Comments

@DenKos363
Copy link

DenKos363 commented Jul 14, 2020

Hello guys.

I searched everywhere but didn't find an answer, so would ask you for help here.

I have manual "Test case" in Jira, and automated test in pytest.
With help of hooks, after running automated test, it will send to Jira test result status, like, "pass" or "fail", so the manual test case will get correct status.

Automated test is using parametrization with about 300-1600 test combinations, and "default" hook will change Jira status after EACH parameter, and in the end Jira test will get "last" parametrized result.

My idea is to "collect" each parameter "result" in fixture, and "summ" them, returning "unified" status, and AFTER that - use API for sending this status into Jira. I found this in #230 (comment)

Am I right or there is another way to solve this?

Thank you in advance and will be appreciated for any help and suggestions

@DenKos363 DenKos363 changed the title Qestion. Is it possible to get 1 "unified Qestion. Is it possible to get 1 "unified" test result for parametrized test? Jul 14, 2020
@DenKos363 DenKos363 changed the title Qestion. Is it possible to get 1 "unified" test result for parametrized test? Question. Is it possible to get 1 "unified" test result for parametrized test? Jul 14, 2020
@nicoddemus
Copy link
Member

Hi @DenKos363,

The suggestion in #230 (comment) is how I would implement it if I wanted to stay inside pytest.

But you might consider simpler to postprocess pytest results instead: run pytest normally with --junitxml=tests.xml, then process the generated tests.xml file to aggregate the tests results and post that to Jira.

@nicoddemus nicoddemus added the type: question general question, might be closed after 2 weeks of inactivity label Jul 14, 2020
@DenKos363
Copy link
Author

Hi @nicoddemus I also thought about working with report AFTER running the tests, but wanted to be sure, that there is no easier way to do so right away after test finishing.
Thank you for suggestion!!!

@nicoddemus
Copy link
Member

OK @DenKos363, glad it was helpful!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: question general question, might be closed after 2 weeks of inactivity
Projects
None yet
Development

No branches or pull requests

2 participants