From 12d454e7032d423cdcd3c7aa93b21eaf0ed4715b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?K=C3=A9vin=20Dunglas?= Date: Tue, 26 Apr 2022 17:52:53 +0200 Subject: [PATCH] docs: conformance test suite (#638) --- docs/README.md | 1 + docs/ecosystem/conformance-tests.md | 23 +++++++++++++++++++++++ docs/hub/load-test.md | 4 ++++ 3 files changed, 28 insertions(+) create mode 100644 docs/ecosystem/conformance-tests.md diff --git a/docs/README.md b/docs/README.md index 886ecfa3..076bab86 100644 --- a/docs/README.md +++ b/docs/README.md @@ -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) diff --git a/docs/ecosystem/conformance-tests.md b/docs/ecosystem/conformance-tests.md new file mode 100644 index 00000000..08ce25e8 --- /dev/null +++ b/docs/ecosystem/conformance-tests.md @@ -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) diff --git a/docs/hub/load-test.md b/docs/hub/load-test.md index 812b5ae4..788ec5ed 100644 --- a/docs/hub/load-test.md +++ b/docs/hub/load-test.md @@ -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)