Skip to content
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

"Run All Tests" fails with "Integration tests and unit tests cannot be run in a single invocation" #3727

Closed
DanTup opened this issue Dec 13, 2021 · 2 comments
Labels
in flutter Relates to running Flutter apps in testing Relates to test execution of Dart/Flutter tests for end users is bug
Milestone

Comments

@DanTup
Copy link
Member

DanTup commented Dec 13, 2021

As part of migrating to the VS Code runner, "Run All Tests" will run integration tests too (unless the user hides them), but flutter test doesn't support both so we end up with:

Integration tests and unit tests cannot be run in a single invocation. Use separate invocations of flutter test to run integration tests and unit tests.

We should split these into two runs, like we would with different projects tests.

@DanTup DanTup added is bug in flutter Relates to running Flutter apps in testing Relates to test execution of Dart/Flutter tests for end users labels Dec 13, 2021
@DanTup DanTup added this to the v3.30.0 milestone Dec 13, 2021
DanTup added a commit that referenced this issue Dec 13, 2021
@DanTup DanTup closed this as completed in 4e53aa7 Dec 13, 2021
@maks
Copy link

maks commented Nov 18, 2022

@DanTup apologies for digging up a closed issue, but I'd like to be able to do what you mentioned in this issues description and "hide" my integration tests so that they aren't run when I do Test: Run All Tests in VSCode but I can't seem to find how to do that in any of the docs, would you know how to do that?

@DanTup
Copy link
Member Author

DanTup commented Nov 18, 2022

You can right-click on tests in the VS Code test tree and choose "hide". This will hide them from the tree, and IIRC, prevent them from being run when you do Run All Tests.

If this doesn't seem to work right (or you think there are improvements to be made in this area), please do open new issues with details.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
in flutter Relates to running Flutter apps in testing Relates to test execution of Dart/Flutter tests for end users is bug
Projects
None yet
Development

No branches or pull requests

2 participants