Skip to content

Commit

Permalink
Merge pull request #61 from alexneo2003/55-feature-make-use-of-custom…
Browse files Browse the repository at this point in the history
…-annotations-instead-of-title-for-id-linking

55 feature make use of custom annotations instead of title for id linking
  • Loading branch information
alexneo2003 authored Mar 25, 2024
2 parents 158c7a5 + ede0a22 commit 26e6b59
Show file tree
Hide file tree
Showing 10 changed files with 4,756 additions and 77 deletions.
13 changes: 13 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,16 @@
# [1.9.0](https://github.com/alexneo2003/playwright-azure-reporter/compare/v1.9.0-beta.0...v1.9.0) (2024-03-25)



# [1.9.0-beta.0](https://github.com/alexneo2003/playwright-azure-reporter/compare/v1.8.0...v1.9.0-beta.0) (2024-03-11)


### Features

* add ability to define test id using pw tags config ([ef999a1](https://github.com/alexneo2003/playwright-azure-reporter/commit/ef999a1cf42fbfadb7b61150990aff6f3ab71015))



# [1.8.0](https://github.com/alexneo2003/playwright-azure-reporter/compare/v1.7.0...v1.8.0) (2023-11-21)


Expand Down
29 changes: 29 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,23 @@
**Since version 1.5.0 reporter allows using configurationIds to publish results for different configurations e.g. different browsers**
**Necessarily defining `testRun.configurationIds` or/and `testPointMapper` function in reporter config, otherwise reporter will be publishing results for all configurations**

**Since version 1.9.0 reporter allows you to use test tags as Playwright it implemented in version [1.42.0](https://playwright.dev/docs/test-annotations#tag-tests)**
**You can define test cases ids in new format, but you still can use old format with test case id in test name**

**Example:**

```typescript
test.describe('Test suite', () => {
test('Test name @tag1 @tag2', {
tag: ['@[1]'] // <<-- test case id
} () => {
expect(true).toBe(true);
});
});
```

**but you should define your Azure DevOps test case id in format `@[1]` where `1` is your test case id in square brackets and `@` is required prefix for playwright to recognize tags**

## How to integrate

Install package
Expand Down Expand Up @@ -72,6 +89,18 @@ describe('Test suite', () => {
});
```

Or you can use tags to define test cases ids (since v1.9.0) (read more [here](https://playwright.dev/docs/test-annotations#tag-tests)):

```typescript
test.describe('Test suite', () => {
test('Test name', {
tag: ['@[1]', '@smoke', '@slow']
} () => {
expect(true).toBe(true);
});
});
```

Configure Playwright Azure Reporter with `playwright-azure-reporter` package.

`playwright.config.ts`
Expand Down
Loading

0 comments on commit 26e6b59

Please sign in to comment.