Hi all,
I've been troubleshooting this day and night and haven't been able to find a way to make this work. I will try my best to explain our set up. This is what we are using:
I have a Firefox profile called 'Selenium' set up on the Jenkins slave server running Windows. The browser plug-in is enabled and connected using this profile and I can see the agent connected to dynaTrace with the Agent name: Browser_Selenium_FF
In the code that calls the WebDriver, I have the following:
ProfilesIni profile = new ProfilesIni();
FirefoxProfile ffprofile = profile.getProfile("Selenium");
driver = new FirefoxDriver(ffprofile);
Here is where it gets interesting. If I'm logged into the Windows Server (Jenkins slave)and launch a build manually from command line, the WebDriver will get called and Firefox will appear on my screen and the browser agent will connect properly. I will see the agent show up in the Agents Overview. This is good.
However, if I were to launch the build from Jenkins, which will in-turn call the Jenkins slave to run the build, I will not see the agent show up in the Agent Overview when WebDriver is called. I'm almost convinced that the browser-agent doesn't even load for some reason.
Have even tried installing a 'command-line plugin' for Jenkins that will run the maven command directly instead of through the maven Plugin but it still didn't work. Not sure why it would work when manually running the build and not via Jenkins.
Has anyone encountered something like this before? Or have any suggestions how to go about resolving this?
Thanks.
Answer by Kevin N. ·
Seems I answered my own problem. I tried:
1) Based on suggestions I read online, change the 'Log On' properties for the Jenkins Slave service to log in as local system account and have 'Allow service to interact with desktop' checked off. Then restart the service. The build failed, but it might have caused something to initialize differently when I ran the build.
2) I reverted back the change and restarted the Jenkins Slave service again.
After step 2, I was able to see the browser plug-in interact with dynaTrace and it was showing up in the Agents Overview when I ran the build via Jenkins.
It could very well have been a recycle of the service that did it, though I cannot be sure. Regardless, it's working now.
JANUARY 15, 3:00 PM GMT / 10:00 AM ET