From d5283a2b7a9f12a9f34152c595755a256eaacf0b Mon Sep 17 00:00:00 2001 From: Peter Law Date: Tue, 7 Jan 2020 20:11:47 +0000 Subject: [PATCH 1/3] Explicitly clarify the difference between unit and system test files This aims to clarify for new contributors how to run the tests they've may have edited. --- CONTRIBUTING.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index ed910f9fdbe4..8c7fb8e3a0ab 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -74,6 +74,8 @@ Use the `Extension` launch option. ### Running Unit Tests +Note: Unit tests are those in files with extension `.unit.test.ts`. + 1. Make sure you have compiled all code (done automatically when using incremental building) 1. Ensure you have disabled breaking into 'Uncaught Exceptions' when running the Unit Tests 1. For the linters and formatters tests to pass successfully, you will need to have those corresponding Python libraries installed locally @@ -99,6 +101,8 @@ Alter the `launch.json` file in the `"Debug Unit Tests"` section by setting the ### Running System Tests +Note: System tests are those in files with extension `.test.ts` but which are not `.unit.test.ts`. + 1. Make sure you have compiled all code (done automatically when using incremental building) 1. Ensure you have disabled breaking into 'Uncaught Exceptions' when running the Unit Tests 1. For the linters and formatters tests to pass successfully, you will need to have those corresponding Python libraries installed locally by using the `./requirements.txt` and `build/test-requirements.txt` files From b0d0fcab2085b4673b1379b3cefe04d3cd09ecdb Mon Sep 17 00:00:00 2001 From: Peter Law Date: Tue, 7 Jan 2020 21:29:50 +0000 Subject: [PATCH 2/3] There can be more than just `.test.ts` For example: `.testvirtualenvs.ts`. --- CONTRIBUTING.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 8c7fb8e3a0ab..e8c49df17060 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -101,7 +101,7 @@ Alter the `launch.json` file in the `"Debug Unit Tests"` section by setting the ### Running System Tests -Note: System tests are those in files with extension `.test.ts` but which are not `.unit.test.ts`. +Note: System tests are those in files with extension `.test*.ts` but which are not `.unit.test.ts`. 1. Make sure you have compiled all code (done automatically when using incremental building) 1. Ensure you have disabled breaking into 'Uncaught Exceptions' when running the Unit Tests From f6a9b104e0e08cc3cbdc57f537c5f4025327f20e Mon Sep 17 00:00:00 2001 From: Peter Law Date: Thu, 16 Jan 2020 21:11:42 +0000 Subject: [PATCH 3/3] Also mention functional tests --- CONTRIBUTING.md | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index e8c49df17060..df26e7113594 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -99,9 +99,19 @@ Alter the `launch.json` file in the `"Debug Unit Tests"` section by setting the ``` ...this will only run the suite with the tests you care about during a test run (be sure to set the debugger to run the `Debug Unit Tests` launcher). +### Running Functional Tests + +Functional tests are those in files with extension `.functional.test.ts`. +These tests are similar to system tests in scope, but are run like unit tests. + +You can run functional tests in a similar way to that for unit tests: + +* via the "Functional Tests" launch option, or +* on the command line via `npm run test:functional` + ### Running System Tests -Note: System tests are those in files with extension `.test*.ts` but which are not `.unit.test.ts`. +Note: System tests are those in files with extension `.test*.ts` but which are neither `.functional.test.ts` nor `.unit.test.ts`. 1. Make sure you have compiled all code (done automatically when using incremental building) 1. Ensure you have disabled breaking into 'Uncaught Exceptions' when running the Unit Tests