Skip to content
Snippets Groups Projects
Unverified Commit 84d13d18 authored by Filip Hric's avatar Filip Hric Committed by GitHub
Browse files

Add snowplow to e2e docs (#47765)


* add snowplow mention to e2e docs

* tweak new snowplow doc page to be more in line with old section

* Update docs/developers-guide/e2e-tests.md

Co-authored-by: default avatarUladzimir Havenchyk <125459446+uladzimirdev@users.noreply.github.com>

---------

Co-authored-by: default avatarUladzimir Havenchyk <125459446+uladzimirdev@users.noreply.github.com>
parent 1869c83f
No related branches found
No related tags found
No related merge requests found
......@@ -149,9 +149,24 @@ yarn test-cypress-open-qa
Tests that depend on Snowplow expect a running server. To run them, you need to:
- run Snowplow locally: `docker-compose -f ./snowplow/docker-compose.yml up -d`
- pass env variables to the test run: `MB_SNOWPLOW_AVAILABLE=true MB_SNOWPLOW_URL=http://localhost:9090 yarn test-cypress-open`
## Testing with Snowplow
Our end-to-end testing environment has been configured to run Snowplow Micro alongside the application.
To run Snowplow locally use the following commands:
```
docker-compose -f ./snowplow/docker-compose.yml up -d
export MB_SNOWPLOW_AVAILABLE=true
export MB_SNOWPLOW_URL=http://localhost:9090
```
1. You can use `describeWithSnowplow` (or `describeWithSnowplowEE` for EE edition) method to define tests that only run when a Snowplow instance is running
2. Use `resetSnowplow()` test helper before each test to clear the queue of processed events.
3. Use `expectGoodSnowplowEvents(count)` to assert that events have been sent and processed correctly. Use `expectGoodSnowPlowEvent({ ...payload})` to assert on the content of a snowplow event
4. Use `expectNoBadSnowplowEvents()` after each test to assert that no invalid events have been sent.
### Running tests that require SMTP server
Some of our tests, that depend on the email being set up, require a local SMTP server. We use `maildev` Docker image for that purpose. At the time of this writing the image we use is `maildev/maildev:2.1.0`. It should be safe to always use the `:latest` image in your local development. Run this command:
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment