allure-python
allure-python copied to clipboard
Couldn't run parametrize tests from Allure TestOps
I'm submitting a ...
Bug report
What is the current behavior?
When I'm trying to start tests with parametrize fixture from Allure TestOps, pytest couldn't find them in Ci Tests without parametrize are working pretty fine
If the current behavior is a bug, please provide the steps to reproduce and if possible a minimal demo of the problem
Here is example of my test:
@pytest.mark.parametrize('test_case_number', test_data)
@allure.title('{test_case_number} Title of the test')
def test_name_of_the test(self, test_case_number):
allure.dynamic.label('as_id', test_case_number)
pass
When I'm trying to start test I'm getting "no tests ran" from pytest in console
What is the expected behavior?
The same behavior as for the simple tests without parametrize:
@allure.id('my_id')
@allure.title('my_id Title of the test')
def test_name_of_the test(self):
pass
Please tell us about your environment:
- Allure version: ?
- Test framework: [email protected]
- Allure adaptor: [email protected]
- allurectl: 1.20.0-rc1
- python: 3.9.1
- gitlab-ci
Make a bug issue in TestOps official support: https://support.qameta.io/
Hello, @yannay000 !
This is a well-known issue in Allure TestOps:
- if you assign an id dynamically in the body of a test function AND
- if the full name of a test changed (and this is most likely a case if you have refactored several distinct test functions into one parametrized test)
then you will not be able to run the test selectively through the launch UI.
The team is aware of it and hopefully it will be fixed soon.
As a workaround you can start a launch and close it without rerunning the tests. You will be able then to run the tests selectively during the next launch (or through the test cases UI).
For any additional info regarding Allure TestOps, please, consider opening a support ticket on the Help Desk.
Since the issue is not related to this repo, I'm going to close it soon. You can close it yourself or provide more info if you still feel something is wrong with allure-python
code.