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

Automation test only not executing in iOS devices #1584

Closed
lravihs opened this issue Jul 26, 2023 · 34 comments
Closed

Automation test only not executing in iOS devices #1584

lravihs opened this issue Jul 26, 2023 · 34 comments
Assignees
Labels
waiting for response Waiting for user's response

Comments

@lravihs
Copy link

lravihs commented Jul 26, 2023

Steps to reproduce

  1. Do the setup as mentioned in the patrol official website for iOS in your application.
  2. Run with the patrol test --target integration_test/example_test.dart

Actual results

  1. The simulator is cloning and only generating the build despite of test starting screen for automation

Logs

Details
lallu@Laliths-MacBook-Pro Next-Gen-App % patrol test --target integration_test/example_test.dart --verbose          
You're using Patrol CLI 2.0, which has breaking changes.
Read the migration guide at https://patrol.leancode.co/v2.
Disable this warning by setting the PATROL_MIGRATED environment variable.

Verbose mode enabled. More logs will be printed.
Received 1 test target(s)
Received test target: /Users/lallu/Documents/GitHub/Next-Gen-App/integration_test/example_test.dart
Generated entrypoint /Users/lallu/Documents/GitHub/Next-Gen-App/integration_test/test_bundle.dart with 1 bundled test(s)
Received Android flavor: jk
Received iOS flavor: jk
$ flutter --no-version-check devices --machine
No device specified, using the first one (iPhone 14 Pro)
Received 1 device(s) to run on
Received device: iPhone 14 Pro
Received 7 --dart-define(s) (0 custom, 7 internal)
Received internal --dart-define: PATROL_WAIT=0
Received internal --dart-define: PATROL_APP_PACKAGE_NAME=com.paytronix.nexgenfl
Received internal --dart-define: PATROL_APP_BUNDLE_ID=com.paytronix.nexgenfl
Received internal --dart-define: PATROL_ANDROID_APP_NAME=NGA JK Cafe
Received internal --dart-define: PATROL_IOS_APP_NAME=NGA JK Cafe
Received internal --dart-define: INTEGRATION_TEST_SHOULD_REPORT_RESULTS_TO_NATIVE=false
Received internal --dart-define: PATROL_TEST_LABEL_ENABLED=true
• Building app with entrypoint test_bundle.dart for iOS simulator (debug)...
$ flutter build ios --no-version-check --config-only --no-codesign --debug --simulator --flavor jk --target /Users/lallu/Documents/GitHub/Next-Gen-App/integration_test/test_bundle.dart --dart-define PATROL_WAIT=0 --dart-define PATROL_APP_PACKAGE_NAME=com.paytronix.nexgenfl --dart-define PATROL_APP_BUNDLE_ID=com.paytronix.nexgenfl --dart-define PATROL_ANDROID_APP_NAME=NGA JK Cafe --dart-define PATROL_IOS_APP_NAME=NGA JK Cafe --dart-define INTEGRATION_TEST_SHOULD_REPORT_RESULTS_TO_NATIVE=false --dart-define PATROL_TEST_LABEL_ENABLED=true
        Building com.paytronix.nexgenfl for simulator (ios)...
