Search code examples
iphonexcodescreenshotxcode-ui-testing

How to turn off automatic screenshots on UI Testing (Xcode)


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?


Solution

  • 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.