Only run specific test
Is it possible to specify the test to be executed directly in the command?
I would like to execute only the unit test associated with the specified code file.
For Example:
dart run mutation_test lib/code_file.dart -test lib/code_file_test.dart
For those who are interested. I have found a workaround. I write the following with the widget to test in a cfg.xml:
Than I run the test with the following command: dart run mutation_test /path/to/widget.dart --rules tmp.cfg.xml --builtin --format none
It won't work if you want to use the mutation test in a CI environment.
If you try adding the following code to the flutter test $(echo $(git diff --name-only HEAD HEAD~1 | grep "test.dart$" | tr '\n' ' **'))**
The _addCommand method will split it by blank spaces, causing the code to malfunction:
https://github.com/domohuhn/mutation-test/blob/71052092245a28cb4dace752ac63c0736a652c4b/lib/src/configuration/configuration.dart#L303
note: the Proccess.start() method should work if you pass the files argument with double quotes, but because of the split it is not possible.
is there any workaround for this? is it possible to pass a string of files to test or specify a split pattern for commands?