$ xcodebuild build-for-testing -workspace Runner.xcworkspace -scheme jk -configuration Debug-jk -only-testing RunnerUITests -sdk iphonesimulator -destination generic/platform=iOS Simulator -quiet -derivedDataPath ../build/ios_integ OTHER_SWIFT_FLAGS=$(inherited) -D PATROL_ENABLED
        /Users/lallu/Documents/GitHub/Next-Gen-App/ios/Runner/iOSPicker.swift:56:41: warning: 'keyWindow' was deprecated in iOS 13.0: Should not be used for applications that support multiple scenes as it returns a key window across all connected scenes
                let win  = UIApplication.shared.keyWindow
                                                ^
        /Users/lallu/Documents/GitHub/Next-Gen-App/ios/Runner/AppDelegate.swift:12:11: warning: immutable value 'controller' was never used; consider replacing with '_' or removing it
              let controller : FlutterViewController = window!.rootViewController as! FlutterViewController
                  ^~~~~~~~~~
                  _
        /Users/lallu/Documents/GitHub/Next-Gen-App/ios/Runner/iOSDatePicker.swift:56:41: warning: 'keyWindow' was deprecated in iOS 13.0: Should not be used for applications that support multiple scenes as it returns a key window across all connected scenes
                let win  = UIApplication.shared.keyWindow
                                                ^
        /Users/lallu/Documents/GitHub/Next-Gen-App/ios/Runner/AppDelegate.swift:12:11: warning: immutable value 'controller' was never used; consider replacing with '_' or removing it
              let controller : FlutterViewController = window!.rootViewController as! FlutterViewController
                  ^~~~~~~~~~
                  _
        /Users/lallu/Documents/GitHub/Next-Gen-App/ios/Runner/iOSDatePicker.swift:56:41: warning: 'keyWindow' was deprecated in iOS 13.0: Should not be used for applications that support multiple scenes as it returns a key window across all connected scenes
                let win  = UIApplication.shared.keyWindow
                                                ^
        /Users/lallu/Documents/GitHub/Next-Gen-App/ios/Runner/iOSPicker.swift:56:41: warning: 'keyWindow' was deprecated in iOS 13.0: Should not be used for applications that support multiple scenes as it returns a key window across all connected scenes
                let win  = UIApplication.shared.keyWindow
                                                ^
        note: Building targets in dependency order
        /Users/lallu/Documents/GitHub/Next-Gen-App/ios/Pods/Pods.xcodeproj: warning: The iOS Simulator deployment target 'IPHONEOS_DEPLOYMENT_TARGET' is set to 10.0, but the range of supported deployment target versions is 11.0 to 16.2.99. (in target 'CGRPCZlib' from project 'Pods')
        /Users/lallu/Documents/GitHub/Next-Gen-App/ios/Pods/Pods.xcodeproj: warning: The iOS Simulator deployment target 'IPHONEOS_DEPLOYMENT_TARGET' is set to 10.0, but the range of supported deployment target versions is 11.0 to 16.2.99. (in target 'CNIOAtomics' from project 'Pods')
        /Users/lallu/Documents/GitHub/Next-Gen-App/ios/Pods/Pods.xcodeproj: warning: The iOS Simulator deployment target 'IPHONEOS_DEPLOYMENT_TARGET' is set to 10.0, but the range of supported deployment target versions is 11.0 to 16.2.99. (in target 'CNIOBoringSSL' from project 'Pods')
        /Users/lallu/Documents/GitHub/Next-Gen-App/ios/Pods/Pods.xcodeproj: warning: The iOS Simulator deployment target 'IPHONEOS_DEPLOYMENT_TARGET' is set to 10.0, but the range of supported deployment target versions is 11.0 to 16.2.99. (in target 'CNIOBoringSSLShims' from project 'Pods')
        /Users/lallu/Documents/GitHub/Next-Gen-App/ios/Pods/Pods.xcodeproj: warning: The iOS Simulator deployment target 'IPHONEOS_DEPLOYMENT_TARGET' is set to 10.0, but the range of supported deployment target versions is 11.0 to 16.2.99. (in target 'CNIODarwin' from project 'Pods')
        /Users/lallu/Documents/GitHub/Next-Gen-App/ios/Pods/Pods.xcodeproj: warning: The iOS Simulator deployment target 'IPHONEOS_DEPLOYMENT_TARGET' is set to 10.0, but the range of supported deployment target versions is 11.0 to 16.2.99. (in target 'CNIOHTTPParser' from project 'Pods')
        /Users/lallu/Documents/GitHub/Next-Gen-App/ios/Pods/Pods.xcodeproj: warning: The iOS Simulator deployment target 'IPHONEOS_DEPLOYMENT_TARGET' is set to 10.0, but the range of supported deployment target versions is 11.0 to 16.2.99. (in target 'CNIOLinux' from project 'Pods')
        /Users/lallu/Documents/GitHub/Next-Gen-App/ios/Pods/Pods.xcodeproj: warning: The iOS Simulator deployment target 'IPHONEOS_DEPLOYMENT_TARGET' is set to 10.0, but the range of supported deployment target versions is 11.0 to 16.2.99. (in target 'CNIOWindows' from project 'Pods')
        /Users/lallu/Documents/GitHub/Next-Gen-App/ios/Pods/Pods.xcodeproj: warning: The iOS Simulator deployment target 'IPHONEOS_DEPLOYMENT_TARGET' is set to 9.0, but the range of supported deployment target versions is 11.0 to 16.2.99. (in target 'Logging' from project 'Pods')
        /Users/lallu/Documents/GitHub/Next-Gen-App/ios/Pods/Pods.xcodeproj: warning: The iOS Simulator deployment target 'IPHONEOS_DEPLOYMENT_TARGET' is set to 9.0, but the range of supported deployment target versions is 11.0 to 16.2.99. (in target 'ReachabilitySwift' from project 'Pods')
        /Users/lallu/Documents/GitHub/Next-Gen-App/ios/Pods/Pods.xcodeproj: warning: The iOS Simulator deployment target 'IPHONEOS_DEPLOYMENT_TARGET' is set to 10.0, but the range of supported deployment target versions is 11.0 to 16.2.99. (in target 'SwiftNIOConcurrencyHelpers' from project 'Pods')
        /Users/lallu/Documents/GitHub/Next-Gen-App/ios/Pods/Pods.xcodeproj: warning: The iOS Simulator deployment target 'IPHONEOS_DEPLOYMENT_TARGET' is set to 10.0, but the range of supported deployment target versions is 11.0 to 16.2.99. (in target 'SwiftNIOCore' from project 'Pods')
        /Users/lallu/Documents/GitHub/Next-Gen-App/ios/Pods/Pods.xcodeproj: warning: The iOS Simulator deployment target 'IPHONEOS_DEPLOYMENT_TARGET' is set to 10.0, but the range of supported deployment target versions is 11.0 to 16.2.99. (in target '_NIODataStructures' from project 'Pods')
        /Users/lallu/Documents/GitHub/Next-Gen-App/ios/Pods/Pods.xcodeproj: warning: The iOS Simulator deployment target 'IPHONEOS_DEPLOYMENT_TARGET' is set to 10.0, but the range of supported deployment target versions is 11.0 to 16.2.99. (in target 'SwiftNIOEmbedded' from project 'Pods')
        /Users/lallu/Documents/GitHub/Next-Gen-App/ios/Pods/Pods.xcodeproj: warning: The iOS Simulator deployment target 'IPHONEOS_DEPLOYMENT_TARGET' is set to 10.0, but the range of supported deployment target versions is 11.0 to 16.2.99. (in target 'SwiftNIOPosix' from project 'Pods')
        /Users/lallu/Documents/GitHub/Next-Gen-App/ios/Pods/Pods.xcodeproj: warning: The iOS Simulator deployment target 'IPHONEOS_DEPLOYMENT_TARGET' is set to 10.0, but the range of supported deployment target versions is 11.0 to 16.2.99. (in target 'SwiftNIO' from project 'Pods')
        /Users/lallu/Documents/GitHub/Next-Gen-App/ios/Pods/Pods.xcodeproj: warning: The iOS Simulator deployment target 'IPHONEOS_DEPLOYMENT_TARGET' is set to 10.0, but the range of supported deployment target versions is 11.0 to 16.2.99. (in target 'SwiftNIOExtras' from project 'Pods')
        /Users/lallu/Documents/GitHub/Next-Gen-App/ios/Pods/Pods.xcodeproj: warning: The iOS Simulator deployment target 'IPHONEOS_DEPLOYMENT_TARGET' is set to 10.0, but the range of supported deployment target versions is 11.0 to 16.2.99. (in target 'SwiftNIOFoundationCompat' from project 'Pods')
        /Users/lallu/Documents/GitHub/Next-Gen-App/ios/Pods/Pods.xcodeproj: warning: The iOS Simulator deployment target 'IPHONEOS_DEPLOYMENT_TARGET' is set to 10.0, but the range of supported deployment target versions is 11.0 to 16.2.99. (in target 'SwiftNIOHTTP1' from project 'Pods')
        /Users/lallu/Documents/GitHub/Next-Gen-App/ios/Pods/Pods.xcodeproj: warning: The iOS Simulator deployment target 'IPHONEOS_DEPLOYMENT_TARGET' is set to 10.0, but the range of supported deployment target versions is 11.0 to 16.2.99. (in target 'SwiftNIOHPACK' from project 'Pods')
        /Users/lallu/Documents/GitHub/Next-Gen-App/ios/Pods/Pods.xcodeproj: warning: The iOS Simulator deployment target 'IPHONEOS_DEPLOYMENT_TARGET' is set to 10.0, but the range of supported deployment target versions is 11.0 to 16.2.99. (in target 'SwiftNIOTLS' from project 'Pods')
        /Users/lallu/Documents/GitHub/Next-Gen-App/ios/Pods/Pods.xcodeproj: warning: The iOS Simulator deployment target 'IPHONEOS_DEPLOYMENT_TARGET' is set to 10.0, but the range of supported deployment target versions is 11.0 to 16.2.99. (in target 'SwiftNIOHTTP2' from project 'Pods')
        /Users/lallu/Documents/GitHub/Next-Gen-App/ios/Pods/Pods.xcodeproj: warning: The iOS Simulator deployment target 'IPHONEOS_DEPLOYMENT_TARGET' is set to 10.0, but the range of supported deployment target versions is 11.0 to 16.2.99. (in target 'SwiftNIOSSL' from project 'Pods')
        /Users/lallu/Documents/GitHub/Next-Gen-App/ios/Pods/Pods.xcodeproj: warning: The iOS Simulator deployment target 'IPHONEOS_DEPLOYMENT_TARGET' is set to 10.0, but the range of supported deployment target versions is 11.0 to 16.2.99. (in target 'SwiftNIOTransportServices' from project 'Pods')
        /Users/lallu/Documents/GitHub/Next-Gen-App/ios/Pods/Pods.xcodeproj: warning: The iOS Simulator deployment target 'IPHONEOS_DEPLOYMENT_TARGET' is set to 9.0, but the range of supported deployment target versions is 11.0 to 16.2.99. (in target 'SwiftProtobuf' from project 'Pods')
        /Users/lallu/Documents/GitHub/Next-Gen-App/ios/Pods/Pods.xcodeproj: warning: The iOS Simulator deployment target 'IPHONEOS_DEPLOYMENT_TARGET' is set to 10.0, but the range of supported deployment target versions is 11.0 to 16.2.99. (in target 'gRPC-Swift' from project 'Pods')
        note: Run script build phase 'Run Script' will be run during every build because the option to run the script phase "Based on dependency analysis" is unchecked. (in target 'Runner' from project 'Runner')
        note: Run script build phase 'Thin Binary' will be run during every build because the option to run the script phase "Based on dependency analysis" is unchecked. (in target 'Runner' from project 'Runner')
        warning: Run script build phase 'xcode_backend build' will be run during every build because it does not specify any outputs. To address this warning, either add output dependencies to the script phase, or configure it to run in every build by unchecking "Based on dependency analysis" in the script phase. (in target 'RunnerUITests' from project 'Runner')
        warning: Run script build phase 'xcode_backend embed_and_thin' will be run during every build because it does not specify any outputs. To address this warning, either add output dependencies to the script phase, or configure it to run in every build by unchecking "Based on dependency analysis" in the script phase. (in target 'RunnerUITests' from project 'Runner')
