# playwright-qase-reporter@2.7.0

## Added

- Attachment uploads are now parallelised and paced adaptively. `testops.attachments.concurrency` (`QASE_TESTOPS_ATTACHMENTS_CONCURRENCY`, default `4`, clamped to `1`..`16`) sets how many attachment batches are uploaded at once, and `testops.attachments.timeout` (`QASE_TESTOPS_ATTACHMENTS_TIMEOUT`, default `120` seconds) caps a single upload request. The fixed pause between batches now applies only while the API is rate limiting, so runs that never see a `429` no longer pay for it. Retries of file-backed attachments also open fresh read streams and, after a connection error, use a new connection. Bumped `qase-javascript-commons` pin to `~2.9.0`.

# playwright-qase-reporter@2.6.0

## Added

- Playwright's per-failure `error-context.md` (Playwright >= 1.51) is now also sent as `execution.error_context` on the v2 result payload, in addition to being uploaded as a file attachment as before. Qase stores it as text so it can be copied straight to the clipboard from the test result, instead of having to download the `.md`. Both the text field and the attachment are governed by `testops.uploadAttachments`, so setting it to `false` suppresses both — the error context contains a page snapshot. Only failed tests produce one; the text is truncated at 262144 characters with a `[truncated by qase reporter: N characters omitted]` marker, and a missing or unreadable file is ignored rather than failing the result submission. Bumped `qase-javascript-commons` pin to `~2.8.0`. See [docs/ATTACHMENTS.md](docs/ATTACHMENTS.md#playwright-error-context).

# playwright-qase-reporter@2.5.6

## Fixed

- `qase.step` now types `expectedResult` and `data` as optional (`?`) instead of positionally required `string | undefined`. Previously the documented calls `qase.step('action')` and `qase.step('action', 'expected')` failed to compile with `ts(2554): Expected 3 arguments`, forcing callers to pass `undefined` explicitly to omit them. This is a type-only change — runtime behavior is unchanged and fully backward compatible. The docstring now also clarifies that `qase.step` is a title decorator meant to be passed to Playwright's `test.step()`, not a step runner. Fixes #981.

# playwright-qase-reporter@2.5.5

## Fixed

- Calling `qase(0, name)` (and any case where every supplied ID gets filtered out) no longer leaks an empty array into the static registry, and the result-builder no longer returns an empty array for an empty registry entry. In 2.5.4, `qase(0, name)` would publish results with `"testops_ids": []`, which the API rejects with HTTP 400 (`"Each testops_ids item must be a positive integer."`). After this fix the result is published with `testops_ids: null` — i.e. with no ID — same as if no ID had been specified. Bumped `qase-javascript-commons` pin to `~2.7.5`.

# playwright-qase-reporter@2.5.4

## Fixed

- Qase test case IDs that are `<= 0` passed via the runtime API (`qase(0, name)`, `qase.id(0)`, `qase.projects({ PROJ1: [0] })`) are now dropped with a warning instead of being written to the test metadata. Previously these calls bypassed the parser-level filter introduced in 2.5.3 and could still produce HTTP 400 from the API. Bumped `qase-javascript-commons` pin to `~2.7.4`.

# playwright-qase-reporter@2.5.3

## Fixed

- Added `repository.directory: "qase-playwright"` so npmjs.com correctly resolves relative links in the README. Bumped `qase-javascript-commons` pin to `~2.7.3`.

# playwright-qase-reporter@2.5.2

## Security

- Bumped `uuid` from `^9.0.1` to `^11.1.1`, closing the advisory on uuid `v3/v5/v6` missing buffer bounds check that downstream consumers (e.g. Dependabot on user repos) saw via this reporter. Only `v4` is used here, so the advisory was not exploitable through this code path, but the version pin matters for users running `npm audit` on their projects.

## Changed

- `engines.node` raised from `>=14` to `>=18` to match uuid 11+ requirements; Node 14/16 are EOL.
- Bumped `qase-javascript-commons` pin from `~2.7.0` to `~2.7.2`.

# playwright-qase-reporter@2.5.1

## Fixed

- `execution.end_time` is now populated on both test results and steps (derived from Playwright's `startTime + duration`). Previously `end_time` was hardcoded to `null`, which broke timeline rendering on the Qase side. Units are unchanged: `start_time` / `end_time` in Unix seconds (with fractional ms), `duration` in milliseconds.
- HTTP/fetch profiler steps (via `qase-javascript-commons@2.7.1`) now emit `start_time` / `end_time` in Unix seconds instead of milliseconds.

# playwright-qase-reporter@2.5.0

## Added

- Exposed the `playwright-qase-reporter/fixture` subpath for the network-profiler fixture (`fixture.ts`). The module was already built into `dist/` but was missing from `package.json` `exports`, making `require('playwright-qase-reporter/fixture')` fail. This unblocks the documented `qaseProfiler` fixture usage and the example at `examples/single/playwright/test/profiler-api.spec.js`.

## Changed

- Internal: decomposed `PlaywrightQaseReporter` into focused modules — `StepIndex`, `MetadataExtractor`, `AnnotationExtractor`, `StepConverter`, `ResultBuilder`. The reporter class now acts as a composition root with thin lifecycle-hook orchestrators. Public contract unchanged: the named-exported `PlaywrightQaseReporter` class, its `Reporter` interface implementation, all four lifecycle hooks (`onBegin`, `onStepBegin`, `onTestEnd`, `onEnd`), the static API (`addIds`, `statusMap`), the constructor signature, and the `PlaywrightQaseOptionsType` type export all continue to work identically.
- Added 47 new unit tests covering each extracted module.

# playwright-qase-reporter@2.4.0

## Changed

- Bumped `qase-javascript-commons` to `~2.7.0`.
- Internal: replaced local copies of `removeQaseIdsFromTitle` and `extractAndCleanStep` with imports from `qase-javascript-commons/internal`. `extractQaseIdsFromAnnotation` now delegates id-string parsing to `parseQaseIdsFromString` (also tolerates whitespace and skips non-numeric entries).

# playwright-qase-reporter@2.3.0

## What's new

- Added `qase.tags()` method to assign tag titles to test cases.
- Updated `qase-javascript-commons` dependency to `~2.6.0`.

# playwright-qase-reporter@2.2.3

## Bug fixes

- Moved profiler import to separate sub-path (`qase-javascript-commons/profilers`) to avoid pulling `node:` modules into bundlers.
- Updated `qase-javascript-commons` dependency to `~2.5.7`.

# playwright-qase-reporter@2.2.2

## What's new

- Added Network Profiler integration for automatic HTTP request capture during test execution.
- Updated `qase-javascript-commons` dependency to `~2.5.6`.

# playwright-qase-reporter@2.2.1

## What's new

- Fixed duplicate suites caused by inconsistent path separators on Windows. Tests with and without qaseId now produce identical suite paths regardless of OS.

# playwright-qase-reporter@2.2.0

## What's new

- Added support for multi-project support.

# playwright-qase-reporter@2.1.7

## What's new

- Improved handling thread id for parallel and shared workers tests.

# playwright-qase-reporter@2.1.6

## What's new

- Added support for status filter in the test run.
- Improved error handling.

# playwright-qase-reporter@2.1.4

## What's new

Support marking tests as flaky if they passed after retries.

```ts
[
  'playwright-qase-reporter',
  {
    framework: {
      markAsFlaky: true,
    },
  },
],
```

# playwright-qase-reporter@2.1.3

## What's new

Support specifying the browser name as a parameter.
New section `framework` was added to the playwright config.

```ts
[
  'playwright-qase-reporter',
   {
     debug: true,
     testops: {
      ...
     },
     framework: {
      browser: {
       addAsParameter: true,
       parameterName: 'Browser Name',
      },
    },
  },
],
```

# playwright-qase-reporter@2.1.1

## What's new

Support specifying the test case suite in the `annotation`.

```ts
test('test',
  {
    annotation: { type: 'QaseSuite', description: 'My suite' },
  },
  async ({ page }) => {
    await page.goto('https://example.com');
  });
```

# playwright-qase-reporter@2.1.0

## What's new

- Updated to the latest minor version of the common package for improved compatibility and features.
- Fixed all ESLint warnings across the project to ensure code quality and maintainability.

# playwright-qase-reporter@2.0.17

## What's new

Introduced the ability to specify expected results and data for each step, improving step validation and customization.

# playwright-qase-reporter@2.0.16

## What's new

Improve excluding default steps, like `Worker Cleanup`, `Before Hook`, and `After Hook`.

# playwright-qase-reporter@2.0.15

## What's new

Exclude `Worker Cleanup` step if it doesn't have children steps.

# playwright-qase-reporter@2.0.14

## What's new

Support specifying the test case ID in the `annotation`.

```ts
test('test',
  {
    annotation: { type: 'QaseID', description: '1' },
  },
  async ({ page }) => {
    await page.goto('https://example.com');
  });
```

# playwright-qase-reporter@2.0.13

## What's new

Revert the `qase.id()` syntax to `qase()` for the Qase ID.
The `qase.id()` syntax is still supported, but the `qase()` syntax is more concise and easier to use.

```ts
test(qase(42, 'test'), async ({ page }) => {
  await page.goto('https://example.com');
});
```

We decided to return the old syntax because in some situations the new syntax does not work, since the test does not
run.

# playwright-qase-reporter@2.0.12

## What's new

Exclude `Before Hook` and `After Hook` if they don't have children steps.

# playwright-qase-reporter@2.0.11

## What's new

Support group parameters for test cases. You can specify the group parameters in the test case using the following
format:

```ts
  test('test', () => {
  qase.groupParameters({ 'param01': 'value01', 'param02': 'value02' });
  expect(true).toBe(true);
});
```

# playwright-qase-reporter@2.0.10

## What's new

Improved stack trace handling when an error occurs.
Now, records related to the reporter are not added to the stack trace.

# playwright-qase-reporter@2.0.9

## What's new

Fixed the problem when tests have the same name and different QaseIDs.
They were uploaded into the Qase with an incorrect QaseID.

# playwright-qase-reporter@2.0.7

## What's new

Returned the ability to add the QaseID to the test name.
This allows using the standard playwright mechanism to filter the tests being run.

# playwright-qase-reporter@2.0.6

## What's new

Improve the collecting information about failed tests.
Now, the reporter will collect the stack trace and the error message from all errors for failed tests.

# playwright-qase-reporter@2.0.5

## What's new

The log message about the `qase(id, 'title')` annotation syntax got improved.
Earlier it was saying that this syntax is deprecated, which could be understood as that it's not working anymore,
or will be removed any time.
In fact, it's still working and will be supported further on.
However, there's a more powerful and flexible syntax which we propose to try in new tests.

The updated log message will, hopefully, explain it better:

> Some tests are using qase(id, 'Title') syntax.
> Consider using the new syntax: qase.id().title() in the test body. See the docs for reference:
> <https://github.com/qase-tms/qase-javascript/tree/main/qase-playwright#readme>

# playwright-qase-reporter@2.0.4

## What's new

Added new annotation `qase.comment()`.
Tests marked with it will be reported with the specified comment in the Qase.

```js
test('test', async ({ page }) => {
  qase.comment("Custom comment");
  await page.goto('https://example.com');
});
```

# playwright-qase-reporter@2.0.3

## What's new

Added new annotation `qase.suite()`.
Tests marked with it will be reported to the specified suite in the Qase.

If you don't specify the suite name, the reporter will take a suites from the test file path.
If you use the root suite, the reporter will take the root suite as the first level of the suite and your value of the
`qase.suite()` as the second level.

```js
test('test', async ({ page }) => {
  qase.suite("Custom suite");
  await page.goto('https://example.com');
});
```

# playwright-qase-reporter@2.0.2

## What's new

Added new annotation `qase.ignore()`.
Tests marked with it will run as usual but won't appear in the Qase report.

```js
test('test', async ({ page }) => {
  qase.ignore();
  await page.goto('https://example.com');
});
```

# playwright-qase-reporter@2.0.1

## What's new

Fixed an issue with using the `qase.attach()` method to add attachments with a file path.
The reporter didn't add such attachments to the test.

# playwright-qase-reporter@2.0.0

## What's new

This is the first release in the 2.x series of the Playwright reporter.
It brings a new annotation syntax with test parametrization and field values,
new and more flexible configs, uploading results in parallel with running tests,
and other powerful features.

This changelog entry will be updated soon.
For more information about the new features and a guide for migration from v1, refer to the
[reporter documentation](https://github.com/qase-tms/qase-javascript/tree/main/qase-playwright#readme)

# playwright-qase-reporter@2.0.0-beta.14

## What's new

Fixed the issue with attachments that the Playwright would create if the test failed.
We have not uploaded these attachments before. This problem has now been fixed.

# playwright-qase-reporter@2.0.0-beta.13

## What's new

Fixed the issue with the `qase.parameters` annotation if you use not string values for parameters.

```log
[ERROR] qase: Unable to add the result to the upstream reporter:
Message: Data is invalid.
 results.0.param.test_case: The param.test_case must be a string.

Error: Request failed with status code 400
```

Right now, the reporter will convert all parameters to strings before sending them to the Qase API.

# playwright-qase-reporter@2.0.0-beta.11

## What's new

- Using the `Qase` annotation in a chain

```js
test('Ultimate Question of Life, The Universe, and Everything', async ({ page }) => {
  qase.id(42)
    .title('Ultimate Question of Life, The Universe, and Everything')
    .fields({ severity: high, priority: medium })
    .attach({ paths: '/path/to/file' });
...
})
```

# playwright-qase-reporter@2.0.0-beta.10

## What's new

- Reporting no longer fails when a test has failed but no stacktrace was collected.
  ("TypeError: Cannot read properties of undefined (reading 'toString')").

# playwright-qase-reporter@2.0.0-beta.9

## What's new

### Collect test suite information

Collect the following information as the test's suite:

- path to the file which contains the test;
- value of the `test.describe()` declaration, if it exists.

The resulting test suite will be added to the test metadata.
If Qase workspace is configured to update test cases from reported
tests results, the newly created cases will be structured by their
suites, derived from file path and `test.describe()`.

# playwright-qase-reporter@2.0.0-beta.8

## What's new

Fix the problem with dependencies, introduced in `2.0.0-beta.7`

# playwright-qase-reporter@2.0.0-beta.7

## What's new

Previously, we logged a message about the use of an outdated annotation immediately when running the test.
Now we will log the message after all tests are completed. Like this:

```log
qase: qase(caseId) is deprecated. Use qase.id() and qase.title() inside the test body
The following tests are using the old annotation:
at /Users/gda/Documents/github/qase-javascript/examples/playwright/test/arith.test.js:12:8
at /Users/gda/Documents/github/qase-javascript/examples/playwright/test/arith.test.js:16:7
at /Users/gda/Documents/github/qase-javascript/examples/playwright/test/arith.test.js:7:7

```

# playwright-qase-reporter@2.0.0-beta.6

## What's new

Capture `stdout` and `stderr` logs as attachments.
To enable this feature, set environment variable `QASE_CAPTURE_LOGS=true` or
add `captureLogs: true` to the reporter configuration:

```diff
[
  'playwright-qase-reporter',
  {
    mode: 'testops', 
+   captureLogs: true,
    ...
  },
];
```

# playwright-qase-reporter@2.0.0-beta.5

## What's new

Upload test attachments to Qase:

```js
test('test', async ({ page }) => {
  // upload files by path
  qase.attach({ paths: '/path/to/file' });
  // list multiple files at once
  qase.attach({ paths: ['/path/to/file', '/path/to/another/file'] });
  // upload contents directly from your code
  qase.attach({ name: 'attachment.txt', content: 'Hello, world!', contentType: 'text/plain' });
  await page.goto('https://example.com');
});
```

# playwright-qase-reporter@2.0.0-beta.4

## What's new

Annotate parameterized tests to see the complete data in the Qase.io test report:

```js
const people = ['Alice', 'Bob'];
for (const name of people) {
  test(`testing with ${name}`, async () => {
    qase.id(1)
    qase.parameters({ 'name': name });
    // ...
  });
}

```

# playwright-qase-reporter@2.0.0-beta.3

## What's new

- Change module exports for simpler importing.

  New syntax:

  ```js
  import { qase } from 'playwright-qase-reporter';
  ```

  instead of:

  ```js
  import { qase } from 'playwright-qase-reporter/playwright';
  ```

- Update the readme with examples of new imports and annotations.

# playwright-qase-reporter@2.0.0-beta.2

## Overview

Qase reporter for the Playwright test framework.

This is a beta channel release.
To try the new features, install it with:

```bash
npm install playwright-qase-reporter@beta
```

To switch back to the stable releases, run:

```bash
npm install playwright-qase-reporter@latest
```

## What's new

### New syntax for annotating tests

This release brings a major syntax change for specifying more test parameters.

Old syntax allowed only test case ID and title, and wasn't improving code readability:

```js
test(qase(42, 'Ultimate Question of Life, The Universe, and Everything'), async ({ page }) => {
...
})
```

New syntax allows for adding information on separate lines, keeping the code readable:

```js
test('Ultimate Question of Life, The Universe, and Everything', async ({ page }) => {
  qase.id(42);
  qase.fields({ severity: high, priority: medium });
  qase.attach({ paths: '/path/to/file' });
...
})
```
