Skip to content

Commit

Permalink
Chore: improve docs
Browse files Browse the repository at this point in the history
  • Loading branch information
filippomc committed Aug 23, 2023
1 parent 6c52985 commit 86d3c86
Showing 1 changed file with 17 additions and 10 deletions.
27 changes: 17 additions & 10 deletions docs/testing.md
Original file line number Diff line number Diff line change
Expand Up @@ -108,23 +108,30 @@ The test can use environmental variables:
Examples:
- [Sample api test](../applications/samples/test/api/test_st.py)

### Common smoke tests

Once a test is created for your application, generic smoke tests are also
executed, checking for:

- Main page is reachable
- No errors in the console
- No error responses from network resources and fetch requests (code < 400)

The smoke tests is defined [in this file](../test/test-e2e/__tests__/common.spec.ts).



## End to end (E2E) tests

End to end tests run in a headless browser ([Puppeteer](https://github.com/puppeteer/puppeteer)) against the full deployment on Kubernetes.

Custom configuration:

```yaml
harness:
...
test:
e2e:
# -- enable/disable e2e tests
enabled: true
# -- ignore errors on console by default
ignoreConsoleErrors: false
# -- ignore fetched resources errors by default
ignoreRequestErrors: false
# -- enable common smoke tests
smoketest: true
```

### Write tests with Jest and Puppeteer

Expand Down Expand Up @@ -159,7 +166,7 @@ executed, checking for:
- No errors in the console
- No error responses from network resources and fetch requests (code < 400)

The smoke tests is defined [in this file](../test/jest-puppeteer/__tests__/common.spec.ts).
The smoke tests are defined [in this file](../test/jest-puppeteer/__tests__/common.spec.ts).


## Run API and E2E tests in the CI/CD pipeline
Expand Down

0 comments on commit 86d3c86

Please sign in to comment.