Download Visual Studio Marketplace
List of Features
How to Configure
Build
Contribution
Discover tests, Run specific tests, Inspect results, Debug, Open test location.
When the extension is enabled it will automatically open the Test Explorer. All tests that have been discovered will show on the Test Explorer just like on the image below
As you run, write, and rerun your tests, Test Explorer displays the results in default groups depending upon your selected group by filter.
- Outcome - Tests are grouped by - Failed Tests, Passed Tests and Skipped Tests
- Duration - Tests are grouped by - Slow, Medium and Fast
- File - Tests are grouped by File Name
You can run all the tests in the solution, all the tests in a group, or a set of tests that you select. Do one of the following:
- To run all the tests in a solution, click on the ... and choose Run All or Debug All.
- To run a specific test right click the test and select Run Selected Test or Debug Selected Test
- To run a specific group of test right click the test group and select Run Selected Test or Debug Selected Test
As you run, write, and rerun your tests, Test Explorer is automatically updated and displays the results using color code icons. To view more details about the test just click on the test and the Test Result output pane will open showing the test results.
The result will be displayed on the output window
To display the source code for a test method in the Visual Studio Code editor you only need to left click the test.
NodeJS > 6.0 for Running Mocha Tests
This extension contributes the following settings:
"unit.test.mocha" : {
"glob": "test/**/*.js",
"opts": "/Test/mocha.opts",
"mochaPath": "node_module/mocha"
},
"unit.test.watchInterval" : 3000,
"unit.test.enableCodeLens" : true,
"unit.test.enable" : true,
unit.test.watchInterval
: Define the minimum amount of time required before dispatch a file change message and discover the testsunit.test.enableCodeLens
: Enable the code lens provider for run|debug testsunit.test.enable
: Enable the unit test plugin
unit.test.mocha.glob
: Optional Mocha Glob pattern used to find test files. By default the extension will use the glob pattern "test/**/*.js"unit.test.mocha.opts
: Optional Mocha Opts Path Relative path to the workspace. By default the extension will search for mocha.opts under you test directoryunit.test.mocha.mochaPath
: Optional Mocha relative or full path to the installed mocha module. By default the extension will search the node_modules of you project
Mocha.opts is supported but currently only --ui, --timeout and --require are respected
Fix end of debug test failure
Add CodeLens (run, debug) Add command Stop Running Tests Fix test status bug when debugger is stopped but the test was still running Refresh test explorer/Restart test explorer now clears the current list of tests Test files that are modified are now watched and test are rediscovered Listen for vscode settings changes
Fix bug for running typescript tests
Fix bug when retrieving the default settings of the mocha provider
Improve debug protocol Add command Debug All
Major changes in the protocol to exchange information between server and client Now the mocha provider is almost a fully extension plugin Configuration of the plugin is now handled by each extension. Bug fixes
Release bug fixes (package missing)
Add missing skipped tests to the outcome group by view Perfomance improvements Improve how test cases run are handled (join test cases that are from the same file) Implement run all tests command Fix grep calculation bug Fix mochatestfinder bugs Cleanup
Beta Initial release
Interested in contributing to this project? Check out below the ways to contribute and make this project better.
- Submit a bug report or feature suggestion through the GitHub Issue Tracker
- Review the source code changes
- Submit a code fix for a bug
To build the extension, run the following command from the root of the repository:
npm build
This command will create the out\src and out\test folders at the root of the repository.