Distributed, headless parallel testing for xctest/pxctest
Need to divvy up your XCTests to run against multiple devices which share work/tests among each other for faster runs? Look no further...
- clones your repo
- checks out a branch
- pod install
- builds your workspace (with special test params)
- builds your simulators and builds lists of tests to execute based on pattern matching "ends with Test" in the tests_dir via JSON config
- runs tests in parallel via Popen
- install pxctest -
brew tap plu/pxctest && brew install pxctest --HEAD
- clone my repo -
git clone https://github.com/apkatsikas/xctest_pxctest_distributed
- edit ios_tests.json - see JSON Instructions
- run the python file
python ios_parallel.py
- see your results at
./project/sim_devices/{"number of sim device"}/target/iOS version/ios device/junit.xml
- modify "number_of_simulators" to your desired count. On my beefy machine, 3 was the max I could pull off.
- modify "tests_dir" to the expected relative location of your UI tests in your project
- modiy "directory" to your desired directory where the repo will be cloned/simulators build etc.
- modify "clone_statement" to the URL of your git repo
- modify "checkout branch" to the branch you want to test against"
- modify "project string" to your project string
- modify all occurences of 'name=iPad Air 2,os=iOS 10.2' to your expected device string
- modify occurences of -scheme 'project' and -workspace 'project.workspace' and -destination 'platform=iOS Simulator,name=iPad Air 2,OS=10.2' to your expected values
- modify occurence of "project_iphonesimulator10.2-x86_64.xctestrun" to your output device name
- modify occurence of "--only 'uitests%s' to your test target string
Please don't hesitate to reach out if you have any questions!