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

[Mobile] Add E2E BrowserStack tests for iOS tests #22610

Merged
merged 15 commits into from
Nov 6, 2024

Conversation

carzh
Copy link
Contributor

@carzh carzh commented Oct 25, 2024

Description

  • Changes running the E2E iOS tests from running in App Center to running in BrowserStack
  • Steps for running locally can be found in the OneNote

Motivation and Context

Misc info

Additional build steps were required to get the necessary testing artifacts for BrowserStack. App Center consumed an entire folder, while BrowserStack requests the following:

  1. a ZIP file of all the tests
  2. an IPA file of the test app

Flow

Here is a rough outline of what is happening in the pipeline:

  1. The build_and_assemble_apple_pods.py script builds the relevant frameworks (currently, this means packages for iOS and Mac)
  2. The test_apple_packages.py script installs the necessary cocoapods for later steps
  3. XCode task to build for testing builds the iOS target for the test app
  4. Now that the test app and the tests have been built, we can zip them, creating the tests .zip file
  5. To create the IPA file, we need to create a .plist XML file which is generated by the generate_plist.py script.
    • Attempts to use the Xcode@5 task to automatically generate the plist file failed.
    • Also, building for testing generates some plist files -- these cannot be used to export an IPA file.
  6. We run the Xcode task to build an .xcarchive file, which is required for creating an IPA file.
  7. We use xcodebuild in a script step to build an IPA file with the xcarchive and plist files from the last two steps.
  8. Finally, we can run the tests using the BrowserStack script.

@carzh carzh requested review from skottmckay and edgchen1 October 25, 2024 21:23
Copy link
Contributor

@github-actions github-actions bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You can commit the suggested changes from lintrunner.

tools/python/generate_plist.py Outdated Show resolved Hide resolved
@carzh
Copy link
Contributor Author

carzh commented Oct 26, 2024

Working mac packaging pipeline run

Working android packaging pipeline run

@carzh carzh marked this pull request as ready for review October 30, 2024 21:03
@carzh carzh requested a review from a team as a code owner October 30, 2024 21:03
@carzh
Copy link
Contributor Author

carzh commented Nov 1, 2024

skottmckay
skottmckay previously approved these changes Nov 4, 2024
…-packaging-build-stage.yml

Co-authored-by: Edward Chen <[email protected]>
@carzh carzh dismissed stale reviews from skottmckay and edgchen1 via 5f40cec November 4, 2024 18:11
@snnn snnn dismissed github-actions[bot]’s stale review November 5, 2024 22:06

Dismiss outdated review from lint runner

@carzh carzh closed this Nov 5, 2024
@carzh carzh reopened this Nov 5, 2024
@carzh carzh merged commit 0221693 into main Nov 6, 2024
89 of 91 checks passed
@carzh carzh deleted the carzh/browserstack-ios-test-pr branch November 6, 2024 19:22
ishwar-raut1 pushed a commit to ishwar-raut1/onnxruntime that referenced this pull request Nov 19, 2024
### Description
- Changes running the E2E iOS tests from running in App Center to
running in BrowserStack
- Steps for running locally can be found in the OneNote

### Motivation and Context
- Follow-up of microsoft#22117 
- App Center (the previous platform for running E2E mobile tests) is
getting deprecated in 2025

### Misc info
Additional build steps were required to get the necessary testing
artifacts for BrowserStack. App Center consumed an entire folder, while
BrowserStack requests the following:
1. a ZIP file of all the tests
2. an IPA file of the test app

#### Flow
Here is a rough outline of what is happening in the pipeline:
1. The build_and_assemble_apple_pods.py script builds the relevant
frameworks (currently, this means packages for iOS and Mac)
4. The test_apple_packages.py script installs the necessary cocoapods
for later steps
5. XCode task to build for testing builds the iOS target for the test
app
6. Now that the test app and the tests have been built, we can zip them,
creating the tests .zip file
7. To create the IPA file, we need to create a .plist XML file which is
generated by the generate_plist.py script.
- Attempts to use the Xcode@5 task to automatically generate the plist
file failed.
- Also, building for testing generates some plist files -- these cannot
be used to export an IPA file.
8. We run the Xcode task to build an .xcarchive file, which is required
for creating an IPA file.
9. We use xcodebuild in a script step to build an IPA file with the
xcarchive and plist files from the last two steps.
10. Finally, we can run the tests using the BrowserStack script.

---------

Co-authored-by: Scott McKay <[email protected]>
Co-authored-by: Edward Chen <[email protected]>
guschmue pushed a commit that referenced this pull request Dec 2, 2024
### Description
- Changes running the E2E iOS tests from running in App Center to
running in BrowserStack
- Steps for running locally can be found in the OneNote

### Motivation and Context
- Follow-up of #22117 
- App Center (the previous platform for running E2E mobile tests) is
getting deprecated in 2025

### Misc info
Additional build steps were required to get the necessary testing
artifacts for BrowserStack. App Center consumed an entire folder, while
BrowserStack requests the following:
1. a ZIP file of all the tests
2. an IPA file of the test app

