Skip to content

Commit 5a22904

Browse files
committed
remove old logic and add testomatio reporter info
1 parent 061dc22 commit 5a22904

32 files changed

+66
-5366
lines changed

README.md

Lines changed: 39 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -233,49 +233,62 @@ Scenario('test title', () => {
233233
})
234234
```
235235

236-
## HTML Reporter
236+
## HTML Reports
237237

238-
CodeceptJS includes a powerful built-in HTML Reporter that generates comprehensive, interactive test reports with detailed information about your test runs. The HTML reporter is **enabled by default** for all new projects and provides:
238+
Generate beautiful HTML reports using **[@testomatio/reporter](https://github.com/testomatio/reporter)** package.
239239

240-
### Features
241-
242-
- **Interactive Dashboard**: Visual statistics, pie charts, and expandable test details
243-
- **Step-by-Step Execution**: Shows individual test steps with timing and status indicators
244-
- **BDD/Gherkin Support**: Full support for feature files with proper scenario formatting
245-
- **System Information**: Comprehensive environment details including browser versions
246-
- **Advanced Filtering**: Real-time filtering by status, tags, features, and test types
247-
- **History Tracking**: Multi-run history with trend visualization
248-
- **Error Details**: Clean formatting of error messages and stack traces
249-
- **Artifacts Support**: Display screenshots and other test artifacts
240+
### Installation
250241

251-
### Visual Examples
242+
```sh
243+
npm install @testomatio/reporter --save-dev
244+
```
252245

253-
#### Interactive Test Dashboard
246+
### Configuration
254247

255-
The main dashboard provides a complete overview with interactive statistics and pie charts:
248+
Add the `testomatio` plugin to your `codecept.conf.js`:
256249

257-
![HTML Reporter Dashboard](docs/shared/html-reporter-main-dashboard.png)
250+
```js
251+
plugins: {
252+
testomatio: {
253+
enabled: true,
254+
require: '@testomatio/reporter/lib/adapter/codecept',
255+
},
256+
}
257+
```
258258

259-
#### Detailed Test Results
259+
### Usage
260260

261-
Each test shows comprehensive execution details with expandable step information:
261+
Generate HTML reports by setting the `TESTOMATIO_HTML_REPORT_SAVE` environment variable:
262262

263-
![HTML Reporter Test Details](docs/shared/html-reporter-test-details.png)
263+
```sh
264+
TESTOMATIO_HTML_REPORT_SAVE=1 npx codeceptjs run
265+
```
264266

265-
#### Advanced Filtering Capabilities
267+
The report will be saved to `html-report/testomatio-report.html`.
266268

267-
Real-time filtering allows quick navigation through test results:
269+
### Features
268270

269-
![HTML Reporter Filtering](docs/shared/html-reporter-filtering.png)
271+
- Modern, responsive interface with real-time statistics
272+
- Detailed test information with step-by-step breakdown
273+
- Screenshots, videos, and artifacts display
274+
- BDD/Gherkin support with proper scenario formatting
275+
- Customizable output location and filename
276+
- Optional integration with [Testomat.io](https://testomat.io) cloud
270277

271-
#### BDD/Gherkin Support
278+
### Customization
272279

273-
Full support for Gherkin scenarios with proper feature formatting:
280+
```sh
281+
# Custom output folder
282+
TESTOMATIO_HTML_REPORT_SAVE=1 TESTOMATIO_HTML_REPORT_FOLDER=./reports npx codeceptjs run
274283

275-
![HTML Reporter BDD Details](docs/shared/html-reporter-bdd-details.png)
284+
# Custom filename
285+
TESTOMATIO_HTML_REPORT_SAVE=1 TESTOMATIO_HTML_FILENAME=my-report.html npx codeceptjs run
276286

277-
The HTML reporter generates self-contained reports that can be easily shared with your team. Learn more about configuration and features in the [HTML Reporter documentation](https://codecept.io/plugins/#htmlreporter).
287+
# Integrate with Testomat.io cloud
288+
TESTOMATIO_HTML_REPORT_SAVE=1 TESTOMATIO=your_api_key npx codeceptjs run
289+
```
278290

291+
Learn more in the [Testomat.io Reporter documentation](https://docs.testomat.io/test-reporting/pipes/html/).
279292
## PageObjects
280293

281294
CodeceptJS provides the most simple way to create and use page objects in your test.

docs/plugins.md

Lines changed: 0 additions & 38 deletions
Original file line numberDiff line numberDiff line change
@@ -523,44 +523,6 @@ More config options are available:
523523
524524
* `config` (optional, default `{}`)
525525
526-
## htmlReporter
527-
528-
HTML Reporter Plugin for CodeceptJS
529-
530-
Generates comprehensive HTML reports showing:
531-
532-
* Test statistics
533-
* Feature/Scenario details
534-
* Individual step results
535-
* Test artifacts (screenshots, etc.)
536-
537-
## Configuration
538-
539-
```js
540-
"plugins": {
541-
"htmlReporter": {
542-
"enabled": true,
543-
"output": "./output",
544-
"reportFileName": "report.html",
545-
"includeArtifacts": true,
546-
"showSteps": true,
547-
"showSkipped": true,
548-
"showMetadata": true,
549-
"showTags": true,
550-
"showRetries": true,
551-
"exportStats": false,
552-
"exportStatsPath": "./stats.json",
553-
"keepHistory": false,
554-
"historyPath": "./test-history.json",
555-
"maxHistoryEntries": 50
556-
}
557-
}
558-
```
559-
560-
### Parameters
561-
562-
* `config`  
563-
564526
## pageInfo
565527
566528
Collects information from web page after each failed test and adds it to the test as an artifact.

docs/reports.md

Lines changed: 27 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -236,64 +236,57 @@ codeceptjs run
236236

237237
## Html
238238

239-
### Built-in HTML Reporter
239+
### Testomat.io HTML Reporter
240240

241-
CodeceptJS includes a built-in HTML reporter plugin that generates comprehensive HTML reports with detailed test information.
241+
For modern HTML reports, use **[@testomatio/reporter](https://github.com/testomatio/reporter)** package.
242242

243-
#### Features
243+
#### Installation
244244

245-
- **Interactive Test Results**: Click on tests to expand and view detailed information
246-
- **Step-by-Step Details**: Shows individual test steps with status indicators and timing
247-
- **Test Statistics**: Visual cards showing totals, passed, failed, and pending test counts
248-
- **Error Information**: Detailed error messages for failed tests with clean formatting
249-
- **Artifacts Support**: Display screenshots and other test artifacts with modal viewing
250-
- **Responsive Design**: Mobile-friendly layout that works on all screen sizes
251-
- **Professional Styling**: Modern, clean interface with color-coded status indicators
245+
```sh
246+
npm install @testomatio/reporter --save-dev
247+
```
252248

253249
#### Configuration
254250

255-
Add the `htmlReporter` plugin to your `codecept.conf.js`:
251+
Add the `testomatio` plugin to your `codecept.conf.js`:
256252

257253
```js
258254
exports.config = {
259-
// ... your other configuration
260255
plugins: {
261-
htmlReporter: {
256+
testomatio: {
262257
enabled: true,
263-
output: './output', // Directory for the report
264-
reportFileName: 'report.html', // Name of the HTML file
265-
includeArtifacts: true, // Include screenshots/artifacts
266-
showSteps: true, // Show individual test steps
267-
showSkipped: true, // Show skipped tests
258+
require: '@testomatio/reporter/lib/adapter/codecept',
268259
},
269260
},
270261
}
271262
```
272263

273-
#### Configuration Options
274-
275-
- `output` (optional, default: `./output`) - Directory where the HTML report will be saved
276-
- `reportFileName` (optional, default: `'report.html'`) - Name of the generated HTML file
277-
- `includeArtifacts` (optional, default: `true`) - Whether to include screenshots and other artifacts
278-
- `showSteps` (optional, default: `true`) - Whether to display individual test steps
279-
- `showSkipped` (optional, default: `true`) - Whether to include skipped tests in the report
280-
281264
#### Usage
282265

283-
Run your tests normally and the HTML report will be automatically generated:
266+
Generate HTML reports with environment variable:
284267

285268
```sh
286-
npx codeceptjs run
269+
TESTOMATIO_HTML_REPORT_SAVE=1 npx codeceptjs run
287270
```
288271

289-
The report will be saved to `output/report.html` (or your configured location) and includes:
272+
Report is saved to `html-report/testomatio-report.html`.
273+
274+
#### Configuration Options
275+
276+
Customize report location:
277+
278+
```sh
279+
# Custom folder
280+
TESTOMATIO_HTML_REPORT_SAVE=1 TESTOMATIO_HTML_REPORT_FOLDER=./reports npx codeceptjs run
281+
282+
# Custom filename
283+
TESTOMATIO_HTML_REPORT_SAVE=1 TESTOMATIO_HTML_FILENAME=my-report.html npx codeceptjs run
290284

291-
- Overview statistics with visual cards
292-
- Expandable test details showing steps and timing
293-
- Error messages for failed tests
294-
- Screenshots and artifacts (if available)
295-
- Interactive failures section
285+
# With Testomat.io cloud
286+
TESTOMATIO_HTML_REPORT_SAVE=1 TESTOMATIO=your_api_key npx codeceptjs run
287+
```
296288

289+
For more details, see [documentation](https://docs.testomat.io/test-reporting/pipes/html/).
297290
### Mochawesome
298291

299292
Best HTML reports could be produced with [mochawesome](https://www.npmjs.com/package/mochawesome) reporter.
-540 KB
Binary file not shown.
-356 KB
Binary file not shown.
-362 KB
Binary file not shown.
-371 KB
Binary file not shown.

lib/command/init.js

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -20,9 +20,6 @@ const defaultConfig = {
2020
helpers: {},
2121
include: {},
2222
plugins: {
23-
htmlReporter: {
24-
enabled: true,
25-
},
2623
},
2724
}
2825

0 commit comments

Comments
 (0)