ios – xcodebuild UITests screenshots location


I have UITests which test my iOS app and make screenshots for release on AppStore.
I run test from command line:

xcodebuild test -workspace 'MyProject.xcworkspace' -scheme 'MyProject' -destination 'platform=iOS Simulator,name=iPhone 15 Plus,OS=17.0.1' -destination 'platform=iOS Simulator,name=iPhone 13 mini,OS=17.0.1' -only-testing MyProjectUITests/MyProjectScreenshots -derivedDataPath '/Volumes/projects/apple/MyProject/Screens'

After tests I get at the end or command line output

Test session results, code coverage, and logs:
    /Volumes/projects/apple/MyProject/Screens/Logs/Test/Test-MyProject-2023.11.18_15-18-46-+0200.xcresult

** TEST SUCCEEDED **

Also I can open this .xcresult file in Xcode and see screenshots.
But for saving screenshots to release foldter I need pick one by one each screenshot (20 items), press “Save Attachment…”, select folder etc..

Is it possible to make as easie?
When I open Test-MyProject-2023.11.18_15-18-46-+0200.xcresult as folder I see following folders/files:

Data
Info.plist
database.sqlite3

Folder Data contains “data” and “refs” files and no images:

18 15:22 data.0~-AW7Z5eonr7ERKZzv4X-Eph5uLT_TawiB0QLz7hnFAfp_BwyE4285rJmbNtva6Z5tzaulJuShzDqXY-OcNcHQg==
data.0~-HotSyqpnQiGSzETRwLexeJP3RMXgFhG7vUYM6ahDEnyAmKf68vfXR25yFuj3FeGVwiMliSwoUylc_TOnsuYEA==
data.0~-Mve5kAIcP1KcJq5B-t6HkBcR0c8mCyOx7eMi8rvCApPNI6z36t5B3a_yOJjawLCghbFqBHI37Vx5cfSAq54Gg==
data.0~-P9OGsSQOe7_u3hVgyGduS-LOXQ1xojIfzt69vuAwrYiBP5KbS558nLBzCK3raQZRkvnBIPonGY6wdIkdzZ1JQ==
...
refs.0~xINxxF87f4pfxMcjrD5osQ34R9U3y_wWEMQZVAFNlIdcl0mSryw_7ARteAgn3DTZjUhsSTmcrv06EfPO89xgyQ==
refs.0~zkldkf1kBSNG-lugSYFlfgDthWtcYxAkKLAHgElOwjuDWuYNob4d5exYYkQtlKTmZqy73obtCCHgA6BJ_RSpOA==

I use last Xcode 15.0.1.

Please advice how save all screenshots to one folder or where are located screenshots files for coping them for AppStore?

Latest articles

spot_imgspot_img

Related articles

Leave a reply

Please enter your comment!
Please enter your name here

spot_imgspot_img