✓ Completed building app with entrypoint test_bundle.dart for iOS simulator (53.8s)
Will uninstall apps before running tests
$ xcrun simctl uninstall FB544EF5-4FD7-45B9-B525-3C746378DE95 com.paytronix.nexgenfl
$ xcrun simctl uninstall FB544EF5-4FD7-45B9-B525-3C746378DE95 com.paytronix.nexgenfl.RunnerUITests.xctrunner
• Running app with entrypoint test_bundle.dart for iOS simulator on simulator iPhone 14 Pro...
$ xcodebuild -showsdks -json
Assuming SDK version 16.2 for iphonesimulator
Looking for .xctestrun matching jk_iphonesimulator16.2*.xctestrun at /Users/lallu/Documents/GitHub/Next-Gen-App/build/ios_integ/Build/Products
Found 1 match(es), the first one will be used
Found /Users/lallu/Documents/GitHub/Next-Gen-App/build/ios_integ/Build/Products/jk_iphonesimulator16.2-arm64-x86_64.xctestrun
$ xcodebuild test-without-building -xctestrun /Users/lallu/Documents/GitHub/Next-Gen-App/build/ios_integ/Build/Products/jk_iphonesimulator16.2-arm64-x86_64.xctestrun -only-testing RunnerUITests -destination platform=iOS Simulator,name=iPhone 14 Pro
        Command line invocation:
            /Applications/Xcode.app/Contents/Developer/usr/bin/xcodebuild test-without-building -xctestrun /Users/lallu/Documents/GitHub/Next-Gen-App/build/ios_integ/Build/Products/jk_iphonesimulator16.2-arm64-x86_64.xctestrun -only-testing RunnerUITests -destination "platform=iOS Simulator,name=iPhone 14 Pro"
        
        User defaults from command line:
            IDEPackageSupportUseBuiltinSCM = YES
        
        2023-07-26 16:11:51.897991+0530 RunnerUITests-Runner[82818:440964] [SceneConfiguration] Info.plist contained no UIScene configuration dictionary (looking for configuration named "(no name)")
        2023-07-26 16:11:51.898268+0530 RunnerUITests-Runner[82818:440964] [SceneConfiguration] Info.plist contained no UIScene configuration dictionary (looking for configuration named "(no name)")
        2023-07-26 16:11:51.908055+0530 RunnerUITests-Runner[82818:440964] Running tests...
        2023-07-26 16:11:52.785619+0530 RunnerUITests-Runner[82818:440964] PatrolServer: INFO: PATROL_PORT is null, falling back to default (8081)
        2023-07-26 16:11:52.786115+0530 RunnerUITests-Runner[82818:440964] PatrolServer: INFO: PatrolServer constructor called
        2023-07-26 16:11:52.786185+0530 RunnerUITests-Runner[82818:440964] PatrolServer: INFO: PATROL_ENABLED flag is defined
        2023-07-26 16:11:52.786531+0530 RunnerUITests-Runner[82818:440964] PatrolAppServiceClient: created, port: 8082
        2023-07-26 16:11:52.793264+0530 RunnerUITests-Runner[82818:441002] [si_destination_compare] send failed: Invalid argument
        2023-07-26 16:11:52.793347+0530 RunnerUITests-Runner[82818:441002] [si_destination_compare] send failed: Undefined error: 0
        2023-07-26 16:11:52.795909+0530 RunnerUITests-Runner[82818:440999] PatrolServer: INFO: Server started on http://localhost:8081
            t =      nans Checking existence of `"Allow" Button`
            t =      nans Ignoring failure to get hierarchy for remote element in process 80428 (Error getting main window kAXErrorServerNotFound)
            t =      nans Open com.paytronix.nexgenfl
            t =      nans     Launch com.paytronix.nexgenfl
            t =      nans         Setting up automation session
            t =      nans         Wait for com.paytronix.nexgenfl to idle
