From ebbd7e9e6e73c28966b8fa99fe756180cbdda7d8 Mon Sep 17 00:00:00 2001 From: m5r Date: Thu, 11 Jul 2024 22:28:11 +0200 Subject: [PATCH] touch a word about e2e tests in readme --- README.md | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/README.md b/README.md index 7c9b017f..dc01b897 100644 --- a/README.md +++ b/README.md @@ -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