kwikqa 0.2.2 → 0.2.3
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 +35 -3
- package/dist/kwikqa.mjs +109 -109
- package/package.json +1 -1
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; 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, 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. |
|
|
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. |
|
|
@@ -348,6 +348,38 @@ steps:
|
|
|
348
348
|
in the log and skipped; the exit code is the analysis's. Without a KwikQA token, or past your
|
|
349
349
|
plan's limit, the run is analyzed locally and the summary says why it wasn't diagnosed.
|
|
350
350
|
|
|
351
|
+
### Azure Pipelines
|
|
352
|
+
|
|
353
|
+
```yaml
|
|
354
|
+
steps:
|
|
355
|
+
- script: npx playwright test
|
|
356
|
+
- script: npx kwikqa ci
|
|
357
|
+
condition: failed()
|
|
358
|
+
env:
|
|
359
|
+
KWIKQA_TOKEN: $(KWIKQA_TOKEN)
|
|
360
|
+
SYSTEM_ACCESSTOKEN: $(System.AccessToken)
|
|
361
|
+
# Optional, see "Slack and Microsoft Teams" below
|
|
362
|
+
KWIKQA_SLACK_WEBHOOK_URL: $(KWIKQA_SLACK_WEBHOOK_URL)
|
|
363
|
+
- publish: kwikqa-report.html
|
|
364
|
+
artifact: kwikqa-report
|
|
365
|
+
condition: failed()
|
|
366
|
+
```
|
|
367
|
+
|
|
368
|
+
Store `KWIKQA_TOKEN` as a secret variable of the pipeline. Azure Pipelines gives a step a secret,
|
|
369
|
+
and `System.AccessToken`, only through the step's `env`.
|
|
370
|
+
|
|
371
|
+
- **Build summary.** The summary is a "KwikQA" section on the run's Extensions tab.
|
|
372
|
+
- **Pull-request thread.** On an Azure Repos pull request, the summary is also one thread. A re-run
|
|
373
|
+
of the same pipeline job updates it. It's created closed, so it never holds up the pull request
|
|
374
|
+
under a comment-resolution policy.
|
|
375
|
+
- **Permission.** The thread needs "Contribute to pull requests" for the pipeline's build service.
|
|
376
|
+
Set it in Project settings → Repositories → your repository → Security, for
|
|
377
|
+
"*project* Build Service (*organization*)".
|
|
378
|
+
- **Other repositories.** A pipeline for a GitHub or Bitbucket repository gets the build summary
|
|
379
|
+
only.
|
|
380
|
+
- **Forks.** A fork's build gets no secrets unless the pipeline allows it. KwikQA analyzes it
|
|
381
|
+
locally and skips the thread.
|
|
382
|
+
|
|
351
383
|
### Slack and Microsoft Teams
|
|
352
384
|
|
|
353
385
|
`kwikqa ci` posts the run to the incoming webhooks you store as CI secrets. KwikQA keeps no webhook
|
|
@@ -367,8 +399,8 @@ a wider audience than a build log. KwikQA posts only when tests failed, unless y
|
|
|
367
399
|
|
|
368
400
|
### Other CI systems
|
|
369
401
|
|
|
370
|
-
`npx kwikqa ci` writes the report
|
|
371
|
-
comment yet:
|
|
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:
|
|
372
404
|
|
|
373
405
|
```sh
|
|
374
406
|
npx playwright test || { npx kwikqa ci; exit 1; }
|