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
flutter test --coverage and flutter test --watch #4719
Comments
…g it in. (flutter#4719) This allows blobfs to deduplicate it across {dart,flutter}_{jit,aot}_runner.
cc @aam |
implementing cc @a-siva |
I posted a comment on #15767 but it's relevant here. If this is our way of providing better test performance, it'd be great if this has some daemon mode where we can run it and use a JSON API to run individual tests. That way the user can use the existing functionality in the editor (eg. the Run/Debug links embedded in the editor next to tests, or the Test Runner tree) and get faster performance without having to have all tests run on every change. |
May I suggest a slight change. I would like to see a test runner that reruns only the tests that are affected by the file change, not all tests. This has a notable impact on the developer experience since it shortens the feedback loop significantly, especially on larger projects. Jest works this way when you use |
#27192 seems to target the |
#27192 likely has a lot of what is needed, but appears to have been abandoned. Anyone interested in working on this feature should probably start with the work done in that PR though. |
It looks like it won't be implemented anytime soon so I'm considering a workaround - since flutter already supports hot reload, I could add my tests as a package directly to the app as dev dependency, and re run tests on each hot reload. EDIT: This actually works pretty well, I've made a package for other people to try it: https://github.com/szotp/hottie/ |
Related: Dart-Code/Dart-Code#2878 |
Is there any possibility that |
can we possible have something similar to how bazel does caching of tests. if you're familiar with running a project that has bazel, you will notice that only tests of files changed are run after the first run which runs everything. if we integrate this into the watch flag it would make development so much faster. |
flutter test --coverage
should write:flutter test --watch
should watch the file system of the current package.lib/
changes, it should rerun all the tests and create a new base file and timestamp file.flutter test --watch
runs some tests, it should merge the new coverage with the base file and overwrite the coverage file.The text was updated successfully, but these errors were encountered: