-
Notifications
You must be signed in to change notification settings - Fork 159
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
Test pass on Android without really running on emulator #1106
Comments
Thanks for reporting this and sorry for the problems. This looks like a duplicate of #1079. Can you confirm? For now, you can install an older version of dart pub global activate --source git https://github.com/leancodepl/patrol --git-path packages/patrol_cli --git-ref patrol_cli-v1.0.7 |
I don't think so, my tests succeed and take only few seconds. |
Facing the same issue when using older version of patrol_cli. My project also uses flavors and I haven't faced this issue on other projects which do not have flavors. |
Hello, I am having the same issue. My project also uses flavors, so that could be a lead. The previous version v1.0.7 didn't work for me. I also tried even older versions. I reproduced the issue on the physical device. |
Hi y'all, sorry for the problems. At LeanCode we test apps with flavors and they work just fine, so I'm gonna bet that something is misconfigured in your apps. But it might be a bug as well :) Could you please create and share a Minimal, Reproducible Example so that I can look into it and deploy a fix? |
Hi @bartekpacia , I hope this is sufficient. I am using patrol_cli v1.0.7 as suggested. Let me know if i missed something: |
Thanks, @mbilalakmal! I made a PR in your repo with a small change and the tests work. Screen.Recording.2023-03-26.at.2.59.54.PM.movCan you confirm it works for you as well? Detailspatrol: ^1.0.8 $ patrol --version
patrol_cli v1.1.2 |
Yes! It works fine for me. Now I need to double check which setup step I am not doing correctly in the real app. Thanks! I might be mixing some Firebase Lab integration stuff with patrol integration steps in the real app. Is there by any chance an example repo that does integrate both? It would make it much easier to setup the |
Hi @bartekpacia, I generated the Flutter Counter app and can still reproduce the issue on the device. App_not_launched_when_patrol.movIt is important to me to be able to run the tests with Here are my Flutter and Patrol doctor outputs: Flutter doctor output
flutter doctor -v [✓] Android toolchain - develop for Android devices (Android SDK version 33.0.1) [✓] Xcode - develop for iOS and macOS (Xcode 14.2) [✓] Chrome - develop for the web [✓] Android Studio (version 2021.1) [✓] VS Code (version 1.76.2) [✓] Connected device (3 available) [✓] HTTP Host Availability • No issues found! Patrol doctor
Patrol CLI version: 1.1.3 I look forward to hearing from you to give me a heads-up if I am missing something. Thanks! |
Thanks for creating the reproduction repository, @djmasic! Your app doesn't have native automation set up. The detailed instruction explaining how to do it are in our docs. This is not a bug on our side, but on Android's, but we track it nevertheless in #843. |
I'm pretty confident this is not a valid issue, but a misconfiguration/complete lack of it from the user's side. Please open a new issue and fill it out carefully in case you encounter this problem again, but before you do so, make sure you've set up the native automation correctly. |
I'm pretty confident it is. It behaves the same whether the |
Sorry, I didn't mean to sound rude. I did read your comment and cloned your repo, and saw that you're missing Android configuration. For native automation features (so essentially But to use |
Hi @bartekpacia, The problem I am now getting is to do with the builder not being able to find some Patrol class that are needed for the build, as shown below. Please can you tell me what I'm missing or doing wrong. Patrol version: patrol_cli v1.1.3 Contents of MainActivityTest.javapackage uk.co.greggs.gotg_apps_grecords.unstable; import org.junit.Rule; @RunWith(PatrolTestRunner.class) Verbose output when running the testpeterbriggs@Peters-MBP-2 gotg_apps_grecords % patrol test --target integration_test/tests/login/login_test.dart --verbose
$ ./gradlew :app:assembleUnstableDebugAndroidTest -Ptarget=/Users/peterbriggs/GOTG.Apps.GRecords/gotg_apps_grecords/integration_test/tests/login/login_test.dart -Pdart-defines=UEFUUk9MX1dBSVQ9MA==,UEFUUk9MX0FQUF9QQUNLQUdFX05BTUU9dWsuY28uZ3JlZ2dzLmdvdGdfYXBwc19ncmVjb3Jkcy51bnN0YWJsZQ==,UEFUUk9MX0FQUF9CVU5ETEVfSUQ9dWsuY28uZ3JlZ2dzLmdvdGdfYXBwc19ncmVjb3Jkcy51bnN0YWJsZQ==,UEFUUk9MX0FORFJPSURfQVBQX05BTUU9Ry1SZWNvcmRz,UEFUUk9MX0lPU19BUFBfTkFNRT1HLVJlY29yZHM=,UEFUUk9MX1RFU1RfTEFCRUw9bG9naW5fdGVzdC5kYXJ0
✗ Failed to build apk with entrypoint login_test.dart (Gradle build failed with code 1) (22.6s) See the logs above to learn what happened. Also consider running with --verbose. If the logs still aren't useful, then it's a bug - please report it. |
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. |
Describe the bug
The test pass without running on the device.
To Reproduce
Steps to reproduce the behavior:
patrol test --flavor qa
Expected behavior
I expect the test to run on the device.
Device information
Additional information
Flutter 3.7.6 • channel stable • https://github.com/flutter/flutter.git
Framework • revision 12cb4eb7a0 (3 weeks ago) • 2023-03-01 10:29:26 -0800
Engine • revision ada363ee93
Tools • Dart 2.19.3 • DevTools 2.20.1
patrol: ^1.0.8
patrol_cli v1.1.0
The text was updated successfully, but these errors were encountered: