I am running Xcode's UI Testing through Jenkins. Screenshots are taken at each step and so after running the suite for a while, the Mac uses up all its hard drive space. Does anyone know if you can switch off Xcode UI Testing's automatic screenshots, so less space is used?
Another way of doing this is configuring your Xcode Scheme to not take screenshots, by doing the following in Xcode:
I'm not sure how to turn off screen shots but you could put the screen shots to a location where they'd be deleted:
xcodebuild -workspace App.xcworkspace \
-scheme "SchemeName" \
-sdk iphonesimulator \
-destination 'platform=iOS Simulator,name=iPhone 6,OS=9.0'
-derivedDataPath '/dev/null'
test
Note the -derivedDataPath '/dev/null'
which is where the screen shots will be going. This will put the screen shots to the null device, which is a special device which discards the information written to it.
Hope that helps, happy testing!
I didnt find a reliable way to deactivate screenshots, but the size taken up by them was removed by setting the following in jenkins:
Jenkins > Open Job > Configure > Build > Xcode > Advanced build settings > tick the box labelled 'Clean test reports'
This now keeps the test results in a far more manageable size and means I can constantly keep my test suites running in jenkins.
Hope this helps someone else.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With