You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Generate HTML reports by setting the `TESTOMATIO_HTML_REPORT_SAVE` environment variable:
263
+
Run tests normally:
262
264
263
265
```sh
264
-
TESTOMATIO_HTML_REPORT_SAVE=1 npx codeceptjs run
266
+
npx codeceptjs run
265
267
```
266
268
267
-
The report will be saved to `html-report/testomatio-report.html`.
269
+
The report will be saved to `output/report/testomatio-report.html` by default. You can also keep using `TESTOMATIO_HTML_REPORT_SAVE=1` and related environment variables if you prefer env-based setup.
268
270
269
271
### Features
270
272
@@ -278,14 +280,11 @@ The report will be saved to `html-report/testomatio-report.html`.
278
280
### Customization
279
281
280
282
```sh
281
-
# Custom output folder
282
-
TESTOMATIO_HTML_REPORT_SAVE=1 TESTOMATIO_HTML_REPORT_FOLDER=./reports npx codeceptjs run
283
-
284
-
# Custom filename
285
-
TESTOMATIO_HTML_REPORT_SAVE=1 TESTOMATIO_HTML_FILENAME=my-report.html npx codeceptjs run
283
+
# Custom output folder in codecept.conf.js
284
+
# reportDir: './reports'
286
285
287
286
# Integrate with Testomat.io cloud
288
-
TESTOMATIO_HTML_REPORT_SAVE=1 TESTOMATIO=your_api_key npx codeceptjs run
Copy file name to clipboardExpand all lines: docs/reports.md
+14-2Lines changed: 14 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -21,13 +21,19 @@ plugins: {
21
21
testomatio: {
22
22
enabled:true,
23
23
require:'@testomatio/reporter/codecept',
24
+
html:true,
25
+
markdown:true,
26
+
csv:true,
27
+
reportDir:'output/report',
24
28
},
25
29
}
26
30
```
27
31
32
+
The local reports above are enabled directly from CodeceptJS config. If `reportDir` is omitted, reports are written to `output/report` using the CodeceptJS `output` directory.
33
+
28
34
### Enable an output
29
35
30
-
Each output turns on when you set its environment variable. Run your tests as usual — one run feeds every output you enabled.
36
+
Each output can also be enabled with environment variables. Run your tests as usual and one run feeds every output you enabled.
31
37
32
38
| To get… | Set | Details |
33
39
| --- | --- | --- |
@@ -63,7 +69,9 @@ The GitHub pipe also needs the job to grant `permissions: pull-requests: write`.
63
69
64
70
A single self-contained HTML file with the run summary and, per test, its steps, screenshots, logs, and error. It needs no API key and no service, so it works anywhere — open it locally or attach it to a CI build.
A single self-contained Markdown file — renders in PR comments, CI job summaries, and Slack, and is convenient for AI agents reading test results. Needs no API key.
122
134
123
135
- `TESTOMATIO_MARKDOWN_REPORT_SAVE=1`— enable the report
Copy file name to clipboardExpand all lines: docs/retry.md
+48-18Lines changed: 48 additions & 18 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -20,24 +20,36 @@ CodeceptJS provides flexible retry mechanisms to handle flaky tests. Use retries
20
20
21
21
## Helper Retries
22
22
23
-
Browser automation helpers (Playwright, Puppeteer, WebDriver) have **built-in retry mechanisms** for element interactions. When you call `I.click('Button')`, Playwright automatically waits for the element to exist, be visible, stable, and enabled — retrying for up to 5 seconds.
23
+
Plawright has a built-in retry mechanism for element interactions. When you call `I.click('Button')`, after the element is located Playwright keeps retrying until it is actionable — up to `timeout` (default 5s).
24
24
25
-
Configure the timeout in your helper settings:
25
+
> WebDriver has a different auto-retry option: [smartWait](/webdriver#smartwait)
26
+
27
+
Even though the handle exists (from `.all()`), Playwright still waits for it to become visible, stable (not mid-animation), enabled, not covered by an overlay/modal, and not rerendering.
26
28
27
29
```js
28
30
helpers: {
29
31
Playwright: {
30
-
timeout:5000, // retry actions for up to 5 seconds
31
-
waitForAction:100//wait 100ms before each action
32
+
timeout:5000, // retry the action until the element is actionable
33
+
waitForAction:100//fixed pause AFTER click/doubleClick/pressKey
find element (no wait — fails instantly if locator matches nothing)
42
+
→ wait up to `timeout` for it to become actionable ← timeout
43
+
→ perform action
44
+
→ sleep `waitForAction` ms ← waitForAction (settle pause, not a wait)
45
+
```
46
+
47
+
`timeout` covers the action. If the locator matches nothing yet, the step fails immediately. Use [Failed Step Retries](#failed-step-retries) to cover that gap.
48
+
37
49
38
50
## Failed Step Retries
39
51
40
-
Automatically retry all failed steps without modifying test code:
52
+
CodeceptJS retries all failed steps by default by using the `retryFailedStep` plugin.
@@ -101,7 +102,6 @@ export default function (config) {
101
102
if(!store.autoRetries)returnfalse
102
103
if(err&&err.isTerminal)returnfalse
103
104
if(err&&err.message&&(err.message.includes('ERR_ABORTED')||err.message.includes('frame was detached')||err.message.includes('Target page, context or browser has been closed')))returnfalse
0 commit comments