#### Flow
Here is a rough outline of what is happening in the pipeline:
1. The build_and_assemble_apple_pods.py script builds the relevant
frameworks (currently, this means packages for iOS and Mac)
4. The test_apple_packages.py script installs the necessary cocoapods
for later steps
5. XCode task to build for testing builds the iOS target for the test
app
6. Now that the test app and the tests have been built, we can zip them,
creating the tests .zip file
7. To create the IPA file, we need to create a .plist XML file which is
generated by the generate_plist.py script.
- Attempts to use the Xcode@5 task to automatically generate the plist
file failed.
- Also, building for testing generates some plist files -- these cannot
be used to export an IPA file.
8. We run the Xcode task to build an .xcarchive file, which is required
for creating an IPA file.
9. We use xcodebuild in a script step to build an IPA file with the
xcarchive and plist files from the last two steps.
10. Finally, we can run the tests using the BrowserStack script.

---------

Co-authored-by: Scott McKay <[email protected]>
Co-authored-by: Edward Chen <[email protected]>
ankitm3k pushed a commit to intel/onnxruntime that referenced this pull request Dec 11, 2024
### Description
- Changes running the E2E iOS tests from running in App Center to
running in BrowserStack
- Steps for running locally can be found in the OneNote

### Motivation and Context
- Follow-up of microsoft#22117 
- App Center (the previous platform for running E2E mobile tests) is
getting deprecated in 2025

### Misc info
Additional build steps were required to get the necessary testing
artifacts for BrowserStack. App Center consumed an entire folder, while
BrowserStack requests the following:
1. a ZIP file of all the tests
2. an IPA file of the test app

#### Flow
Here is a rough outline of what is happening in the pipeline:
1. The build_and_assemble_apple_pods.py script builds the relevant
frameworks (currently, this means packages for iOS and Mac)
4. The test_apple_packages.py script installs the necessary cocoapods
for later steps
5. XCode task to build for testing builds the iOS target for the test
app
6. Now that the test app and the tests have been built, we can zip them,
creating the tests .zip file
7. To create the IPA file, we need to create a .plist XML file which is
generated by the generate_plist.py script.
- Attempts to use the Xcode@5 task to automatically generate the plist
file failed.
- Also, building for testing generates some plist files -- these cannot
be used to export an IPA file.
8. We run the Xcode task to build an .xcarchive file, which is required
for creating an IPA file.
9. We use xcodebuild in a script step to build an IPA file with the
xcarchive and plist files from the last two steps.
10. Finally, we can run the tests using the BrowserStack script.

---------

Co-authored-by: Scott McKay <[email protected]>
Co-authored-by: Edward Chen <[email protected]>
ankitm3k pushed a commit to intel/onnxruntime that referenced this pull request Dec 11, 2024
### Description
- Changes running the E2E iOS tests from running in App Center to
running in BrowserStack
- Steps for running locally can be found in the OneNote

### Motivation and Context
- Follow-up of microsoft#22117 
- App Center (the previous platform for running E2E mobile tests) is
getting deprecated in 2025

### Misc info
Additional build steps were required to get the necessary testing
artifacts for BrowserStack. App Center consumed an entire folder, while
BrowserStack requests the following:
1. a ZIP file of all the tests
2. an IPA file of the test app

#### Flow
Here is a rough outline of what is happening in the pipeline:
1. The build_and_assemble_apple_pods.py script builds the relevant
frameworks (currently, this means packages for iOS and Mac)
4. The test_apple_packages.py script installs the necessary cocoapods
for later steps
5. XCode task to build for testing builds the iOS target for the test
app
6. Now that the test app and the tests have been built, we can zip them,
creating the tests .zip file
7. To create the IPA file, we need to create a .plist XML file which is
generated by the generate_plist.py script.
- Attempts to use the Xcode@5 task to automatically generate the plist
file failed.
- Also, building for testing generates some plist files -- these cannot
be used to export an IPA file.
8. We run the Xcode task to build an .xcarchive file, which is required
for creating an IPA file.
9. We use xcodebuild in a script step to build an IPA file with the
xcarchive and plist files from the last two steps.
10. Finally, we can run the tests using the BrowserStack script.

---------

Co-authored-by: Scott McKay <[email protected]>
Co-authored-by: Edward Chen <[email protected]>
ankitm3k pushed a commit to intel/onnxruntime that referenced this pull request Dec 11, 2024
### Description
- Changes running the E2E iOS tests from running in App Center to
running in BrowserStack
- Steps for running locally can be found in the OneNote

### Motivation and Context
- Follow-up of microsoft#22117 
- App Center (the previous platform for running E2E mobile tests) is
getting deprecated in 2025

### Misc info
Additional build steps were required to get the necessary testing
artifacts for BrowserStack. App Center consumed an entire folder, while
BrowserStack requests the following:
1. a ZIP file of all the tests
2. an IPA file of the test app

#### Flow
Here is a rough outline of what is happening in the pipeline:
1. The build_and_assemble_apple_pods.py script builds the relevant
frameworks (currently, this means packages for iOS and Mac)
4. The test_apple_packages.py script installs the necessary cocoapods
for later steps
5. XCode task to build for testing builds the iOS target for the test
app
6. Now that the test app and the tests have been built, we can zip them,
creating the tests .zip file
7. To create the IPA file, we need to create a .plist XML file which is
generated by the generate_plist.py script.
- Attempts to use the Xcode@5 task to automatically generate the plist
file failed.
- Also, building for testing generates some plist files -- these cannot
be used to export an IPA file.
8. We run the Xcode task to build an .xcarchive file, which is required
for creating an IPA file.
9. We use xcodebuild in a script step to build an IPA file with the
xcarchive and plist files from the last two steps.
10. Finally, we can run the tests using the BrowserStack script.

---------

Co-authored-by: Scott McKay <[email protected]>
Co-authored-by: Edward Chen <[email protected]>
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