Reputation: 38
Is it possible for this setting to work?
1) Ubuntu 14 with Jenkins, Genymotion, and Virtual Box installed
2) The job inside Jenkins will restore and run Genymotion from a command line following this tutorial: http://blog.genymobile.com/genymotion-jenkins-android-testing/
From my Mac, I tried to access the Jenkins website and run the build. Firstly, Genymotion failed because it couldn't "connect to X server". So, I installed Xvnc Plugin on Jenkins which solved the error. Unfortunately, Genymotion still failed to start up with the error "Cannot get IP address".
Please note that I only have "ssh -X" access to the server. I can manually start up Genymotion but the process was terminated when I logged off. As a result, I could not leave the GenyMotion run on the Server as suggested by this solution: Jenkins - Use Genymotion VM instead of Android Emulator
Any advice?
Upvotes: 0
Views: 565
Reputation: 151
It`s a bit late, but maybe this could help you out
### Get IP address of selected VM
VM_IP=`VBoxManage guestproperty get $VM_SELECTED androvm_ip_management | awk - F ": " '{print $2}'`
I found this here (repo) respectively here (slides)
Upvotes: 0
Reputation: 7116
Here is the way to make Genymotion works on a continuous integration server.
I don't think xVNC supports OpenGL so I advise you to run your standard X server.
You can launch the Xorg server by running startx
.
DISPLAY
to the default X client's value. Most of the time it is :0
This value will ask to open all the windows you launch through the ssh connexion into the first X client. It is the one running on the computer screen.
To check the DISPLAY value you need to enter, you need to access the computer physically and type echo $DISPLAY
. Most of the time this value is :0
Also, if your computer is not compatible with the hardware requirements, you can use another computer on your network to run your tests thanks to the Jenkins nodes. Here is a good tutorial to set it up.
And finally, I want to mention we will soon release a command line tool for Genymotion and a Gradle Plugin that will allows you to control your Genymotion devices running during your tests directly from your build.gradle
file.
Upvotes: 0