-
Notifications
You must be signed in to change notification settings - Fork 340
Description
Is your feature request related to a problem? Please describe.
I want to customize the execution of some flutter tests on my development machine. For example, there are some tests I don't want to run locally, only in a CI environment. I could achieve this by adding --exclude-tags my-tag args to the flutter test command of the extension. Another example is, that I would love to add --coverage flag to the flutter test command, to generate test coverage report.
Describe the solution you'd like
The existing list of ...AdditionalArgs configuration properties (flutterAdditionalArgs, pubAdditionalArgs, analyzerAdditionalArgs, vmAdditionalArgs, buildRunnerAdditionalArgs) could be extended by the proposed flutterTestAdditionalArgs, whose value would be added to the args of the flutter test command.
Describe alternatives you've considered
- I tried to add
--coveragetoflutterAdditionalArgs, which worked for the tests, but made the regular debug sessions fail - I tried to use
dart_test.yaml, though currently flutter test doesn't support profiles, so I cannot create distinct environment for the development and the CI - I created the following launch configuration and added the extra args there, but it did not have impact on other ways I can launch tests (e.g. using the
Dart: Run all Testscommand or clicking theDebugbutton above the declaration of the test group)
{
"name": "Run tests",
"type": "dart",
"request": "launch",
"program": "./test/",
"args": ["--coverage", "exclude_tags", "my-tag"]
},