WebStorm 2017.1 Help

Testing Dart

On this page:

Before you start

  1. Make sure the Dart development environment is configured, see Preparing for Dart Development.
  2. Make sure the Dart plugin is activated. The plugin is bundled with WebStorm and activated by default. If the plugin is not activated, enable it on the Plugins page of the Settings / Preferences Dialog as described in Enabling and Disabling Plugins.

Creating a Dart test run configuration

  1. Choose Run | Edit Configuration on the main menu
  2. In the Edit Configuration dialog box that opens, click the Add New Configuration toolbar button add.png, and choose Dart Test on the context menu.
  3. In the Run/Debug Configuration: Dart Test dialog that opens, specify the name of the configuration and the scope of the tests to execute. The available options are:
    • All in File: choose this option to to have WebStorm run all the test methods in a file and specify this file in the Test File text box.
    • All in Folder: choose this option to to have WebStorm run all the test methods from the files stored in a folder and specify this folder in the Test Folder text box.
    • Group or test by name: choose this option to to have WebStorm run a specific tast or a group of tests.
      • In the Test File text box, specify the file where the test or the group is defined.
      • In the Group or Test Name text box, type the name of the test or the group of tests to execute.
      See more about grouping tests at https://www.dartlang.org/articles/dart-unit-tests/#grouping-tests.

See Also

Last modified: 17 July 2017