Skip to content

Commit

Permalink
enhance docs on custom plugins - fixes #7705
Browse files Browse the repository at this point in the history
  • Loading branch information
christian-bromann committed Nov 22, 2021
1 parent 3a1068c commit dae751c
Show file tree
Hide file tree
Showing 3 changed files with 34 additions and 7 deletions.
10 changes: 4 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,10 @@ The maintainers of WebdriverIO and thousands of other packages are working with

## :package: Packages

This repository contains some of the core packages of the WebdriverIO project. There are many wonderful [curated resources](https://github.com/webdriverio-community/awesome-webdriverio) the WebdriverIO community has put together.

__Did you build a WebdriverIO service or reporter?__ That's awesome! Please add it to our configuration wizard and docs (e.g. like in [this example commit](https://github.com/webdriverio/webdriverio/commit/3cb5937b968dfe93cf78871589019736a6c98d9e)) as well as to our [awesome-webdriverio](https://github.com/webdriverio-community/awesome-webdriverio) list. Thank you! 🙏 ❤️

### Core

- [webdriver](https://github.com/webdriverio/webdriverio/tree/main/packages/webdriver) - A Node.js bindings implementation for the W3C WebDriver and Mobile JSONWire Protocol
Expand Down Expand Up @@ -111,12 +115,6 @@ The maintainers of WebdriverIO and thousands of other packages are working with
- [@wdio/smoke-test-service](https://github.com/webdriverio/webdriverio/tree/main/packages/wdio-smoke-test-service) - A WebdriverIO utility to smoke test services for internal testing purposes
- [@wdio/webdriver-mock-service](https://github.com/webdriverio/webdriverio/tree/main/packages/wdio-webdriver-mock-service) - A WebdriverIO service to stub all endpoints for internal testing purposes

## :package: Community

There are many wonderful curated resources the WebdriverIO community has put together.

- [awesome-webdriverio](https://github.com/webdriverio-community/awesome-webdriverio) - A curated list of awesome WebdriverIO resources, libraries, tools and applications

## :handshake: Project Governance

This project is maintained by [awesome people](/AUTHORS.md) following a common [set of rules](/GOVERNANCE.md) and treating each other with [respect and appreciation](/CODE_OF_CONDUCT.md).
Expand Down
29 changes: 29 additions & 0 deletions website/docs/CustomReporter.md
Original file line number Diff line number Diff line change
Expand Up @@ -162,3 +162,32 @@ export default class SumoLogicReporter extends WDIOReporter {
```
This way the runner will wait until all log information are uploaded.
## Publish Reporter on NPM
To make reporter easier to consume and discover by the WebdriverIO community, please follow these recommendations:
* Services should use this naming convention: `wdio-*-reporter`
* Use NPM keywords: `wdio-plugin`, `wdio-reporter`
* The `main` entry should `export` an instance of the reporter
* Example reporter: [`@wdio/dot-service`](https://github.com/webdriverio/webdriverio/tree/main/packages/wdio-dot-reporter)
Following the recommended naming pattern allows services to be added by name:
```js
// Add wdio-custom-reporter
exports.config = {
// ...
reporter: ['custom'],
// ...
}
```
### Add Published Service to WDIO CLI and Docs
We really appreciate every new plugin that could help other people run better tests! If you have created such a plugin, please consider adding it to our CLI and docs to make it easier to be found.
Please raise a pull request with the following changes:
- add your service to the list of [supported reporters](https://github.com/webdriverio/webdriverio/blob/main/packages/wdio-cli/src/constants.ts#L74-L91)) in the CLI module
- enhance the [reporter list](https://github.com/webdriverio/webdriverio/blob/main/scripts/docs-generation/3rd-party/reporters.json) for adding your docs to the official Webdriver.io page
2 changes: 1 addition & 1 deletion website/docs/CustomServices.md
Original file line number Diff line number Diff line change
Expand Up @@ -173,5 +173,5 @@ We really appreciate every new plugin that could help other people run better te

Please raise a pull request with the following changes:

- add your service to the list of [supported services](https://github.com/webdriverio/webdriverio/blob/main/packages/wdio-cli/src/constants.ts#L83-L111)) in the CLI module
- add your service to the list of [supported services](https://github.com/webdriverio/webdriverio/blob/main/packages/wdio-cli/src/constants.ts#L92-L128)) in the CLI module
- enhance the [service list](https://github.com/webdriverio/webdriverio/blob/main/scripts/docs-generation/3rd-party/services.json) for adding your docs to the official Webdriver.io page

0 comments on commit dae751c

Please sign in to comment.