Skip to content

Commit

Permalink
docs: conformance test suite (#638)
Browse files Browse the repository at this point in the history
  • Loading branch information
dunglas committed Apr 26, 2022
1 parent 3e80677 commit 12d454e
Show file tree
Hide file tree
Showing 3 changed files with 28 additions and 0 deletions.
1 change: 1 addition & 0 deletions docs/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,3 +27,4 @@
* [Using a Mercure Service in Your GitHub Actions](ecosystem/github-actions.md)
* [Using Mercure and Hotwire to Stream Page Changes](ecosystem/hotwire.md)
* [Getting Help](ecosystem/help.md)
* [Conformance Tests](ecosystem/conformance-tests.md)
23 changes: 23 additions & 0 deletions docs/ecosystem/conformance-tests.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
# Conformance Tests

We provide conformance tests to check if a hub is compliant with the Mercure specification.
This test suite is based on [Playwright](https://playwright.dev/).

## Install

1. Clone the repository: `git clone https://github.com/dunglas/mercure`
2. Go in the conformance tests directory: `cd conformance-tests`
3. Install the dependencies: `npm ci`
4. Install Playwright: `npx playwright install --with-deps`
5. Run the test suite: `npx playwright test`

## Configuration

The test suite can be configured by setting environment variables:

* `BASE_URL`: the URL of the hub to test
* `CUSTOM_ID`: enable or disable tests related to custom IDs support

## See Also

* [The load test](../hub/load-test.md)
4 changes: 4 additions & 0 deletions docs/hub/load-test.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,3 +27,7 @@ Available environment variables (all are optional):
* `CONNECTION_DURATION`: duration of subscribers' connection
* `RANDOM_CONNECTION_DURATION`: to randomize the connection duration (will longs `CONNECTION_DURATION` at max)
* `PRIVATE_UPDATES`: to send private updates with random topics instead of public updates always with the same topic

## See Also

* [Conformance tests](../ecosystem/conformance-tests.md)

0 comments on commit 12d454e

Please sign in to comment.