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

No tests match regular expression " test & exit /B 0". #4007

Closed
DarkHeros09 opened this issue Jun 6, 2022 · 5 comments
Closed

No tests match regular expression " test & exit /B 0". #4007

DarkHeros09 opened this issue Jun 6, 2022 · 5 comments
Labels
in flutter Relates to running Flutter apps in testing Relates to test execution of Dart/Flutter tests for end users is bug on windows
Milestone

Comments

@DarkHeros09
Copy link

Hi

vscode is having a problem running tests with a multi-line string description.

How to reproduce:

This will pass:

import 'package:flutter_test/flutter_test.dart';

void main() {
  testWidgets('''test''', (tester) async {});
}

This will not pass:

import 'package:flutter_test/flutter_test.dart';

void main() {

    testWidgets('''
        test
        ''', (tester) async {});

}

keep in mind that the later test will pass if run through void main.

[√] VS Code (version 1.67.2)
    • VS Code at C:\Users\m_ben\AppData\Local\Programs\Microsoft VS Code
    • Flutter extension version 3.42.0
@DanTup
Copy link
Member

DanTup commented Jun 7, 2022

I don't seem to be able to repro this (I'm using the "Run" link on the test, which I presume is what you're doing too):

Screenshot 2022-06-07 at 10 31 09

Could you try capturing some logs?

  • Run the Dart: Capture Debugging Logs command
  • Run the test and reproduce the failure
  • Click Cancel on the logging notification to stop logging and open the log
  • Remove anything sensitive from the log
  • Attach the log here (or in a gist)

Thanks!

@DanTup DanTup added the awaiting info Requires more information from the customer to progress label Jun 7, 2022
@DanTup
Copy link
Member

DanTup commented Jun 7, 2022

Actually, I can repro on Windows, and only Flutter tests, not Dart tests.

@DanTup DanTup added on windows in flutter Relates to running Flutter apps in testing Relates to test execution of Dart/Flutter tests for end users and removed awaiting info Requires more information from the customer to progress labels Jun 7, 2022
@DanTup DanTup closed this as completed in f1efab4 Jun 7, 2022
@DanTup DanTup added this to the v3.44.0 milestone Jun 7, 2022
@jeff9315
Copy link

I am still having this problem on 3.46.1 using Windows 11. Multiline comments of 3 or more lines fail with this error message when run individually but work when run from a group or from main() in the test file.

@DarkHeros09
Copy link
Author

DarkHeros09 commented Aug 28, 2022

yes i can confirm this too on my win10 machine.

    • VS Code at C:\Users\m_ben\AppData\Local\Programs\Microsoft VS Code
    • Flutter extension version 3.46.0

@DanTup
Copy link
Member

DanTup commented Aug 30, 2022

The original test case above seems to work for me, but the test case in #4125 does not, so I think there's something else giong on. Let's use #4125 instead of re-opening this, since the case reported above does seem fixed.

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 on windows
Projects
None yet
Development

No branches or pull requests

3 participants