Skip to content

Remove Xcode Archive & Export for iOS step requirement#9

Open
brunnoferreira wants to merge 11 commits intobrowserstack:mainfrom
mobile-service-au:tech/fixes
Open

Remove Xcode Archive & Export for iOS step requirement#9
brunnoferreira wants to merge 11 commits intobrowserstack:mainfrom
mobile-service-au:tech/fixes

Conversation

@brunnoferreira
Copy link
Copy Markdown

@brunnoferreira brunnoferreira commented Oct 13, 2022

Hi team,

First of all thank you very much for your great work. I'm part of Airwallex and we have been using your App Automate product for a while. We recently moved the mobile CI/CD to Bitrise and were happy to see this official step being offered.

Premium Bitrise subscriptions, you might be aware, run on credits (derived from running minutes), so it is in the best interest of every team to have efficient builds. Thus, we wanted to improve the suggested integration you have here: https://www.browserstack.com/docs/app-automate/xcuitest/bitrise.

The extra Xcode Archive & Export shouldn't be necessary, because Xcode Build for testing already builds everything needed for UI tests – just not in IPA form like the BrowserStack API requires. This is the main change in this PR, then: an additional input field so users can specify the target name, which the step will look for in its .app bundle form and compress into a valid .ipa that finally gets uploaded. That should free up anywhere from 10 minutes to hours of build time – depending on the complexity of the project – if you are running this workflow separately like we are.

This PR also includes smaller, less impactful changes for features we had been using from the RESTful API:

  • Another two input fields (optional) for App Custom ID and Test Bundle Custom ID;
  • Change devices to deviceSelection. We couldn't make shards work before that change, so it now follows what is documented here.

We haven't made changes to the README file yet because we would first like to know if you would be willing to accommodate these changes, but happy to do so in that case.

Thank you in advance for taking the time to review this. Looking forward to discussing the changes and hopefully seeing official support for them soon!

@innovater21
Copy link
Copy Markdown

Hey @brunnoferreira
Thanks for the detailed message and pointers !
Looking into the changes this week

@innovater21
Copy link
Copy Markdown

innovater21 commented Oct 20, 2022

The changes look good. Will be starting testing the same. Please update the README file describing the changes. Also, you can bump the version to 1.1.0
@brunnoferreira

@brunnoferreira
Copy link
Copy Markdown
Author

Thanks, @innovater21! README updated and version bumped.

@innovater21
Copy link
Copy Markdown

Hey @brunnoferreira
While passing the xcui_test_suite path we're getting same bundle id error.
This is due to Browserstack expecting both the app and test_suite to have different bundle ids.
If it's working on your end, you can share your logs and usage for the changes

@brunnoferreira
Copy link
Copy Markdown
Author

Can I suggest checking if that is not a problem with the installation/device or how the project is set up, @innovater21? The same bundle ID error is usually an installation error when an app with that same identifier is already present.

I don't believe the changes in here should affect that because:

  • Setting bundle identifiers is a project task and should be done in Xcode prior to building;
  • Test runners usually get their bundle IDs suffixed with .xctrunner automatically by Xcode to avoid any clashes in the case that you indeed make a mistake and give both the main target and the UI tests target the same identifier (if you assign it com.example-uitests, runner will end up being com.example-uitests.xctrunner);
  • Building the app for testing or having Xcode create the IPA directly (like that the step currently does without the changes proposed here) does not affect the bundle ID of an app since that is a fixed value on the project level.

If those are not helpful, what sort of logs would you be looking for? Happy to provide them, the step is just not very verbose as it stands.

@innovater21
Copy link
Copy Markdown

Hey @brunnoferreira
We checked our local testing project for bundle ids, and they were different as expected. But after running through the step, we're still getting the same bundle id error on browserstack
To further debug this issue, will need local successful execution logs from your side

  1. App id , test suite id , session id of successful browserstack session run using this branch changes
  2. Terminal log of bitrise step
  3. Sample bitrise.yml of Xcode Project if possible

@fepersembe
Copy link
Copy Markdown

@innovater21 What about moving this one step further and make browserstack run .xctestrun bundles directly and allow us to run XCode Test Plans on Browserstack :)

@innovater21
Copy link
Copy Markdown

@fepersembe We've already launched XCTest Plans on Browserstack. You can check over here : https://www.browserstack.com/docs/app-automate/xcuitest/run-xctestplans/getting-started

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants