-
Notifications
You must be signed in to change notification settings - Fork 303
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
Re-Running the last test in VS Code #2285
Comments
There are two commands that may be of interest, though I don't know if they solve your whole need: Dart: Run Test at Cursor Dart: Rerun last debug session ( Do these help? Is here anything missing? |
@DanTup ok, just a few comments: Given a file like this:
Then I can not run the tests for the whole file, but must select group by group. Perhaps it's not standard Dart practice to have more than 1 root-group, not sure. Secondly, "Dart: Rerun last debug session" would always run in "Debug" mode, whereas "Run Test At Cursor" actual has a sibling "Debug At Cursor" to explicitly enable it. |
You can run all tests in a file by pressing
Rerun last debug session should run in the same mode that the last session ran in. All it does is stores the last debug launch config (in its entirety, which includes the
It currently just checks whether it's inside the outline node for that group, so it's working as it was intended, but I think maybe expanding the range to the start of the line if it's only whitespace is probably reasonable (please file a specific issue for this and I'll try to improve it). Thanks! |
That is the conflict I run into a few times. run config is: {
"name": "Flutter",
"request": "launch",
"type": "dart",
"program": "lib/main.dart",
}, I would really want it to just run the test at that moment. Then the editor currently shows any file in Will check the other two items and open issues separately. |
This configuration is explicitly set to run When there's no explicit So, if you delete the |
Ok - that solves it. Thank you for clarifying! |
I some sense not having the rerun last test option destroys a bit my workflow. Example Szenario:
Do I miss something here? How would this be possible with the current version? |
Nothing missed, I think that's a good point. We can probably have a Re-run Last Test command that works the same, but only tracks tests. I'll take a look. Thanks! |
In our workflow, developers work on the test that's home in
test/component_test.dart
. The file contains a main() method and a rootgroup
, which is further split into N subgroups and tests.In Android Studio, I am able to hover the main() function, press
Control-Shift-R
(I'm on a mac) and all tests in that file run. To re-run the same set of tests, a simpleControl-R
is needed.This is immensely helpful to quickly iterate (until flutter testing gains things like a watcher).
However, this workflow currently seems to be impossible in VS Code. Is that a Dart-Code task (to deeply integrate with VS Code testing framework) or is it something else?
The text was updated successfully, but these errors were encountered: