allure-framework / allure-js

Allure integrations for JavaScript test frameworks
https://allurereport.org/
Apache License 2.0
219 stars 116 forks source link

The problem of creating duplicate autotests by fullname and id #633

Open lunin-vadim opened 1 year ago

lunin-vadim commented 1 year ago

I am using playwright. There are 5 tests in one spec file. In beforeAll I prescribe precondition annotations for all tests, and allure.id in each test is different. If the test falls at the beforAll stage to an annotation with id, then the system creates a test by full name

DmitriyKapeliukh commented 1 month ago

Is there an option to avoid test duplication except by passing metadata to the playwright test title?

baev commented 3 weeks ago

I guess the other option is to use Playwright tags after https://github.com/allure-framework/allure-js/pull/1034 gets merged:

import { test } from '@playwright/test';
test("test with allure id", { tag: "@allure.id:123" }, async() => {
  //...
});