Jenkins doesn't launch the application under test on chromebrowser

I ran into an issue with Jenkins which I've never seen before and I thought I'll get some advice. Jenkins wouldn’t launch the AUT on the chrome browser for running selenium tests.

Steps that I followed:

  1. A Jenkins Master and Slave are setup on the same machine. Not as a windows service, but I launch them manually via command prompt
  2. I setup a project on the Slave node with 2 build steps. One for the MSBuild (I dowloaded the plugin) to build the solution and the second step for executing the windows batch command that will start the tests
  3. I also have a TFS plugin to fetch the server version of the solution to build on Jenkins
  4. So when I build the job on Jenkins Slave,
  5. The solution gets built successfully without any errors
  6. Then for the next build step, Jenkins executes the windows batch command and loads the .dll file. Says “starting execution..”
  7. Chromedriver launches. It opens up the chrome browser
  8. But the chrome browser wouldn’t launch the AUT. It just tries to load it and stays intact indefinitely until my Jenkins job times out
  9. With all this happening, my CPU utilization is at 100%. The browser that runs the Jenkins UI on the local host and Java.exe*32 consumes it to the fullest
  10. I ran the exact same MSTest.exe command (that I entered in the build step) in command prompt when Jenkins is not running and it launches the AUT successfully and tests ran
  11. I ran the exact same MSTest.exe command (that I entered in the build step) in command prompt when Jenkins is running. It again spikes the CPU to 100% and AUT never launches

Any thoughts?

Answers


I was also running into this issue and solved it as follows.

Basically the jenkins slave has to be started from the startup through a batch job.

Here is the step by step process.

Node URL : http://host:port/computer/nodeName/

  1. Go to the node "Node URL"
  2. Click on "Mark this node temporarily offline"
  3. Go the the machine where slave is running.
  4. Open command prompt in admin mode.
  5. cd to the location where jenkins is installed
  6. Execute jenkins-slave uninstall
  7. Go to services (type services in run) and stop the jenkins slave running
  8. Restart the machine.
  9. cd C:\Users\myUserName\AppData\Roaming\Microsoft\Windows\Start Menu\Programs\Startup
  10. Create a new batch job (name say LaunchJenkinsSlave.bat) with following content

> java -jar C:/Jenkins/slave.jar -jnlpUrl http://host:port/computer/nodeName/slave-agent.jnlp -secret yourSecret

netsh advfirewall firewall set rule group="remote desktop" new enable=Yes

<< fyi : You can refer jenkins-slave.xml in your Jenkins install location for yourSecret, nodeName, host ect if you forgot.

  1. Restart your machine.

Observation : Jenkins slave will be started automatically 12. Go to the "Node URL" and bring the node back online.

Hope this helps.


Need Your Help

STM32F207 I2C test failing

c embedded i2c interrupt-handling stm32

I am learning embedded development on the STM3220G-EVAL board with the STM32F207 microcontroller. I have tried to test the I2C interface by interfacing the two I2C2 and I2C3 modules on the same chi...