Tests with assigned Allure Id duplicates with a different allure id in TestOps launch when failed/broke on set up block or if skipped

Modified on Wed, 14 Aug at 6:53 AM

When test results are generated Allure Framework may skip Allure Id label in test result if tests are stopped(or failed) before Allure Id annotation is provided to the result file 

This can lead to duplicating(not retry) test results in the launch and generate different Id for test cases based on these results.


This problem relates to Allure Framework which is an open source product that is fully supported and developed by the open source community.

Link to the issue in allure-framework GitHub repo:

 

Example of a workaround (for playwright):


In order to avoid duplication of test cases, it is necessary to transmit metadata in the test header.

  • Make sure that the version of allure‑playwright up to date
  • Instead of using the Id annotation within the test itself, set the Id property as metadata in the test header.

//Explicit
test.skip('skip this test @allure.id=1', async ({ page }) => {
// This test is not run
});

//Conditional
test('skip this test @allure.id=1', async ({ page }) => {
test.skip();
});

//Another example of Conditional annotation
test('skip this test @allure.id=1', async ({ page, browserName }) => {
test.skip(browserName === 'firefox', 'In progress');
});



Was this article helpful?

That’s Great!

Thank you for your feedback

Sorry! We couldn't be helpful

Thank you for your feedback

Let us know how can we improve this article!

Select at least one of the reasons
CAPTCHA verification is required.

Feedback sent

We appreciate your effort and will try to fix the article