Flutter ios appium不会启动应用程序在browserstack上运行测试



browserstack告诉我,我需要以--profile模式构建我的ios应用程序,您的文档也是如此

问题是,即使我在-profile模式下构建,我归档.ipa的唯一方法就是选择Release方案,选择任何其他方案都会导致归档失败。

运行此命令以配置文件模式进行构建会使构建成功

[08:09:30]: $ flutter build ios --profile --build-number=776 --build-name=5.0.776 --no-codesign --flavor Profile -t lib/test_main.dart

然后我使用xcode Release方案归档.ipa,归档成功。

我上传到浏览器堆栈应用程序实时

然后我运行我的appium测试,但我得到了这个错误

[0-0] 2022-02-22T13:17:27.447Z INFO webdriver: Retrying 3/3
[0-0] 2022-02-22T13:17:27.447Z INFO webdriver: [POST] https://hub-cloud.browserstack.com/wd/hub/session
[0-0] 2022-02-22T13:17:27.448Z INFO webdriver: DATA {
[0-0]   capabilities: {
[0-0]     alwaysMatch: {
[0-0]       app: 'REDACTED',
[0-0]       device: 'iPhone 12',
[0-0]       os_version: '14.0',
[0-0]       project: 'Baird Mobile',
[0-0]       build: 'browserstack-build-ios',
[0-0]       name: 'Tests',
[0-0]       automationName: 'Flutter',
[0-0]       acceptSslCerts: 'true'
[0-0]     },
[0-0]     firstMatch: [ {} ]
[0-0]   },
[0-0]   desiredCapabilities: {
[0-0]     app: 'REDACTED',
[0-0]     device: 'iPhone 12',
[0-0]     os_version: '14.0',
[0-0]     project: 'Baird Mobile',
[0-0]     build: 'browserstack-build-ios',
[0-0]     name: 'Tests',
[0-0]     automationName: 'Flutter',
[0-0]     acceptSslCerts: 'true'
[0-0]   }
[0-0] }
[0-0] 2022-02-22T13:18:35.834Z ERROR webdriver: Request failed with status 200 due to WebDriver Error: Could not start Mobile Browser. Error occured while starting the session. To verify if all the pre-requisites for running Appium Flutter Driver tests have been met, refer to - https://www.browserstack.com/docs/app-automate/appium/test-hybrid-apps/test-flutter-apps
[0-0]  Reason: 
[0-0] An unknown server-side error occurred while processing the command. Original error: Failed to connect 3 times. Aborting.
[0-0] 2022-02-22T13:18:35.834Z ERROR webdriver: WebDriver Error: Could not start Mobile Browser. Error occured while starting the session. To verify if all the pre-requisites for running Appium Flutter Driver tests have been met, refer to - https://www.browserstack.com/docs/app-automate/appium/test-hybrid-apps/test-flutter-apps
[0-0]  Reason: 
[0-0] An unknown server-side error occurred while processing the command. Original error: Failed to connect 3 times. Aborting.
[0-0]     at getErrorFromResponseBody (/Users/dhannah/Development/BolUiTestFramework/node_modules/webdriver/build/utils.js:197:12)
[0-0]     at NodeJSRequest._request (/Users/dhannah/Development/BolUiTestFramework/node_modules/webdriver/build/request/index.js:158:60)
[0-0]     at processTicksAndRejections (internal/process/task_queues.js:95:5)
[0-0]     at async startWebDriverSession (/Users/dhannah/Development/BolUiTestFramework/node_modules/webdriver/build/utils.js:67:20)
[0-0]     at async Function.newSession (/Users/dhannah/Development/BolUiTestFramework/node_modules/webdriver/build/index.js:58:45)
[0-0]     at async remote (/Users/dhannah/Development/BolUiTestFramework/node_modules/webdriverio/build/index.js:73:22)
[0-0]     at async Runner._startSession (/Users/dhannah/Development/BolUiTestFramework/node_modules/@wdio/runner/build/index.js:223:56)
[0-0]     at async Runner._initSession (/Users/dhannah/Development/BolUiTestFramework/node_modules/@wdio/runner/build/index.js:176:25)
[0-0]     at async Runner.run (/Users/dhannah/Development/BolUiTestFramework/node_modules/@wdio/runner/build/index.js:88:19)
[0-0] 2022-02-22T13:18:35.835Z ERROR @wdio/runner: Error: Failed to create session.
[0-0] Could not start Mobile Browser. Error occured while starting the session. To verify if all the pre-requisites for running Appium Flutter Driver tests have been met, refer to - https://www.browserstack.com/docs/app-automate/appium/test-hybrid-apps/test-flutter-apps
[0-0]  Reason: 
[0-0] An unknown server-side error occurred while processing the command. Original error: Failed to connect 3 times. Aborting.
[0-0]     at startWebDriverSession (/Users/dhannah/Development/BolUiTestFramework/node_modules/webdriver/build/utils.js:72:15)
[0-0]     at processTicksAndRejections (internal/process/task_queues.js:95:5)
[0-0]     at async Function.newSession (/Users/dhannah/Development/BolUiTestFramework/node_modules/webdriver/build/index.js:58:45)
[0-0]     at async remote (/Users/dhannah/Development/BolUiTestFramework/node_modules/webdriverio/build/index.js:73:22)
[0-0]     at async Runner._startSession (/Users/dhannah/Development/BolUiTestFramework/node_modules/@wdio/runner/build/index.js:223:56)
[0-0]     at async Runner._initSession (/Users/dhannah/Development/BolUiTestFramework/node_modules/@wdio/runner/build/index.js:176:25)
[0-0]     at async Runner.run (/Users/dhannah/Development/BolUiTestFramework/node_modules/@wdio/runner/build/index.js:88:19)
[0-0] FAILED in joshuarufer_jXfqM5/BairdMobile - /src/specs/login_tests.js
2022-02-22T13:18:35.948Z INFO @wdio/cli:launcher: Run onComplete hook
Spec Files:      0 passed, 1 failed, 1 total (100% completed) in 00:03:58 
2022-02-22T13:18:35.950Z INFO @wdio/local-runner: Shutting down spawned worker
2022-02-22T13:18:36.202Z INFO @wdio/local-runner: Waiting for 0 to shut down gracefully
2022-02-22T13:18:36.203Z INFO @wdio/local-runner: shutting down

从您的文章中,我了解到您无法在调试模式下生成.ipa,而是使用发布模式本身。

你能试着查看下面的StackOverflow帖子吗?它介绍了如何在调试模式下导出iOS应用程序:如何从flutter获取.apk和.ipa文件?

相关内容

  • 没有找到相关文章

最新更新