Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

unable to run scripts from jenkins

We are using sikuli tool for mobile automation on our MAC OSX 10.7.3 I have written a shell script to open simulator and to run scripts on simulator:

SikuliScript.sh 
/Users/ezprintsqa/Downloads/FoneMonkey/bin/iphonesim launch /Users/ezprintsqa/Documents/Xcode/DerivedData/SnapCards-btmjdowsgmixpvdyfxfvhxtoihab/Build/Products/Debug-iphonesimulator/SnapCardsFoneMonkey.app&

/Users/ezprintsqa/Downloads/Sikuli-IDE.app/sikuli-ide.sh -r /Users/ezprintsqa/Downloads/SikuliWorkSpace/SnapcardsTestSuite1.sikuli

When I execute from command line I can see simulator opening and scripts getting executed on simulator. But when I run from Jenkins I am getting the following error:

[JavaAppLauncher Error] CFBundleCopyResourceURL() failed loading MRJApp.properties file
[DEBUG] Could not start simulator session: Error Domain=DTiPhoneSimulatorErrorDomain     Code=5 "Operation failed with underlying error 4294956486." UserInfo=0x100305c70    {NSLocalizedDescription=Operation failed with underlying error 4294956486.,    NSUnderlyingError=0x100300610 "The operation couldn’t be completed. (OSStatus error     -10810.)"}
[LaunchRunner Error] No main class specified
[JavaAppLauncher Error] CallStaticVoidMethod() threw an exception
Exception in thread "main" java.lang.NullPointerException
at apple.launcher.LaunchRunner.run(LaunchRunner.java:113)
at apple.launcher.LaunchRunner.callMain(LaunchRunner.java:51)
at apple.launcher.JavaApplicationLauncher.main(JavaApplicationLauncher.java:61)

Any suggestions will be very helpful

like image 432
Praveen Avatar asked Nov 17 '25 03:11

Praveen


1 Answers

It definitely looks like a permission issue. The official Jenkins installer for Mac sets up Jenkins to run either as user "daemon" or user "jenkins". You need to make tools needed by Jenkins readable and executable by that user. Also, they need to be in a directory which is readable and executable by that user.

However, even if you get the permissions fixed, you will probably have further problems with your test run. The official Jenkins installer for Mac sets up Jenkins to run as a launch daemon. These run in the system context and they have no access to any desktop or GUI session, which means it is not possible to draw windows on the screen => Any tool that displays windows, like iPhone Simulator or Sikuli is going to fail.

You could try my unofficial Jenkins.app instead, which should solve your problem. It is available at https://github.com/stisti/jenkins-app (download it under the Downloads tab.)

like image 124
sti Avatar answered Nov 19 '25 22:11

sti



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!