PyCharm 2017.2 Help

Testing Dart

This feature is supported in the Professional edition only.

PyCharm supports running and debugging Dart tests that are written using the dart test package. You can run tests on any target platform, debugging is supported only for VM tests.

You can run and debug single tests, test groups, as well as tests from entire files and folders. PyCharm creates a run/debug configuration with the default settings and a launches the tests. You can later save this configuration for further re-use.

To run or debug a single test
Open the test file in the editor, right-click the call of the test() method, and choose Run '<test_name>' or Debug '<test_name>' on the context menu.

To run or debug a group
Open the test file in the editor, right-click the call of the group() method, and choose Run '<group_name>' or Debug '<group_name>' on the context menu.

To run or debug Dart tests from a file
In the Project view, select the file with the tests to run and choose Run '<file_name>' or Debug '<file_name>' on the context menu.

To run or debug Dart tests from a folder
In the Project view, select the folder with the tests to run and choose Run '<folder_name>' or Debug '<folder_name>' on the context menu.

To save an automatically generated default configuration
After a test session is over, choose Save <default_test_configuration_name> on the context menu of the test, test group, test file, or folder.

To run or debug tests through a previously saved run/debug configuration
Choose the required Dart Test configuration from the list on the tool bar and click /help/img/idea/2017.2/run.png or /help/img/idea/2017.2/debug.png.

See Also

Last modified: 9 August 2017