^CCaught SIGINT, exiting...
✗ Failed to execute tests of app with entrypoint test_bundle.dart for iOS simulator on simulator iPhone 14 Pro (xcodebuild was interrupted) (455.1s)
Interrupted: xcodebuild was interrupted
#0      throwToolInterrupted (package:patrol_cli/src/base/exceptions.dart:15:3)
#1      IOSTestBackend.execute.<anonymous closure> (package:patrol_cli/src/ios/ios_test_backend.dart:177:9)
<asynchronous suspension>
#2      DisposeScope.run (package:dispose_scope/src/dispose_scope.dart:46:7)
<asynchronous suspension>
#3      IOSTestBackend.execute (package:patrol_cli/src/ios/ios_test_backend.dart:147:5)
<asynchronous suspension>
#4      TestCommand._execute (package:patrol_cli/src/commands/test.dart:269:7)
<asynchronous suspension>
#5      TestCommand.run (package:patrol_cli/src/commands/test.dart:169:23)
<asynchronous suspension>
#6      CommandRunner.runCommand (package:args/command_runner.dart:212:13)
<asynchronous suspension>
#7      PatrolCommandRunner.runCommand (package:patrol_cli/src/runner/patrol_command_runner.dart:310:18)
<asynchronous suspension>
#8      PatrolCommandRunner.run (package:patrol_cli/src/runner/patrol_command_runner.dart:254:18)
<asynchronous suspension>
#9      patrolCommandRunner (package:patrol_cli/src/runner/patrol_command_runner.dart:72:20)
<asynchronous suspension>
#10     main (file:///Users/lallu/.pub-cache/hosted/pub.dev/patrol_cli-2.0.4/bin/main.dart:6:20)
<asynchronous suspension>

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.
$ xcrun simctl uninstall FB544EF5-4FD7-45B9-B525-3C746378DE95 com.paytronix.nexgenfl
$ xcrun simctl uninstall FB544EF5-4FD7-45B9-B525-3C746378DE95 com.paytronix.nexgenfl.RunnerUITests.xctrunner

