patrol icon indicating copy to clipboard operation
patrol copied to clipboard

Bug that tries to execute one previous scenario

Open Yokoi-K opened this issue 5 months ago • 7 comments

Steps to reproduce

We have four scenarios running on Firebase TestLab. However, when executing the latter scenario, we are trying to execute one of the previous scenarios.

Implementation

Currently, I am implementing scenarios with the following configuration

  • e2e/all_test.dart
    • "edit credit card"
    • "remove credit card"
    • "charge on credit card"
    • "register credit card".

The contents of those four scenarios are, In each of them, we run patrolTest. Finally, we run integration_test on a single file, all_test.dart

patrolTest(...)

Problem

While running the "register credit card" scenario, I am asked to run the previous scenario, "charge on credit card". As shown in the screenshot.

スクリーンショット 2024-03-04 15 38 50

Hypothesis

I was looking at the logs on Firebase TestLab and found something puzzling.

When I run the first scenario, "edit credit card", I get the following log output

03-03 03:11:36.681:. I/PatrolServer(24844):. PatrolJUnitRunner.runDartTest(e2e.all_test edit credit card): Requested execution
03-03 03:11:36.681:. I/PatrolServer(24844): PatrolAppServiceClient.runDartTest(e2e.all_test edit credit card)
03-03 03:11:36.732: I/flutter(24844):. PatrolAppService.runDartTest(e2e.all_test edit credit card) called
03-03 03:11:36.732: I/flutter(24844):. PatrolAppService: requested execution of test "e2e.all_test edit credit card"
03-03 03:11:36.733: I/flutter(24844):. Patrol (native): configure() started

Now, when we run the second scenario, "remove credit card", we get the following log output

03-03 03:12:27.498: I/PatrolServer(28938):. PatrolJUnitRunner.runDartTest(e2e.all_test remove credit card): Requested execution
03-03 03:12:27.498: I/PatrolServer(28938):. PatrolAppServiceClient.runDartTest(e2e.all_test remove credit card)
03-03 03:12:27.525: I/flutter(28938):. PatrolAppService.runDartTest(e2e.all_test remove credit card) called
03-03 03:12:27.525: I/flutter(28938):. PatrolAppService: registered test "e2e.all_test edit credit card" was not matched by requested test "e2e.all_test remove credit card"
03-03 03:12:27.581: I/flutter(28938):. PatrolBinding: tearDown(): count: 1, results: 1   {edit credit card: success}
03-03 03:12:27.582: I/flutter(28938):. PatrolBinding: finished test e2e.all_test edit credit card, but it was not requested, so its status will not be reported back to the native side
03-03 03:12:27.592: I/flutter(28938): PatrolAppService: registered "e2e.all_test remove credit card"
03-03 03:12:27.592: I/flutter(28938): PatrolAppService: requested execution of test "e2e.all_test remove credit card"
03-03 03:12:27.592: I/flutter(28938): Patrol (native): configure() started

03-03 03:12:27.525: I/flutter(28938): PatrolAppService: registered test "e2e.all_test edit credit card" was not matched by requested test "e2e. all_test remove credit card"

As you can see, the first scenario "edit credit card" is requested in the second scenario "remove credit card" for some reason.

This phenomenon is puzzling! Is there any solution? Any information you can provide would be greatly appreciated.

Actual results

The scenario execution should be possible on Firebase TestLab as well as on Firebase TestLab normally.

Logs

Logs
<!-- Replace this line with your logs. Do not remove the backticks! -->

Patrol version

patrol: 2.3.2

Patrol Doctor output

Patrol Doctor output
Patrol CLI version: 2.2.2
Program adb found in /Users/yo/Library/Android/sdk/platform-tools/adb
Env var $ANDROID_HOME set to /Users/yo/.rbenv/shims:/Users/yo/.zplug/repos/zplug/zplug/bin:/Users/yo/.zplug/bin:/opt/homebrew/bin:/opt/homebrew/sbin:/usr/bin:/usr/sbin:/bin:/sbin:/usr/local/bin:/Library/Apple/usr/bin:/Users/yo/fvm/default/bin:/Users/yo/.pub-cache/bin:/Users/yo/Library/Android/sdk/platform-tools:/Users/yo/bin:/Users/yo/Library/Android/sdk
Program xcodebuild found in /usr/bin/xcodebuild
Program ideviceinstaller found in /opt/homebrew/bin/ideviceinstaller

Flutter Doctor output

Flutter Doctor output
[✓] Flutter (Channel stable, 3.13.9, on macOS 14.3.1 23D60 darwin-arm64, locale ja-JP)
[✓] Android toolchain - develop for Android devices (Android SDK version 33.0.2)
[✓] Xcode - develop for iOS and macOS (Xcode 14.2)
[✓] Chrome - develop for the web
[✓] Android Studio (version 2022.1)
[✓] VS Code (version 1.85.2)
[✓] Connected device (2 available)
[✓] Network resources

Yokoi-K avatar Mar 04 '24 08:03 Yokoi-K