diff --git a/test/README.md b/test/README.md index cad17e421e9..60860e3f523 100644 --- a/test/README.md +++ b/test/README.md @@ -2,9 +2,7 @@ ## Run -The best way to run the Code tests is from within VS Code. Simply pressF1, type "run test" and press enter to launch the tests. To make development changes to unit tests you need to be running `gulp`. See [Development Workflow](https://github.com/Microsoft/vscode/wiki/How-to-Contribute#incremental-build) for more details. - -If you wish to run the tests from a terminal, from the `vscode` folder run: +The best way to run the Code tests is from the terminal. To make development changes to unit tests you need to be running `gulp`. 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** @@ -14,9 +12,12 @@ If you wish to run the tests from a terminal, from the `vscode` folder run: scripts\test + ## Debug -You can use VS Code to debug your tests. Switch to the Debug viewlet, pick the `Unit Tests` debug target and press `Play`. +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 diff --git a/test/electron/index.js b/test/electron/index.js index 97529b3f84d..def0f881a7d 100644 --- a/test/electron/index.js +++ b/test/electron/index.js @@ -13,7 +13,7 @@ const events = require('events'); const optimist = require('optimist') .describe('grep', 'only run tests matching ').alias('grep', 'g').alias('grep', 'f').string('grep') .describe('run', 'only run tests from ').string('run') - .describe('runGlob', 'only run tests matching ').boolean('runGlob').alias('runGrep') + .describe('runGlob', 'only run tests matching ').alias('runGlob', 'runGrep').string('runGlob') .describe('build', 'run with build output (out-build)').boolean('build') .describe('coverage', 'generate coverage report').boolean('coverage') .describe('debug', 'open dev tools, keep window open, reuse app data').string('debug')