Patrol version

patrol: ^2.1.0

Patrol Doctor output

lallu@Laliths-MacBook-Pro Next-Gen-App % patrol doctor                
You're using Patrol CLI 2.0, which has breaking changes.
Read the migration guide at https://patrol.leancode.co/v2.
Disable this warning by setting the PATROL_MIGRATED environment variable.


Patrol CLI version: 2.0.4
Program adb found in /Users/lallu/Documents/platform-tools/adb
Env var $ANDROID_HOME set to /Users/lallu/Library/Android/sdk
Program xcodebuild found in /usr/bin/xcodebuild
Program ideviceinstaller found in /opt/homebrew/bin/ideviceinstaller

Flutter Doctor output

lallu@Laliths-MacBook-Pro Next-Gen-App % flutter doctor
Doctor summary (to see all details, run flutter doctor -v):
[!] Flutter (Channel stable, 3.10.6, on macOS 13.3 22E252 darwin-arm64, locale en-IN)
    ! Warning: `dart` on your path resolves to /opt/homebrew/Cellar/dart/3.0.3/libexec/bin/dart, which is not inside your current Flutter SDK checkout at
      /Users/lallu/Documents/flutter. Consider adding /Users/lallu/Documents/flutter/bin to the front of your path.
[✓] 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.2)
[✓] VS Code (version 1.80.1)
[✓] Connected device (3 available)
[✓] Network resources
@lravihs lravihs changed the title Automation not executing in iOS devices Automation only not executing in iOS devices Jul 26, 2023
@lravihs lravihs changed the title Automation only not executing in iOS devices Automation test only not executing in iOS devices Jul 26, 2023
@jBorkowska jBorkowska self-assigned this Jul 26, 2023
@jBorkowska
Copy link
Collaborator

