Exclusive Test Runs

  24 Mar 2020   3 min read

Today we’re excited to announce a new feature for VS Code and JetBrains IDEs called Exclusive Test Run. Use the Start Exclusive Test Run command or context menu item to start Wallaby and only run tests for the selected file or folder without making a configuration change.

Using Exclusive Test Run in VS Code

This new feature is ideal for minimizing Wallaby’s start up times and the number of tests that need to be executed as you change your code and is useful for: large projects with many tests, projects with slower tests, and for when you simply want to focus your efforts on tests within a single file or folder.

After Wallaby has started, you may add more tests found within a file or folder to the Exclusive Test Run using the Add to Exclusive Test Run command. If Wallaby was started normally (without using Start Exclusive Test Run) then the first time Add to Exclusive Test Run is used after start, only the tests for the selected file or folder will be executed.

Using Exclusive Test Run in WebStorm

Wallaby is already super efficient on initial startup (and even more so during incremental runs) thanks to built-in smart parallelization and dependency tracking algorithms and these same mechanisms are used when performing an Exclusive Test Run.

For many years now, Wallaby has supported running a limited set of tests with test framework features such as it.only/describe.only or fit/fdescribe as well as with Wallaby’s file.only special comment. In contrast to these existing features, the Exclusive Test Run feature does not require configuration or file changes to be made to limit which tests Wallaby will run which may make this new feature more convenient for you over the existing mechanisms.

We hope that in conjunction with Test Filtering, the Exclusive Test Run feature improves your testing experience by giving you better control over deciding which tests you want Wallaby to run and by optimizing your test run startup and execution times.

Happy Testing!

Thanks for reading! As usual, we would love to hear your feedback on Twitter, or via our GitHub repo.