Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Want to Stop the Debugging Console Clearing after Test Run during UI Testing in Xcode

When I’m running individual tests using UI testing in Xcode 7.1.1 and the test is complete, the debugging console logging output disappears.

I’m running tests using the simulator and my setUp() contains XCUIApplication().launch().

While the test is running, the console fills up with the output for the test.

It erases when the simulator closes after the test is complete.

Is there a way to prevent the console text from disappearing and to keep it visible after the test completes?

like image 816
Daniel Zhang Avatar asked Nov 16 '15 19:11

Daniel Zhang


1 Answers

You can view the log output of your test in the Report navigator, the last tab of the Navigators area in Xcode (command-9 to open that tab in Xcode 9, screenshot is from an earlier version). Just choose your test run, then select Logs at the top of the Xcode editor rather than Tests, highlight your test bundle, and click the little icon on the right side of the highlighted row that shows the multiple horizontal lines. This will show you the full output of the test, including your logging.

enter image description here

like image 80
Charles A. Avatar answered Sep 20 '22 15:09

Charles A.