egarlock
egarlock

Reputation: 579

Calling Snapshot in Jenkins results in Time out for Simulator

I am using Snapshot from the FastLane suite.

For my purposes I am calling the various tools from scripts and pass in the appropriate environment variables I am using as the inputs.

I am having trouble when I call my script in Jenkins vs from the command line. When I call the script within a Build Step in Jenkins the result is a message from Snapshot saying the process has timed out after waiting 120 seconds for the simulator to boot. If I run this same script from the terminal Snapshot runs as expected without error.

Example:

snapshot \
--workspace "MyWorkspace.xcworkspace" \
--scheme "MyScheme" \
--output_directory "MyOutputDirectory" \
--clear_previous_screenshots \
--stop_after_first_error

(--devices --languages can be found in ./Snapfile)

Snapfile:

devices([
  "iPhone 4s"
])

languages([
  "en-US"
])

Am I missing something here?

Upvotes: 0

Views: 360

Answers (1)

mokagio
mokagio

Reputation: 17471

Configuring Jenkins to work for iOS testing and automation is not a simple task, there are a lot of gotchas.

Jenkins the result is a message from Snapshot saying the process has timed out after waiting 120 seconds for the simulator to boot.

This suggests that your Jenkins machine is not able to run the Simulator. This can happen if the jenkins user is not able to start a UI session.

These two posts have useful information on how to configure Jenkins for iOS development:

The second in particular addresses the issue of Jenkins not running as a GUI user.

Good luck.

Upvotes: 1

Related Questions