qase-tms/qase-python

Qase ID Decorator Not Picking up Test Function

Closed this issue · 1 comments

Hi!

I'm evaluating the Qase tool on some existing tests I have in our software product. I'm simply looking to send test results from pytest into Qase. I'm using the Demo project, and trying to send a test function's result into a case tagged as DEMO-12. I've decorated the function with @qase.id(12), and am running with the following command:

pytest --qase --qase-api-token=<TOKEN> --qase-project=DEMO --qase-new-run --qase-debug

of course, I've replaced the real token with <TOKEN>.

The tests run properly, but the Qase debug output reports that the test I've marked up does not have a Qase id (it's listed under This tests does not have test case ids).

It's very possible that I've configured something improperly. Is this the case?

The other potential issue is that although I'm using pytest to execute the tests (and use the Qase plugin), they're defined using the python unittest library (And are defined under a TestCase object that inherits from unittest.TestCase object). Are tests of this type not supported by the plugin?

Thank you!

Want to circle back here. It turns out that I had tagged both the TestCase class and the function with the same qase.id number. When I saw in the readme.md that test functions could be decorated with qase.id calls with multiple parameters, I assumed this relationship was many-to-many, but it appears that it is many-to-one and each unique number can only be assigned once. I think a little more detail in the documentation would help here.

Thank you!