From a9c4a4397cb0eb89db426afa20f8b66844adaeb2 Mon Sep 17 00:00:00 2001 From: Benjamin Pasero Date: Fri, 7 Feb 2020 10:09:22 +0100 Subject: [PATCH] tests - move readme around --- test/README.md | 36 ++++++------------------------------ test/unit/README.md | 45 +++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 51 insertions(+), 30 deletions(-) create mode 100644 test/unit/README.md diff --git a/test/README.md b/test/README.md index bccc0fa5c18..aa3070a7587 100644 --- a/test/README.md +++ b/test/README.md @@ -1,32 +1,8 @@ -# Tests +# VSCode Tests -## Run +## Contents -The best way to run the Code tests is from the terminal. To make development changes to unit tests you need to be running `yarn run watch`. See [Development Workflow](https://github.com/Microsoft/vscode/wiki/How-to-Contribute#incremental-build) for more details. From the `vscode` folder run: - -**OS X and Linux** - - ./scripts/test.sh - -**Windows** - - scripts\test - - -## Debug - -To debug tests use `--debug` when running the test script. Also, the set of tests can be reduced with the `--run` and `--runGlob` flags. Both require a file path/pattern. Like so: - - ./scripts/test.sh --debug --runGrep **/extHost*.test.js - -## Coverage - -The following command will create a `coverage` folder at the root of the workspace: - -**OS X and Linux** - - ./scripts/test.sh --coverage - -**Windows** - - scripts\test --coverage +This folder contains the various test runners for VSCode. Please refer to the documentation within for how to run them: +* `unit`: our suite of unit tests +* `integration`: our suite of API tests +* `smoke`: our suite of UI tests diff --git a/test/unit/README.md b/test/unit/README.md new file mode 100644 index 00000000000..96d866fe6ad --- /dev/null +++ b/test/unit/README.md @@ -0,0 +1,45 @@ +# Unit Tests + +## Run (inside Electron) + +The best way to run the unit tests is from the terminal. To make development changes to unit tests you need to be running `yarn watch`. See [Development Workflow](https://github.com/Microsoft/vscode/wiki/How-to-Contribute#incremental-build) for more details. From the `vscode` folder run: + +**OS X and Linux** + + ./scripts/test.sh + +**Windows** + + scripts\test + + +## Run (inside browser) + +You can run tests inside a browser instance too: + +**OS X and Linux** + + node test/unit/browser/index.js + +**Windows** + + node test\unit\browser\index.js + + +## Debug + +To debug tests use `--debug` when running the test script. Also, the set of tests can be reduced with the `--run` and `--runGlob` flags. Both require a file path/pattern. Like so: + + ./scripts/test.sh --debug --runGrep **/extHost*.test.js + +## Coverage + +The following command will create a `coverage` folder at the root of the workspace: + +**OS X and Linux** + + ./scripts/test.sh --coverage + +**Windows** + + scripts\test --coverage