Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 9 additions & 10 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -251,20 +251,22 @@ Add the `testomatio` plugin to your `codecept.conf.js`:
plugins: {
testomatio: {
enabled: true,
require: '@testomatio/reporter/lib/adapter/codecept',
require: '@testomatio/reporter/codecept',
html: true,
reportDir: 'output/report',
},
}
```

### Usage

Generate HTML reports by setting the `TESTOMATIO_HTML_REPORT_SAVE` environment variable:
Run tests normally:

```sh
TESTOMATIO_HTML_REPORT_SAVE=1 npx codeceptjs run
npx codeceptjs run
```

The report will be saved to `html-report/testomatio-report.html`.
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.

### Features

Expand All @@ -278,14 +280,11 @@ The report will be saved to `html-report/testomatio-report.html`.
### Customization

```sh
# Custom output folder
TESTOMATIO_HTML_REPORT_SAVE=1 TESTOMATIO_HTML_REPORT_FOLDER=./reports npx codeceptjs run

# Custom filename
TESTOMATIO_HTML_REPORT_SAVE=1 TESTOMATIO_HTML_FILENAME=my-report.html npx codeceptjs run
# Custom output folder in codecept.conf.js
# reportDir: './reports'

# Integrate with Testomat.io cloud
TESTOMATIO_HTML_REPORT_SAVE=1 TESTOMATIO=your_api_key npx codeceptjs run
TESTOMATIO=your_api_key npx codeceptjs run
```

## PageObjects
Expand Down
Binary file added docs/images/testomatio-html-report.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/images/testomatio-markdown-report.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
7 changes: 4 additions & 3 deletions docs/migration-4.md
Original file line number Diff line number Diff line change
Expand Up @@ -171,16 +171,17 @@ npm install --save-dev @testomatio/reporter
plugins: {
testomatio: {
enabled: true,
require: '@testomatio/reporter/lib/adapter/codecept',
require: '@testomatio/reporter/codecept',
html: true,
},
}
```

```bash
TESTOMATIO_DISABLE_UPLOAD=1 npx codeceptjs run
npx codeceptjs run
```

The HTML report is written to `output/reports/`. See [Reports HTML](/reports) for pipe options.
The HTML report is written to `output/report/` by default. See [Reports > HTML](/reports) for pipe options.

Reporting notes:

Expand Down
16 changes: 14 additions & 2 deletions docs/reports.md
Original file line number Diff line number Diff line change
Expand Up @@ -21,13 +21,19 @@ plugins: {
testomatio: {
enabled: true,
require: '@testomatio/reporter/codecept',
html: true,
markdown: true,
csv: true,
reportDir: 'output/report',
},
}
```

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.

### Enable an output

Each output turns on when you set its environment variable. Run your tests as usual one run feeds every output you enabled.
Each output can also be enabled with environment variables. Run your tests as usual and one run feeds every output you enabled.

| To get… | Set | Details |
| --- | --- | --- |
Expand Down Expand Up @@ -63,7 +69,9 @@ The GitHub pipe also needs the job to grant `permissions: pull-requests: write`.

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.

![HTML report](https://raw.githubusercontent.com/testomatio/reporter/master/docs/pipes/images/html-pipe.png)
![HTML report](./images/testomatio-html-report.png)

- Preferred in CodeceptJS 4: enable `html: true` in `plugins.testomatio` and run `npx codeceptjs run`

- `TESTOMATIO_HTML_REPORT_SAVE=1` — enable the report
- `TESTOMATIO_HTML_REPORT_FOLDER=output/reports` — keep it inside CodeceptJS's `output/` dir (default folder is `html-report`)
Expand Down Expand Up @@ -118,6 +126,10 @@ Posts a comment to the Pull Request with the same summary. Comments are created

### Markdown Report

- Preferred in CodeceptJS 4: enable `markdown: true` in `plugins.testomatio` and run `npx codeceptjs run`

![Markdown report](./images/testomatio-markdown-report.png)

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.

- `TESTOMATIO_MARKDOWN_REPORT_SAVE=1` — enable the report
Expand Down