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
Flutter/Dart Live Unit Testing like in Visual Studio #2878
This would be great to do, but it would really need support from the test package to do (I think it'd also be quite complex to know what tests need re-running after a given change). There's an open issue at dart-lang/test#23 though I'm not sure if it's currently on anyones radar.
Well I'm not sure if it should be on anyones - that's a question about priorities for the test package, of which I don't have any knowledge. Right now there's only two 👍 's on that package:test issue (which are us two 🙂 ) so it's unclear of the demand.
I did just come across flutter/flutter-intellij#3507 though, which as far as I can tell will watch the test file. It's not as good as described above, but maybe there's some value in it? That said, with the "run test at cursor" command that can be keybound, maybe it wouldn't add a huge amount.
It's absolutely not clear that the referenced issue (dart-lang/test#23) would allow for live unit testing when finished. Therefore it's impossible to evaluate the demand based on the referenced issue.
A more general question:
When for example this issue would gain a lot of upvotes, but needs functionality from another repo (e.g. language server, test package, flutter), does this has any influence on the priority of the according repo where the functionality needs to be implemented?
It's absolutely not clear that the referenced issue would allow for live unit testing when finished
That's fair - the linked issue is a little vague - though dart-lang/test#112 was a little clearer and folded into that issue as a duplicate. I think there are really two parts:
package:test has some sort of watch support to re-run tests when things change (this would be some long-running process, rather than the current way which is a cold start each time you want to run tests)
The watch supports gets more clever about what tests to re-run as you make changes (I think this is much more tricky, but definitely a significantly better feature)
But if some sort of server-mode was to be implemented, there are a lot of other annoyances that may make sense to wrap up in a fix (for example resoling issues like dart-lang/test#908, dart-lang/test#837, dart-lang/test#1216, and getting a list of tests without having to first run them). It would make the job bigger, but could address a bunch of things.
Testing is something I think there's room to improve (and I have been trying to improve things incrementally - there have been quite a few improvements in the past few releases, and hopefully there will be many more if people keep filing suggestions :-)).
When for example this issue would gain a lot of upvotes, but needs functionality from another repo (e.g. language server, test package, flutter), does this has any influence on the priority of the according repo where the functionality needs to be implemented?
I'm not sure how well I can answer that. Other projects have their own priorities and I don't have much visibility of that beyond what's public (I'm not a Googler and most of my interaction with those teams is via GitHub/Gerrit although I do have some calls with some teams there). I'd imagine if there is a lot of demand for a feature (whether it's in this repo or their own) that it would be considered, though I also suspect it's usually not a case of "should we do this" but rather "of all these great ideas, which ones deliver the most value or can we acheive with the available developers".
@DanTup I notice that you've closed #5076 (comment) as a duplicate but I just want to check that the intention with this issue would also be about a command-line feature not just for IDEs?
https://github.com/szotp/hottie looks like it's related to a running app which doesn't help with non-widget tests and pure dart code unless I'm missing something...?
@DanTup I notice that you've closed #5076 (comment) as a duplicate but I just want to check that the intention with this issue would also be about a command-line feature not just for IDEs?
This issue tracker / repo is purely for the VS Code extension and there is no command line interface to it. However, implementing this feature likely requires work in dart and or pkg:test because it's unlikely the extension could make good decisions about which tests to re-run when files are modified.
That is unfortunate, and it might prevent implementing this for Flutter. However, I still think it's a fair request and worth tracking here (for example to collect 👍 s on).
Activity
DanTup commentedon Oct 15, 2020
This would be great to do, but it would really need support from the test package to do (I think it'd also be quite complex to know what tests need re-running after a given change). There's an open issue at dart-lang/test#23 though I'm not sure if it's currently on anyones radar.
HerrNiklasRaab commentedon Oct 15, 2020
Who would be the person that should have this on their radar?
DanTup commentedon Oct 15, 2020
Well I'm not sure if it should be on anyones - that's a question about priorities for the test package, of which I don't have any knowledge. Right now there's only two 👍 's on that
package:testissue (which are us two 🙂 ) so it's unclear of the demand.I did just come across flutter/flutter-intellij#3507 though, which as far as I can tell will watch the test file. It's not as good as described above, but maybe there's some value in it? That said, with the "run test at cursor" command that can be keybound, maybe it wouldn't add a huge amount.
HerrNiklasRaab commentedon Oct 15, 2020
It's absolutely not clear that the referenced issue (dart-lang/test#23) would allow for live unit testing when finished. Therefore it's impossible to evaluate the demand based on the referenced issue.
A more general question:
When for example this issue would gain a lot of upvotes, but needs functionality from another repo (e.g. language server, test package, flutter), does this has any influence on the priority of the according repo where the functionality needs to be implemented?
[-]Support Live Unit Testing like in Visual Studio[/-][+]Flutter/Dart Live Unit Testing like in Visual Studio[/+]DanTup commentedon Oct 15, 2020
That's fair - the linked issue is a little vague - though dart-lang/test#112 was a little clearer and folded into that issue as a duplicate. I think there are really two parts:
package:testhas some sort of watch support to re-run tests when things change (this would be some long-running process, rather than the current way which is a cold start each time you want to run tests)But if some sort of server-mode was to be implemented, there are a lot of other annoyances that may make sense to wrap up in a fix (for example resoling issues like dart-lang/test#908, dart-lang/test#837, dart-lang/test#1216, and getting a list of tests without having to first run them). It would make the job bigger, but could address a bunch of things.
Testing is something I think there's room to improve (and I have been trying to improve things incrementally - there have been quite a few improvements in the past few releases, and hopefully there will be many more if people keep filing suggestions :-)).
I'm not sure how well I can answer that. Other projects have their own priorities and I don't have much visibility of that beyond what's public (I'm not a Googler and most of my interaction with those teams is via GitHub/Gerrit although I do have some calls with some teams there). I'd imagine if there is a lot of demand for a feature (whether it's in this repo or their own) that it would be considered, though I also suspect it's usually not a case of "should we do this" but rather "of all these great ideas, which ones deliver the most value or can we acheive with the available developers".
HerrNiklasRaab commentedon Oct 28, 2020
Related: flutter/flutter#4719
HerrNiklasRaab commentedon Oct 30, 2020
@DanTup I don't know if this brings us further, but no doubt that it's very interesting: https://github.com/szotp/hottie
DanTup commentedon Nov 3, 2020
That definitely does look interesting :-) As far as I can tell, it's IDE-agnostic too, so is usable in any IDE (and without any specific changes)?
windybranch commentedon Jul 9, 2025
@DanTup I notice that you've closed #5076 (comment) as a duplicate but I just want to check that the intention with this issue would also be about a command-line feature not just for IDEs?
Also noticing that flutter/flutter#4719 (comment) is marked as not planned.
https://github.com/szotp/hottie looks like it's related to a running app which doesn't help with non-widget tests and pure dart code unless I'm missing something...?
DanTup commentedon Jul 9, 2025
This issue tracker / repo is purely for the VS Code extension and there is no command line interface to it. However, implementing this feature likely requires work in
dartand orpkg:testbecause it's unlikely the extension could make good decisions about which tests to re-run when files are modified.That is unfortunate, and it might prevent implementing this for Flutter. However, I still think it's a fair request and worth tracking here (for example to collect 👍 s on).