-
Notifications
You must be signed in to change notification settings - Fork 323
Multiple tests execution #4150
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
There are some known limitations in this area. When we run tests, we cannot use the literal name in the source if it contains variables:
We also cannot tell what final foo = DateTime.now().millisecond;
group('$foo', () { So right now, any variable is simple substitute with the regular expression pattern There are plans to improve this though, there were some changes made to Thanks! |
Re-opening this for tracking to ensure this issue is fixed by the upcoming support for running tests by lines. |
In the next release (and the pre-release version just pushed today - v3.63.20240419), you can choose to have tests executed using their line numbers rather than their names. This fixes a number of issues including this one, caused by not always being able to statically compute the exact name of a test. Please let me know if you find any issues with this functionality! |
Describe the bug
Once you're trying to run test, which description contains variable or type used in other test, multiple tests would be executed.
This could be annoying if you're using some kind of BLoC/Redux actions, which types may be located in multiple test descriptions.
Simular issue in
/test
repo: dart-lang/test#1760.There we found out, that the plugin could interprete expressions like
'is $Object'
incorrectly.To Reproduce
Run
'is $Object'
test.Expected behavior
Running
'is $Object'
test, via IDE would execute only selected test.Screenshots


It seems like plugin runs test like this.
Where
$Object
is an empty env. Which means, that we try to run test with'is '
description, which also suits for the second test.Please complete the following information:
The text was updated successfully, but these errors were encountered: