You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Dart: Run All Tests - producing strange test hierarchy and results #3603
Describe the bug
In a multi package workspace consisting of an app and some libraries, when running the extensions Dart: Run All Tests the resulting hierarchy in the the testing panel is strange or wrong. Some tests look like they've been skipped, the tests under the file name are wrong or don't exist. Causing lots of issues identifying and fixing failing tests in a larger project. Only started happening after upgrading extension. Same weird output whether you are having Use VS Code test runner enabled or not.
This also introduces issues where you would right click on what you would expect to be a test under that file and click Go To Test only to have it point to the bottom of a file. Or tap Run test only to have the console spit out something like (No tests match regular expression "^adds one( (variant: .*))?$".)
To Reproduce
Steps to reproduce the behavior:
Open the repro_workspace folder in vs code
Execute Dart: Run All Tests
Expected behavior
The test files should be the top of the collapsable section with the tests within that file actually shown underneath with their success or failure status.
Screenshots
Versions (please complete the following information):
VS Code version: Version: 1.61.0
Commit: ee8c7def80afc00dd6e593ef12f37756d8f504ea
I was able to trim the repro down to just a simple folder with two tests and still see this:
It looks like we assume we'll get a Suite event before each suite runs, and there will be no overlap, but I'm no longer certain that's a good assumption - though shouldn't be too complicated to remove/fix.
@moonytoes29 still working on it. The fix is in master which is why this closed, but I'm still testing it cherry-picked into a patch of 3.27. I'm hopeful it won't be long though :-)
Activity
DanTup commentedon Oct 11, 2021
I was able to trim the repro down to just a simple folder with two tests and still see this:
It looks like we assume we'll get a Suite event before each suite runs, and there will be no overlap, but I'm no longer certain that's a good assumption - though shouldn't be too complicated to remove/fix.
up-doc commentedon Oct 11, 2021
@DanTup - so if this has been closed. Do we have a patch release ETA?
DanTup commentedon Oct 11, 2021
@moonytoes29 still working on it. The fix is in
masterwhich is why this closed, but I'm still testing it cherry-picked into a patch of 3.27. I'm hopeful it won't be long though :-)Remove assumptions about suite/tests running sequentially
DanTup commentedon Oct 11, 2021
This should be fixed in v3.27.2. Please let me know if you still see issues (or confirm it's resolved). Thanks!