kwikqa 0.2.3 → 0.2.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -182,7 +182,7 @@ WebdriverIO wherever your package manager installed it inside the repository, in
182
182
  | `npx kwikqa analyze --capture` | First re-run the failing tests so every failure has full evidence. Playwright runs with full tracing; with Playwright 1.59+ and [Playwright CLI](https://www.npmjs.com/package/@playwright/cli) installed, it also pauses locator failures at the failing line and asks Playwright for locators of the closest elements (`--no-probe` skips this). Cypress and WebdriverIO re-run the failing specs with your own config plus KwikQA's reporter and failure capture, which records each failed attempt's DOM, command log, console, and network. Asks before running anything; `--yes` approves in CI. |
183
183
  | `npx kwikqa analyze --html` | Also write the [failure report](#failure-report), `kwikqa-report.html`; `--output <path>` writes it elsewhere. |
184
184
  | `npx kwikqa report` | Write the failure report of the latest analysis without analyzing again or sending anything. `--run <id>` picks an earlier run under `.kwikqa/runs/`; `--output <path>` picks the file. |
185
- | `npx kwikqa ci` | In a CI job: analyze as `analyze --yes --html` does, then publish a summary. On GitHub Actions that is the job summary and one pull-request comment, and on Azure Pipelines a build summary and one pull-request thread; with your webhooks, also a Slack or Teams message. See [CI](#ci). Without a KwikQA token it analyzes locally. It takes `--report`, `--framework`, `--local`, `--no-changes`, and `--output` as `analyze` does, and `--notify always` to post to chat after every run, not only failed ones. |
185
+ | `npx kwikqa ci` | In a CI job: analyze as `analyze --yes --html` does, then publish a summary. On GitHub Actions that is the job summary and one pull-request comment, on Azure Pipelines a build summary and one pull-request thread, and on GitLab CI/CD the job's log and one merge-request note; with your webhooks, also a Slack or Teams message. See [CI](#ci). Without a KwikQA token it analyzes locally. It takes `--report`, `--framework`, `--local`, `--no-changes`, and `--output` as `analyze` does, and `--notify always` to post to chat after every run, not only failed ones. |
186
186
  | `npx kwikqa fix` | Propose a repair for a test-side cause, show the diff and validation commands, and apply it if you approve. First it offers to re-run the failing tests once: a test that passes now is flaky, so KwikQA reports it and requests no repair. It starts with the failure group whose test-side diagnosis is strongest; if the model declines, or its proposal fails KwikQA's checks, it asks about the next such group, at most three, each with its own preview. One `fix` counts as one fix however many groups it tries. `--group <n>` repairs only group n, as `analyze` numbered it. `--propose-only` stops after the proposal. |
187
187
  | `npx kwikqa validate` | Run the approved validation. The repaired test must pass three times in a row, with retries off. Passing keeps the patch; failing rolls it back. When other tests failed with the same cause, it then offers to re-run them once and names any that still fail, so you can run `fix` again for them; the patch stays either way. |
188
188
  | `npx kwikqa fix --retry` | After a failed validation, re-diagnose from the new evidence and propose one revised patch. |
@@ -380,6 +380,36 @@ and `System.AccessToken`, only through the step's `env`.
380
380
  - **Forks.** A fork's build gets no secrets unless the pipeline allows it. KwikQA analyzes it
381
381
  locally and skips the thread.
382
382
 
383
+ ### GitLab CI/CD
384
+
385
+ ```yaml
386
+ e2e:
387
+ image: mcr.microsoft.com/playwright:v1.64.1-noble
388
+ script:
389
+ - npm ci
390
+ - npx playwright test || { npx kwikqa ci; exit 1; }
391
+ artifacts:
392
+ when: always
393
+ expose_as: KwikQA report
394
+ paths:
395
+ - kwikqa-report.html
396
+ ```
397
+
398
+ The `exit 1` keeps the job failed: KwikQA exits with the analysis's code, which is usually `0`.
399
+
400
+ - **Variables.** Add `KWIKQA_TOKEN` and `GITLAB_TOKEN` under Settings → CI/CD → Variables. Mark
401
+ them **masked**, and leave **protected** off, or a feature branch's pipeline won't get them.
402
+ - **The token.** `CI_JOB_TOKEN` can't write notes, so `GITLAB_TOKEN` is a token with the `api`
403
+ scope and at least the Reporter role. Use a project or group access token (Premium or Ultimate on
404
+ GitLab.com, any tier when self-managed), or a personal access token, ideally a dedicated user's.
405
+ The note is posted as that token's user.
406
+ - **Merge-request note.** The summary is printed in the job's log and posted as one note on the
407
+ merge request. A re-run of the same job updates it. A merge request pipeline names its merge
408
+ request. A branch pipeline gets a note when its branch has exactly one open merge request in the
409
+ project.
410
+ - **Forks.** A fork's merge request pipeline runs in the fork, without your project's variables.
411
+ KwikQA analyzes it locally and skips the note.
412
+
383
413
  ### Slack and Microsoft Teams
384
414
 
385
415
  `kwikqa ci` posts the run to the incoming webhooks you store as CI secrets. KwikQA keeps no webhook
@@ -399,8 +429,8 @@ a wider audience than a build log. KwikQA posts only when tests failed, unless y
399
429
 
400
430
  ### Other CI systems
401
431
 
402
- On GitLab, Jenkins, and other CI systems, `npx kwikqa ci` writes the report and posts to Slack and
403
- Teams, but writes no summary or comment yet:
432
+ On Jenkins and other CI systems, `npx kwikqa ci` writes the report and posts to Slack and Teams,
433
+ but writes no summary or comment yet:
404
434
 
405
435
  ```sh
406
436
  npx playwright test || { npx kwikqa ci; exit 1; }