Skip to content
Open
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
1 change: 1 addition & 0 deletions .eslintignore
Original file line number Diff line number Diff line change
Expand Up @@ -16,3 +16,4 @@ hot
tmp
**/playwright-report
**/html-report/*
examples/**
47 changes: 47 additions & 0 deletions examples/random-number-plugin-example/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
# HTML Reporter Plugin Example

## What it does

Adds a collapsible "Random Number" section to test results that fetches a random number from the server when expanded.

![Screenshot](plugin-screenshot.png)

## Project Structure

```
├── ui/ # Frontend plugin (React + Redux)
├── server/ # Express middleware
├── preset-for-config/ # Config preset factory
└── package.json
```

## Building

```bash
npm install
npm run build
```

## Usage

1. Install the plugin in your project (or link it locally using `npm link random-number-plugin-example` for development)

2. Update your `testplane.config.ts`:

```ts
import randomNumberPluginUI from 'random-number-plugin-example';

export default {
// ... other config
plugins: {
'html-reporter/testplane': {
enabled: true,
// Enable plugins and add plugin preset to html-reporter config
pluginsEnabled: true,
plugins: randomNumberPluginUI(),
},
},
};
```

3. Run your tests with html-reporter enabled — the plugin section will appear in test results.
Loading
Loading