Improve the quality of your code by accelerating your coding/testing workflow ๐
- Create a matching
{xyz}_test.dart
file with customized boilerplate test inside - Switch between the implementation and test files with a shortcut
- Run tests for the code you're refactoring without leaving the source file
- Use handy test snippets
- Keep
lib
andtest
directories in sync after renaming or moving the file in either
Command | Shortcut | Description |
---|---|---|
Go to tests | Ctrl+Shift+T โ+Shift+T |
Switch to the matching test file. The extension will create the test file, if necessary, after asking for the use-case. |
Go to source file | Ctrl+Shift+T โ+Shift+T |
Switch to the source file. |
Run tests for file | Ctrl+Alt+Shift+R โฅ+โ+Shift+R |
Executes all tests for the matching source file. |
Generate test coverage | None | Executes all tests to gather test coverage information. |
Toggle test coverage highlights | Ctrl+Alt+Shift+C โฅ+โ+Shift+C |
Shows/Hides text editor line decorations indicating test coverage. |
Snippet prefix | Result |
---|---|
ftest |
Unit test |
fwidgettest |
Widget test |
fgroup |
Group of tests |