Open Eruhenon opened 7 years ago
What form errors are you seeing @Eruhenon? Are you using a pre-built IPA to test or using one CocoaPods / Carthage etc?
Adding @bootstraponline just in case he has something to share.
We're also looking into running our EarlGrey tests on AWS. Step one was making the tests run on a local physical device. I'll comment once we have some tests running successfully on AWS.
Amazon commented:
I'm not looking into AWS anymore so the Amazon forums are probably the best place for support.
Earlgrey works with XCTest and I have tested that it works. Use steps outlined here: https://docs.aws.amazon.com/devicefarm/latest/developerguide/test-types-ios-xctest.html
https://firebase.google.com/docs/test-lab/ios/command-line is what I'm using now.
@githubist16 & @bootstraponline is there any way we could add to our docs for support for the different CI platforms?
Linking to https://firebase.google.com/docs/test-lab/ios/firebase-console for firebase is sufficient I think.
Finally got this going again using EG 2.0 on AWS Device farm. These were the steps used (some of these steps need to be fleshed out. I will keep updating this):
Contact AWS team to add 1 or more private devices to your account:
Add the private device(s) to your team's provisioning profile:
Run steps used to build EG 2.0 tests
Zip up Products folder (Feel free to zip up even more files ex. a shell script you might want to access, etc.)
Products.zip content can look something like
Products
| - *.xctestrun
| - Debug-iphoneos/
| - iOS_Cert.p12 file
| - run_all_the_things.sh
On AWS Device farm:
Edit the yaml spec file to look like the following:
Your steps will need to also import your iOS cert (*.p12) for your codesign identity (I did not show this below, but can cleanup mine and add scripts. I did show that cert file is part of the zip file)
version: 0.1
phases:
install: commands:
# To use a different appium version, change 'APPIUM_VERSION' below to your desired version.
# For convenience, we have preinstalled the following versions - 1.6.5, 1.7.1, 1.7.2, 1.8.0, 1.8.1, 1.9.1
# By default the node version installed is 11.4.0
# you can switch to an alternate node version using below command.
# - nvm install 10.13.0
# Unpackage and install the node modules that you uploaded in the test phase.
pre_test: commands:
# Appium server log will go to $DEVICEFARM_LOG_DIR directory.
# The environment variables below will be auto-populated during run time.
- echo "Start appium server"
# The default WDA used is at DEVICEFARM_WDA_DERIVED_DATA_PATH_V1 (Supports versions iOS 12 and below), it is using commit f865d3. See (https://github.com/appium/appium-xcuitest-driver/tree/f865d32e78a5a8a15469bee30ed2f985d378575d)
# If you need an older WDA version or need support for node modules, use the WDA at DEVICEFARM_WDA_DERIVED_DATA_PATH_V0. (This version does not suport iOS 12)
test: commands:
- echo "Navigate to test source code"
# Change the directory to node_modules folder as it has your test code and the dependency node modules.
- cd $DEVICEFARM_TEST_PACKAGE_PATH/
- ls $DEVICEFARM_TEST_PACKAGE_PATH
- CUSTOM_XCUITESTRUN_FILE=$DEVICEFARM_TEST_PACKAGE_PATH/vEarlGreyTests_iphoneos12.1-arm64e.xctestrun
- CUSTOM_DERIVED_DATA_PATH=$DEVICEFARM_TEST_PACKAGE_PATH
- /usr/bin/xcodebuild test-without-building -destination id=$DEVICEFARM_DEVICE_UDID -xctestrun $CUSTOM_XCUITESTRUN_FILE -derivedDataPath $CUSTOM_DERIVED_DATA_PATH -only-testing:<YOURSCHEME>/<YOUR_TEST_CLASS>
- echo "Start Appium Node test"
# Enter the command below to start the tests . The comamnd should be similar to what you use to run the tests locally.
# For e.g. assuming you run your tests locally using command "node YOUR_TEST_FILENAME.js.", enter the same command below:
post_test: commands:
artifacts:
Select your private device
Run test
That sounds awesome.
QQ -
Contact AWS team to add 1 or more private devices to your account
Could we get a link for how to do this? This would look great in a setup doc. Feel free to send it as a .md PR to us.
Hey,
we're trying to run EarlGrey on AWS device farm. It fails with various errors. Since I can't find any information about anyone succeeding to run this (except for https://github.com/google/EarlGrey/issues/154) I thought I'd ask here for advice :)
If anyone could guide me in the right direction, it would be very appreciated!