Hi @lravihs. It looks like you haven't disabled parallel execution in Xcode. Here's how to do it: https://www.youtube.com/watch?v=9LdEJR59fW4
Let me know if that's not an issue

@lravihs
Copy link
Author

lravihs commented Jul 27, 2023

@jBorkowska I have disabled parallel execution in Xcode as well as completed all the setup mentioned in the patrol website. This is not an issue here

@jBorkowska
Copy link
Collaborator

Possibly related to #1555

@lravihs
Copy link
Author

lravihs commented Jul 27, 2023

@jBorkowska It's kinda related issue but however he is getting atleast "Test is Starting" screen but I am not even getting that. When I run it will just clone the simulator once and installs the build and will open it without "Test is Starting" screen. but with the same code it works fine for android.

@lravihs
Copy link
Author

lravihs commented Jul 28, 2023

@jBorkowska do you have any fix for this?

@jBorkowska
Copy link
Collaborator

@lravihs unfortunately no, we didn't have any luck in reproducing it. If you could provide some minimal example project, where I could reproduce this issue, then it would be great

@jBorkowska jBorkowska assigned bartekpacia and unassigned jBorkowska Aug 3, 2023
@jBorkowska jBorkowska added the waiting for response Waiting for user's response label Aug 3, 2023
@lravihs
Copy link
Author

lravihs commented Aug 9, 2023

