How to get crash log of host app when running UI tests

When running a UI test the other day, an assertion failure terminated the test early when an expected button did not come onto screen. In looking at the screenshots, it appears the hosting app died during the test, leaving the UI test runner staring at the Springboard, rather than the main app, during accessibility element evaluation.


In looking through the log files (Xcode Server > xcbot_name > Logs > Download Logs...) I see logs about the test runner and its attempts to find an on-screen button. But I see nothing about the main hosting app itself and why it crashed.

Are these crash logs kept only in the Simulator?

(I really hope not, as the nature of our project requires constant Simulator resets to avoid app cache conflicts between branch integrations)

Replies

Solution: Choose the App target -> 2 as indicated in the screenshot to print app logs in the console.