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
48 changes: 48 additions & 0 deletions docs/_partials/html-reporter-config-examples.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
import Tabs from "@theme/Tabs";
import TabItem from "@theme/TabItem";

<Tabs>
<TabItem value="Testplane" label="Testplane">
```javascript title="testplane.config.ts"
export = {
// ...
plugins: {
'html-reporter/testplane': {
enabled: true,
path: 'html-report',
},
},
};
```
</TabItem>

<TabItem value="Playwright" label="Playwright">
```javascript title="playwright.config.ts"
// playwright.config.ts
export default defineConfig({
// ...
reporter: [
['html-reporter/playwright', {
enabled: true,
defaultView: 'failed',
path: 'html-report',
}],
],
});
```
</TabItem>

<TabItem value="Jest" label="Jest">
```javascript title="jest.config.ts"
const config = {
// ...
reporters: [
['html-reporter/jest', {
path: 'html-report',
}]
],
};
```
</TabItem>

</Tabs>
6 changes: 5 additions & 1 deletion docs/html-reporter/html-reporter-api.mdx
Original file line number Diff line number Diff line change
@@ -1,4 +1,8 @@
# Html-Reporter API
---
sidebar_class_name: hidden
---

# HTML Reporter Object

## Overview {#overview}

Expand Down
83 changes: 53 additions & 30 deletions docs/html-reporter/html-reporter-commands.mdx
Original file line number Diff line number Diff line change
@@ -1,15 +1,25 @@
# Html-Reporter Commands
import Admonition from "@theme/Admonition";

# CLI

## Overview {#overview}

The `html-reporter` plugin adds the following commands to Testplane:
HTML Reporter has the following commands:

- [gui](#gui)—to run Testplane in GUI mode;
- [merge-reports](#merge-reports)—to merge multiple reports into one.
- [remove-unused-screens](#remove-unused-screens)—to remove reference screenshots that are not used in tests;
- [merge-reports](#merge-reports)—to merge Testplane's separate reports into one general report.

When using HTML Reporter with Testplane, you can also use commands through Testplane, for example: `npx testplane gui`.

When using with other tools, you need to specify the tool name in the tool argument, for example: `npx html-reporter gui --tool playwright`.

## gui

<Admonition type="info" title="Command availability">
This command is only available when using HTML Reporter with Testplane and Playwright.
</Admonition>

Use the `gui` command to launch Testplane in GUI mode.

GUI mode allows you to:
Expand All @@ -22,11 +32,50 @@ GUI mode allows you to:
### Usage {#gui_usage}

```bash
npx testplane gui
npx html-reporter gui
```

## merge-reports

<Admonition type="info" title="Command availability">
This command is only available when using HTML Reporter with Testplane and Playwright.
</Admonition>

Use the `merge-reports` command to merge multiple reports into one.

The command accepts paths to report directories, database files, or `databaseUrls.json` files.

It creates a new html-report in the destination folder with data from all passed reports.

- When merging local reports—all data, including SQLite databases and screenshots, are copied to the destination directory.
- When merging reports by link (for example, if `databaseUrls.json` files with links to reports in S3 are passed as input)—a report with links to the original reports in `databaseUrls.json` will be created in the destination directory, without downloading and copying all nested resources. When working with the report, this will not be noticeable, but you need to keep in mind that the original reports must remain accessible, as the merged report gets data from them.

### Usage {#merge_reports_usage}

The `merge-reports` command supports the following required option:

<table>
<thead>
<tr><td>**Option**</td><td>**Description**</td></tr>
</thead>
<tbody>
<tr><td>-d, --destination &lt;folder></td><td>The path to the folder where you want to save the final report.</td></tr>

</tbody>
</table>

Usage example:

```bash
npx html-reporter merge-reports report-dir/ path-to-database.db path-to-databaseUrls.json -d dest-report
```

## remove-unused-screens

<Admonition type="info" title="Command availability">
This command is only available when using HTML Reporter with Testplane.
</Admonition>

Use the `remove-unused-screens` command to remove the reference screenshots that are not used in tests.

### How does it work?
Expand Down Expand Up @@ -82,29 +131,3 @@ Getting the reference information about the command:
```bash
npx testplane remove-unused-screens --help
```

## merge-reports

Use the `merge-reports` command to merge Testplane's separate reports into one general report.

The command accepts paths to database files or to `databaseUrls.json` files from other html-reports. It creates a new html-report in the destination folder with a single file `databaseUrls.json`, which will contain a link to the database file or to the files `databaseUrls.json` from the input parameters. Database files are not copied to the destination folder at the same time.

### Usage {#merge_reports_usage}

The `merge-reports` command supports the following required option:

<table>
<thead>
<tr><td>**Option**</td><td>**Description**</td></tr>
</thead>
<tbody>
<tr><td>-d, --destination &lt;folder></td><td>The path to the folder where you want to save the final report.</td></tr>

</tbody>
</table>

Usage example:

```bash
npx testplane merge-reports path-to-database.db path-to-databaseUrls.json -d dest-report
```
4 changes: 4 additions & 0 deletions docs/html-reporter/html-reporter-custom-gui.mdx
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
---
sidebar_class_name: hidden
---

import Admonition from "@theme/Admonition";

# Html-Reporter Customizing GUI
Expand Down
6 changes: 5 additions & 1 deletion docs/html-reporter/html-reporter-events.mdx
Original file line number Diff line number Diff line change
@@ -1,4 +1,8 @@
# Html-Reporter Events
---
sidebar_class_name: hidden
---

# HTML Reporter Events

## Overview {#overview}

Expand Down
2 changes: 1 addition & 1 deletion docs/html-reporter/html-reporter-plugins.mdx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# Html-Reporter Plugins
# HTML Reporter Plugins

## Overview {#overview}

Expand Down
Loading