WebStorm 运行 所有 dart 单元测试
WebStorm run all dart unit tests
在 WebStorm 11 中,我想创建一个 运行 配置,其中 运行 是我项目中的所有飞镖测试。
但是在 "Dart Test" 配置模板中没有执行此操作的选项。唯一的选项是:
- 测试种类:全档、测试组、单测
- 测试文件:必须指向一个.dart文件,否则我得到"Dart file is not found"
- VM 选项(文本输入)
如果我将 WebStorm 指向单个测试文件,此命令将在测试中执行 window:
C:\path\to\dart\bin\dart.exe --ignore-unrecognized-flags --checked --trace_service_pause_events file:\\C:\path\to\dart\bin\snapshots\pub.dart.snapshot run test:test -r json C:/path/to/project/test/someclass_test.dart
我不想为每个单元测试创建运行配置class我写的,一定有更好的方法。
目前我更喜欢导航到项目目录 运行
pub run test:test
这 运行 存在于以 _test.dart 结尾的文件中的所有测试,这正是我想要的。更多信息在这里:https://github.com/dart-lang/test#running-tests
WebStorm 中没有为 dart 开发人员提供这样的选项吗?
我猜目前不支持。
运行 以这种方式测试的功能无论如何都是很新的。
如果您认为此功能很重要,请在 https://youtrack.jetbrains.com/issues/WEB
中创建一个功能请求
根据 WEB-14747 票据,此功能已在下一个主要版本中实现。
您可以尝试最新的 WebStorm v12 的 EAP 版本 here.
在 WebStorm 11 中,我想创建一个 运行 配置,其中 运行 是我项目中的所有飞镖测试。
但是在 "Dart Test" 配置模板中没有执行此操作的选项。唯一的选项是:
- 测试种类:全档、测试组、单测
- 测试文件:必须指向一个.dart文件,否则我得到"Dart file is not found"
- VM 选项(文本输入)
如果我将 WebStorm 指向单个测试文件,此命令将在测试中执行 window:
C:\path\to\dart\bin\dart.exe --ignore-unrecognized-flags --checked --trace_service_pause_events file:\\C:\path\to\dart\bin\snapshots\pub.dart.snapshot run test:test -r json C:/path/to/project/test/someclass_test.dart
我不想为每个单元测试创建运行配置class我写的,一定有更好的方法。
目前我更喜欢导航到项目目录 运行
pub run test:test
这 运行 存在于以 _test.dart 结尾的文件中的所有测试,这正是我想要的。更多信息在这里:https://github.com/dart-lang/test#running-tests
WebStorm 中没有为 dart 开发人员提供这样的选项吗?
我猜目前不支持。
运行 以这种方式测试的功能无论如何都是很新的。
如果您认为此功能很重要,请在 https://youtrack.jetbrains.com/issues/WEB
中创建一个功能请求根据 WEB-14747 票据,此功能已在下一个主要版本中实现。
您可以尝试最新的 WebStorm v12 的 EAP 版本 here.