Skip to content

Commit

Permalink
touch a word about e2e tests in readme
Browse files Browse the repository at this point in the history
  • Loading branch information
m5r committed Jul 11, 2024
1 parent 116d5b2 commit ebbd7e9
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -303,8 +303,20 @@ To develop a new action or improve an existing one, check the ["Actions" doc](sr

## Testing

### Unit tests

Execute `npm test` to run static analysis checks and the test suite. Requires Docker to run integration tests against a CouchDB instance.

### End-to-end tests

Run `npm run e2e-test` to run the end-to-end test suite against an actual CHT instance locally.
These tests rely on [CHT Docker Helper](https://docs.communityhealthtoolkit.org/hosting/4.x/app-developer/#cht-docker-helper-for-4x)
to spin up and tear down an instance locally.

The code interfacing with CHT Docker Helper lives in [`test/e2e/cht-docker-utils.js`](./test/e2e/cht-docker-utils.js).
You should rely on the API exposed by this file to orchestrate CHT instances for testing purposes.
It is preferable to keep the number of CHT instances orchestrated in E2E tests low as it takes a non-negligible amount of time to spin up an instance and can quickly lead to timeouts.

## Executing your local branch

1. Clone the project locally
Expand Down

0 comments on commit ebbd7e9

Please sign in to comment.