From 0bf1137f007652ae97fdc00f251a3deca64f5d8b Mon Sep 17 00:00:00 2001 From: Yu Xia Date: Fri, 13 Jan 2023 10:22:44 -0800 Subject: [PATCH] Add test definition in readme (#3807) --- CONTRIBUTING.md | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index ca6423c2c8a..14bf9fe2316 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -50,7 +50,12 @@ make bins Please check the top of our [Makefile](Makefile) for other useful build targets. ## Run tests -Tests require runtime dependencies. They can be run with `start-dependencies` target (uses `docker-compose` internally). Open new terminal window and run: +We defined three categories of tests. +* Unit test: Those tests should not have dependencies other than the test target and go mock. We should have unit test coverage as much as possible. +* Integration test: Those tests cover the integration between the server and the dependencies (Cassandra, SQL, ES etc.). +* Functional test: Those tests cover the E2E functionality of Temporal server. They are all under ./tests directory. + +Integration and functional tests require runtime dependencies. They can be run with `start-dependencies` target (uses `docker-compose` internally). Open new terminal window and run: ```bash make start-dependencies ``` @@ -70,6 +75,11 @@ Run all integration tests: make integration-test ``` +Run all functional tests: +```bash +make functional-test +``` + Or run all the tests at once: ```bash make test