@jBorkowska and @bartekpacia sorry for the late reply, my development team has started working on creating sample project. Once it got completed will revert back here. Thanks

@lravihs
Copy link
Author

lravihs commented Aug 11, 2023

@jBorkowska @bartekpacia I have sent you the sample project to your email address -
[email protected] , kindly check it and revert back to that email @[email protected]

@bartekpacia
Copy link
Contributor

Hi @lravihs, this is an open-source project, and in the spirit of openess, we provide support only on GitHub. This way other Patrol users can see what problems others are encountering and help each other.

If you're interested in private support over email, just let us know and we'll be happy to discuss the details (you can email me at the same address as before).

@lravihs
Copy link
Author

lravihs commented Aug 14, 2023 via email

@bartekpacia
Copy link
Contributor

I checked your project and you don't have the RunnerUITests target in the Xcode project, so there's no chance it could work. Did you really go through the set up documentation?

@lravihs
Copy link
Author

lravihs commented Aug 14, 2023 via email

@bartekpacia
Copy link
Contributor

bartekpacia commented Aug 14, 2023

I have done all the setup using the documentation mentioned

You didn't. There's no RunnerUITests target in your Xcode project, as described here (in the iOS section).

@lravihs
Copy link
Author

lravihs commented Aug 14, 2023 via email

@develogo
Copy link

I followed all the documentation and I'm having a problem with the native integration of IOs, it seems similar to the error above

@lravihs
Copy link
Author

lravihs commented Aug 17, 2023

@bartekpacia @jBorkowska Is there any update regarding the build.?. Please ping here in case of any issues in the build

@lravihs
Copy link
Author

lravihs commented Aug 21, 2023

@bartekpacia @jBorkowska Is there any update regarding this issue?

@develogo
Copy link

I think every problem is due to the flavors, I made a POC without flavor and it worked. I'm using flutter_flavorizr lib

@lravihs
Copy link
Author

lravihs commented Aug 22, 2023

@develogo can you please help me with your repository? So that I can check it

@develogo
Copy link

@develogo can you please help me with your repository? So that I can check it

https://github.com/develogo/flutter_patrol

@bartekpacia @jBorkowska I created a project with flavor and another one without flavor. Without flavor it works perfectly, with flavor it stagnates.

@lravihs
Copy link
Author

lravihs commented Aug 28, 2023

@bartekpacia @jBorkowska is there any update regarding this issue.?

@SeanYHwang
Copy link

I have a similar issue. My flavor is 'Debug-Development' and Build looks fine but test is something wrong.

❯ patrol build ios --simulator --flavor Development
• Building app with entrypoint test_bundle.dart for iOS simulator (debug)...
	2023-08-28 15:15:58.588 xcodebuild[12699:1036568] DVTCoreDeviceEnabledState: DVTCoreDeviceEnabledState_Disabled set via user default (DVTEnableCoreDevice=disabled)
✓ Completed building app with entrypoint test_bundle.dart for iOS simulator (161.0s)
build/ios_integ/Build/Products/Debug-iphonesimulator/Runner.app (app under test)
build/ios_integ/Build/Products/Debug-iphonesimulator/RunnerUITests-Runner.app (test instrumentation app)
build/ios_integ/Build/Products/Development_iphonesimulator16.4.xctestrun (xctestrun file)
...
❯ patrol test -d 31D32D69-46B2-4025-83D1-EB84004313A9 --flavor Development -v
...
xcodebuild: error: Failed to build workspace Runner with scheme Development.: Tests in the target “RunnerUITests” can’t be run because “RunnerUITests” isn’t a member of the specified test plan or scheme

@matejhocevar
Copy link

I have a similar issue. My flavor is 'Debug-Development' and Build looks fine but test is something wrong.

❯ patrol build ios --simulator --flavor Development
• Building app with entrypoint test_bundle.dart for iOS simulator (debug)...
	2023-08-28 15:15:58.588 xcodebuild[12699:1036568] DVTCoreDeviceEnabledState: DVTCoreDeviceEnabledState_Disabled set via user default (DVTEnableCoreDevice=disabled)
