question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Re-Running the last test in VS Code

See original GitHub issue

In our workflow, developers work on the test that’s home in test/component_test.dart. The file contains a main() method and a root group, 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 simple Control-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?

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:9 (8 by maintainers)

github_iconTop GitHub Comments

3reactions
DanTupcommented, Apr 20, 2020

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!

1reaction
HerrNiklasRaabcommented, Apr 17, 2020

I some sense not having the rerun last test option destroys a bit my workflow. Example Szenario:

  • You write a test
  • You write a bit implementation code
  • You run the test
  • You write a bit implementation code
  • You rerun the last debug session
  • You write a bit implementation code
  • You rerun the last debug session

  • Now you start the app because you want to see those changes in action
  • You write a bit implementation code, because something didn’t work
  • Now I would like to rerun the last test, but this is not possible, because the last debug session was starting the app.

Do I miss something here? How would this be possible with the current version?

Read more comments on GitHub >

github_iconTop Results From Across the Web

Keyboard shortcut for debugging the LAST test run in Visual ...
If you are using ReSharper, you can use Ctrl + U , D to rerun ...
Read more >
Testing Python in Visual Studio Code
Running the unit test early and often means that you quickly catch ... Test: Rerun Last Run, Debug tests that were executed in...
Read more >
Testing Extensions - Visual Studio Code
Visual Studio Code supports running and debugging tests for your extension. These tests will run inside ... Downloads and unzips latest version of...
Read more >
Debugging in Visual Studio Code
To bring up the Run and Debug view, select the Run and Debug icon in the Activity Bar on the side of VS...
Read more >
Java Testing in Visual Studio Code
Run/Debug test cases ... The Test Runner for Java extension will generate shortcuts (the green play button) on the left side of the...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found