My jenkins job starts the application which launches in default browser say, chrome.
is it possible to capture browser console logs from jenkins when application is launched?
This is not for UI/Selenium automation.
Related
I'm new to Jenkins, I've created a Jenkins freestyle job used necessary plugins to invoke desktop application. When I execute the job with user credentials, I cannot see the application but application got up and logged on with user credentials. I'm doing GUI Automation which causes failures all the times when I try to run the job.
I created a batch file on HOST, calling the batch file through Jenkins. I have tried injecting the environment for job. I have enabled interactive services and Jenkins-slave on HOST machine. I tried to change NT/System user to Specific user. I enabled interactive services in both conditions. I'm not sure what I'm missing here. Do I need to install anything else, so far I have Jenkins-slave.exe on my HOST, I managed to generate executable Jar file using that.
Any help on this will be appreciated.
I'm calling the batch file, Jenkins cannot find the application opening apparently, it returning error as None type Object(Python) as described in screenshot.errors on Jenkins Job execution
I had a similar issue when I was trying to run Selenium UI Test on Windows Slave.
When the Slave is connected to Windows as a Service, then it does not bring up the application in foreground. It runs only in background even if you enable the service to interact with the desktop.
I had to change my browser to headless browser and then my test cases were passed in background mode.
My Old Question
I've a created a plugin with a button which does some task when clicking it. I've put this plugin in my local Jenkins (/jenkins/plugins) location and then restarted server.
The button appears on every job page, but When I put the same plugin in production server and restart it, the button doesn't appear.
Both my local Jenkins and production Jenkins have same version (2.7.1)
I put plugin.jar and plugin.hpi files in /jenkins/plugins location
Can anyone have idea whats the problem. How can I debug it?
You should be able to create a log by going to:
Manage Jenkins > System Log > Add a New Log Recorder.
Check the System Log for any loggers that are printing warnings during the Jenkins boot process, add them to the Log Recorder, and adjust the logging level to your liking.
https://wiki.jenkins-ci.org/display/JENKINS/Logging
I have two Jenkins machines.
Both run windows batch commands
When I start programs on one, they start in the background (Staging box).
When I start programs on the other, they start in the foreground, and you can see the window and watch the program as it's running (Production box).
I'm trying to test a program which only works in the foreground (it's a Cocos game executable and probably needs to be in the foreground to run properly).
I need to know what Jenkins-settings to change so that my staging-Jenkins box behaves the same as my Production-Jenkins box.
I have already tried:
The jenkins windows service is running as the currently logged in user.
Most other questions talk about forcing it to the background, which is the opposite of my problem.
Finally figured it out.
If you are running Jenkins as a Windows service, then the service is running in the background, and thus the programs started by Jenkins will also be run in the background.
If you run Jenkins in the foreground (Ie, typing "java -jar jenkins.war" in a console window), then programs started by Jenkins will also be in the foreground (since the foreground console window is the Jenkins process).
Jenkins-Slaves run as a service, but they run with a foreground window, so they show up in the foreground of the slave machine.
No need to run jenkins as jar. Rather one can configure the same system(master/ or some other system) as slave in Manage Jenkins -> Manage Nodes. Then connect the slave system with master.
In the jenkins job configuration, select node name in the job general configuration section mentioning the slave system where job will be running.
Then build the job. It worked for me.
Rightnow, my jenkins jobs are run by Tomcat Server user.
I wanted it to run as User 'Admin', so i tried creating a slave and
added my same jenkins machine as the slave.
I have also added this as a windows service, and have confiured the
Admin user/pwd in the Logon Tab.
But still, when i run a job which executes the UI tests, i'm not able
to see them running in the firefox but it runs and the screenshots
are captured!
Are you asking how to have Jenkins spawn a process in your session that you can see at the monitor?
Have a look here: Open Excel on Jenkins CI, replace excel with whatever you are launching.
If you use jenkins as windows service, it won't allow GUI execution.
It only allows backgound running jobs.
If you want run UI test then stop your jenkins service , use some other way to connect your slave.
We are running Jenkins on an OSX server as a service user. The Jenkins user is restricted (not able to log in) because the server is accessible to the outside world.
We are running unit tests in the IOS Simulator. However, the simulator will start, but not run the app. I believe this is because Jenkins' user does not have UI access/permissions because we can run the app when logged in with users directly on the machine with UI.
Is there a way to add permissions to Jenkins user that will allow the IOS Simulator to run with UI without compromising security?
Are you running Jenkins as a daemon service? If so, it won't be able to interact with UI, see launchd man page
I ran into the same problem before when trying to perform UI Automation, so I configured Jenkins as launch agent of a user, then I could run UI test from Jenkins as that user.
For security, maybe you can setup access control on Jenkins see Standard Security Setup