✓ Completed building app with entrypoint test_bundle.dart for iOS simulator (161.0s)
build/ios_integ/Build/Products/Debug-iphonesimulator/Runner.app (app under test)
build/ios_integ/Build/Products/Debug-iphonesimulator/RunnerUITests-Runner.app (test instrumentation app)
build/ios_integ/Build/Products/Development_iphonesimulator16.4.xctestrun (xctestrun file)
...
❯ patrol test -d 31D32D69-46B2-4025-83D1-EB84004313A9 --flavor Development -v
...
xcodebuild: error: Failed to build workspace Runner with scheme Development.: Tests in the target “RunnerUITests” can’t be run because “RunnerUITests” isn’t a member of the specified test plan or scheme

I get the same error when running the following command on my physical device:

patrol test -t integration_test/example_test.dart --device 00008020-001E34CE0CBA002E --release

When I try to run it on the iPhone 14 Pro Max simulator I don't see that error, I just got stuck on step:

Running app with entrypoint test_bundle.dart for iOS simulator on simulator iPhone 14 Pro Max...

I also noticed that my "host" app appears instead of the pumped widget (specified in example_test.dart):

MaterialApp(
  home: Scaffold(
    appBar: AppBar(title: const Text('app')),
    backgroundColor: Colors.blue,
  ),
),

@bartekpacia
Copy link
Contributor

bartekpacia commented Sep 10, 2023

To reiterate: I understand that the original cause of the issue is that @lravihs didn't create the RunnerUITests target in Xcode, in other words - they didn't follow the native automation setup guide for iOS.

@lravihs - from this comment I understand that you fixed this mistake and followed the iOS native setup guide, thus adding the RunnerUITests target

I also understand that after completing these steps, you're getting a different error. Is that correct? If so, does the linked repo contain the fully reproducible example of that new error? Also, please post that error.

To all others, "me too" messages don't really help, they just clutter the converstaion. Please just give a "👍" to express interest.

@lravihs
Copy link
Author

lravihs commented Sep 13, 2023

@bartekpacia After doing all the native automation setup we are getting the same issue and the linked repo also reproducing the same issue.

Issue Note : Test starting screen is not displaying despite of this the build is getting generated

@lravihs
Copy link
Author

lravihs commented Sep 20, 2023

@bartekpacia May I get any resolution or reply for this?

@sigis151
Copy link

was stuck in the same place, because I was running a server on port 8081, which from the logs I see patrol tried to use it as well, after killing it tests started successfully

@lravihs
Copy link
Author

lravihs commented Sep 26, 2023

@bartekpacia @jBorkowska Is there any solution for this?

@lravihs
Copy link
Author

lravihs commented Sep 27, 2023

@bartekpacia Can you please check the difference between Android and iOS during execution in our Application.

for iOS : Third point is : Running app with entrypoint test_bundle.dart for iOS simulator on simulator iPhone 14 Pro...
Screenshot 2023-09-27 at 12 22 21 PM

for Android : Third Point is : Executing tests of apk with entrypoint test_bundle.dart on emulator-5554...
Screenshot 2023-09-27 at 12 22 41 PM

Why it is running the app instead of executing the tests.? Are you able to find any clue in it.?

@lravihs
Copy link
Author

lravihs commented Sep 27, 2023

It is working fine if I work with flutter demo application.

Screenshot 2023-09-27 at 4 12 58 PM

@lravihs
Copy link
Author

lravihs commented Oct 3, 2023

Any resolution ? @bartekpacia @jBorkowska

@bartekpacia
Copy link
Contributor

What versions of patrol and patrol_cli are using right now, @lravihs?

@lravihs
Copy link
Author

lravihs commented Oct 12, 2023 via email

@bartekpacia
Copy link
Contributor

This issue has been spammed with a few other issues to the point I don't think it's useful keeping it open.

Nevertheless, we see it's a real problem you're facing - sorry about that. See #1745 for continuation.

@bartekpacia bartekpacia closed this as not planned Won't fix, can't repro, duplicate, stale Oct 26, 2023
@leancodepl leancodepl locked and limited conversation to collaborators Oct 26, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
waiting for response Waiting for user's response
Projects
None yet
Development

No branches or pull requests

7 participants