patrol icon indicating copy to clipboard operation
patrol copied to clipboard

Skip is not honored when set to true

Open cambiph opened this issue 1 year ago • 7 comments

Steps to reproduce

void main() {

  patrolTest('dfsdf', skip: true, ($) async {
      print('Hello world');
  });

Actual results

When running above code via patrol test the test does not get skipped. The app stays open in the simulator and the process keeps running until you manually kill it.

Logs

Test Suite 'All tests' started at 2023-09-14 12:56:50.190
        Test Suite 'RunnerUITests.xctest' started at 2023-09-14 12:56:50.192
        Test Suite 'RunnerUITests' started at 2023-09-14 12:56:50.192
        Test Case '-[RunnerUITests tests_features_prepayment_updatePrepaymentTest]' started.
            t =     0.00s Start Test at 2023-09-14 12:56:50.195
            t =     0.03s Set Up
            t =     0.03s Open xx
            t =     0.05s     Launch xx
            t =     0.06s         Terminate xx:25724
            t =     1.35s         Setting up automation session
            t =     2.54s         Wait for xx to idle
        2023-09-14 12:56:54.254616+0200 RunnerUITests-Runner[25559:7696005] PatrolServer: INFO: App reported that it is ready
        2023-09-14 12:56:54.660292+0200 RunnerUITests-Runner[25559:7695803] PatrolAppServiceClient.runDartTest(tests.features...)

Patrol version

v2.1.3

Patrol Doctor output

Patrol CLI version: 2.1.3
Program adb found in /opt/homebrew/bin/adb
Env var $ANDROID_HOME set to /Users/cambiph/Library/Android/sdk
Program xcodebuild found in /usr/bin/xcodebuild
Program ideviceinstaller found in /opt/homebrew/bin/ideviceinstaller

Flutter Doctor output

[✓] Flutter (Channel stable, 3.13.1, on macOS 13.5.2 22G91 darwin-arm64, locale en-BE)
[✓] Android toolchain - develop for Android devices (Android SDK version 34.0.0)
[✓] Xcode - develop for iOS and macOS (Xcode 14.3.1)
[✓] Chrome - develop for the web
[!] Android Studio (version unknown)
    ✗ Unable to determine Android Studio version.
[✓] Android Studio (version 2022.2)
[✓] IntelliJ IDEA Community Edition (version 2023.1.2)
[✓] VS Code (version 1.82.0)
[✓] VS Code (version 1.82.1)
[✓] Connected device (3 available)
[✓] Network resources

! Doctor found issues in 1 category.

cambiph avatar Sep 14 '23 11:09 cambiph

I am facing with the same issue as well. App just hangs on "Test starting"

Wreos avatar Sep 14 '23 11:09 Wreos

Hi, thanks for reporting this. patrolTest() doesn't support skip as of now.

The native side calls runDartTest(dfsdf) but dfsdf skipped, so it never gets the result back, thus resulting in the problem.

bartekpacia avatar Sep 15 '23 08:09 bartekpacia

Is it on the roadmap to implement it?

cambiph avatar Sep 15 '23 09:09 cambiph

We might get to it when there's some free time.

What's your use case? Can't your comment out or if (false) your code?

bartekpacia avatar Sep 15 '23 09:09 bartekpacia

Of course, but it would be nice if the skip-toggle works but I can understand it's not a priority.

cambiph avatar Sep 15 '23 09:09 cambiph

let's keep it open

bartekpacia avatar Sep 15 '23 11:09 bartekpacia

Hi @bartekpacia, any updates on this? It's been almost 8 months. How much longer do you think it will take to be resolved?

qube-qa-sonu avatar May 08 '24 10:05 qube-qa-sonu

This issue has been automatically locked since there has not been any recent activity after it was closed. If you are still experiencing a similar problem, please file a new issue. Make sure to follow the template and provide all the information necessary to reproduce the issue.

github-actions[bot] avatar Aug 09 '24 15:08 github-actions[bot]