Reputation: 2435
Ever since some recent update of fastlane it prevents simulators from opening a visible window. Keyboard button taps are still audible and the UI tests are executed, but the simulator window itself is not opened.
This is ok in most cases, however right now I need to dig deep and see what's happening, as somehow fastlane executes the tests slightly different than Xcode, resulting in our CI server to go nuts. (Xcode = all tests run smoothly. fastlane = all UI tests fail, both locally and on the CI server.)
So: is there a way, some parameter or environment variable, to tell scan to open that window to be able to see what's happening?
(Yes I could use snapshot to generate screenshots at specific points, but it's simply not enough when wanting to find out what the hell is going on.)
Hope someone can help :)
Found the solution:
scan
should use the simulator that is already open, however I got error messages when running scan
when a simulator was running. Updating to 2.68.0
did the trick for me.
Upvotes: 4
Views: 2565
Reputation: 1026
Unfortunately, snapshot and scan have no builtin option for this. As a workaround, you can launch the simulator by hand (right click on the Xcode icon in the Dock, Open Developer Tool > Simulator
).
snapshot will close the simulator if it is open when run and print the following line:
Patching simulators '/Users/<home>/Library/Preferences/com.apple.iphonesimulator.plist' to scale to 100%
After that, it is safe to relaunch the simulator. For scan you can just keep the simulator running.
When snapshot or scan boot the simulators that you have configured and the simulator app is running, the windows will show up and you'll be able to see what is happening - but be careful as snapshot is run concurrently now, and this will open windows for all configured devices.
You can modify your configuration to only run on a single device while testing this way, or you can run a one-off action by running snapshot from the terminal like this:
fastlane run snapshot devices:"iPhone 6" languages:"de-DE" #... all other parameters are similarly supported
Upvotes: 5