This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
desc “Run UI Tests on iPhone 11 Pro” | |
lane :ui_tests | |
tests_to_run = options[:only_testing] | |
clear_derived_data(derived_data_path: derived_data_path) | |
sh(“xcrun simctl shutdown booted”) | |
sh(“xcrun simctl erase all”) | |
sh(“xcrun instruments -w ‘iPhone 11 Pro (13.3) [‘ -t Blank”) | |
scan(workspace: “Wealthfront.xcworkspace”, | |
scheme: “WealthfrontUITests”, | |
output_style: “basic”, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def getAllUITestClassNames() { | |
def allSwiftFiles = sh( | |
script: “find WealthfrontUITests -name ‘*.swift’”, | |
returnStdout: true | |
).trim().split(‘\n’) as String[] | |
def directory = pwd() | |
def allClassNames = [] | |
allSwiftFiles.each { | |
def file = readFile “${directory}/${it}” | |
def matcher = (file =~ /(?<=class ).*?(?=:)/) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def partitionTestClassNames(classNames, buckets) { | |
def subArrays = [] | |
def bucketSize = classNames.size() / buckets | |
for (int i = 0; i < buckets; i++) { | |
def start = i * bucketSize | |
def end = i == buckets - 1 ? classNames.size() : start + bucketSize | |
subArrays += [classNames[start..<end]] | |
} | |
return subArrays | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
partitioned_test_cases = [] | |
pipeline { | |
environment { | |
TARGET_PARALLEL_AGENTS = 3 | |
} | |
stages { | |
stage(“Partition UI tests”) { | |
steps { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
partitioned_test_cases = [] | |
pipeline { | |
agent { label ‘iOS’ } | |
environment { | |
TARGET_PARALLEL_AGENTS = 3 | |
} | |
stages { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
USERNAME=`id -un` | |
PASSWORD=`security find-generic-password -ws $WF_CI_KEYCHAIN_ITEM_NAME` | |
# Map USER + PASSWORD to test account credentials | |
# ... |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@UIApplicationMain | |
class AppDelegate: UIResponder, UIApplicationDelegate { | |
private let WFAccessGroupKey: String = "WFAccessGroup" | |
private let WFCredentialHelperServiceKey: String = "WFCredentialHelperServiceName" | |
private let AccessPropertiesPlistName: String = "KeychainAccessGroupBridge-Dev" | |
private let TestAccountUsernameKey = "TestAccountUsernameKey" | |
private let TestAccountPasswordKey = "TestAccountUsernameKey" | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Find credentials in keychain | |
# ... | |
# Create test account credentials ($USER + $PASS) | |
# ... | |
# Boot target simulator if not already booted | |
# ... | |
xcrun simctl get_app_container $TARGET_DEVICE_IDENTIFIER com.Wealthfront.CredentialHelper 2> /dev/null | |
if [[ $? -e 0 ]]; then |