I am new to Jenkins and currently I have to test machine Test1 and Test2 on the test machines , I run ranorex automation tests , every thing works fine until i start getting the issue and that is when I restart my remote desktop(Test1 machine) and remote desktop(Test2 machine) both machine does not comes online on jenkins dashboard and appears as offline , then when I manually start both machine then on dashboard they both came online and my test execution works , previously i tried to use jenkins as service which some how block my automation test execution and error comes "The system needs to be interactive" , so I disabled jenkins service for Windows Service which solves my "The system needs to be interactive" error but I landed with this issue , whenever I perform restart my both test machines went offline
Any help in this regards
Thanks
You can use a schedule task with the 'On Startup' trigger, this is how I'm doing it and it works well.
Related
Setup:
test framework around latest WebdriverIO v.7
Jenkins on GCP: master - Ubuntu, slave - Windows Server 2022 VM.
connection between Jenkins master and slave is done with GCP jenkins plugin, so Windows slave is being created for test and then dies.
app under test: Electron v14.2.1 based app.
Test - "User can start screenshare"
User start a call.
User select an available screen and start a screenshare.
Problem:
Electron library can not detect available screen for capturing and sreensharing, because there is no RDP connection opened in test session.
In test logs no sources (screen) found:
2022-08-01 07:40:20:409 -00:00 | info | main-api-handler: - open-screen-picker-window - Properties: {
"cmd": "open-screen-picker-window",
"id": 1,
"sources": []
}
Questions:
How can the screen be emulated?
Where the RDP should be established? Should it?
Are there other way than RDP to provide the screen for the Electron app?
The problem was solved by my colleague:
"So the root cause of this issue is that the SSH server which Jenkins uses to configure the node runs as a service, and that means it has problems interacting with desktop apps. Unfortunately, Windows' own SSH server only runs as a service. More explanations here: Starting GUI programs via OpenSSH on Windows?
To resolve this, I installed a separate SSH server (OpenSSH from MSYS2). The machine image is configured to autologin on boot, and sshd is started on logon as the currently logged in user. This gives it access to the desktop, and screenshare tests now seem to work better"
I'm currently performing a task which requires the use of Apache Tomcat.
When starting up Apache automatically through a windows service, the task fails.
However when I right click command prompt, and select 'Run as Administrator' and start Apache using a bat file, the tasks completes successfully.
This leads me to believe the tomcat service needs to be configured to run as admin.
Could you guide me on how to do this?
Try running the service under a local systems account.
I will shortly try to explain what I am trying to do here. I need to periodically check the response time of the my site by logging into the system and noting the time to load the welcome page.
I am doing this using Selenium WebDriver and Java. I am currently checking the response time using the org.apache.commons.lang3.time.StopWatch which start when user hits the login button and stops when welcome page renders completely. I check weather this response time is above threshold level and send mail to admin alerting him in case of slow response of system.
Currently, I have created the executable jar file which opens the web browser using Selenium WebDriver and check the response time. I have also created the job in Jenkins using DOS commands which runs periodically using cron schedular. This I'm doing in my Windows 7 pc and I have Jenkins installed on my localhost. The scheduled job builds on Jenkins periodically but I can't see any activity like opening the web browser and the further task explained above. It runs perfectly when I use windows scheduler to execute batch file. The ultimate goal I have, is to run the Selenium WebDriver tests on the Linux system via jenkins while Jenkins server has been installed on a Linux machine.
Any help will be great! Also let me know if anybody wants to see the code.
I have a build running under Jenkins (Windows 7) that builds a C++ application. I wrote a small test app in python that runs the application after it is built and tests its networking capabilities. The problem is that the python script fails with
socket.error: [Errno 10061] No connection could be made because the target machine actively refused it
The test app works fine if I run it locally (it's only connecting on localhost 127.0.0.1) but it always fails when run under Jenkins.
I thought it was the firewall preventing the connection, but I discovered that the firewall has been turned off on the build machine.
I also have the Jenkins service logging in with an account that has admin access. I don't know where else to look.
Is it possible to run an app that accesses the local network during a Jenkins build?
Update:
As it turns out, my issue has nothing to do with networking, as far as I can tell. The C++ app tries to setup some DirectX9 services and is blocked from doing so under the user privileges provided by Jenkins. As a result, it quits before it even gets to setting up the networking. Now I have a different problem to solve.
I have a build/test server which is currently running Jenkins for my continuous integration and it also is acting as my test server where code will be deployed to once built (i hope to rectify this and seperate these at a later date when budget allows)
I have a .NET web solution (nothing complex just Umbraco essentially) that i have in SVN and Jenkins is now building correctly. I now want to deploy it onto the same server using MSDeploy. After the build completes the package is generated but the deploy fails with the error
ERROR_DESTINATION_NOT_REACHABLE: Web deployment task failed. (Could not connect to the remote computer ("xxxxx.xxxxxxx.xxx.xxxx"). On the remote computer, make sure that Web Deploy is installed and that the required process ("Web Management Service") is started
Here is my msbuild parameters that Jenkins uses
/P:Configuration=Release
/P:DeployOnBuild=True
/P:MSDeployPublishMethod=WMSVC
/P:DeployTarget=MSDeployPublish
/P:PublishProfile=GetSomePixels
/P:MsDeployServiceUrl=https://build.########
/P:AllowUntrustedCertificate=True
/P:CreatePackageOnPublish=True
/P:UserName=#######
/P:Password=########
I've checked the server and the Web Management Service is running and is starting up manually
I've also gone into IIS 8 manager (server 2012) and checked the "Allow Remote Connections" box under "Management Service". Restarted IIS and the WMSVC and still not working.
If i go to https://myserver.co.uk:8172/MsDeploy.axd in a browser it resolves (gives you the warning about an untrusted cert) and then displays a blank page.
Anyone got any ideas as to what i can do? I thought that it may be firewall related and even though it had added an exception to windows firewall for 8172 i have turned the entire firewall off to completely rulle that out and still no luck.
Have run this on the server to check its listening on the correct port
C:\Users\Administrator>netstat -a | findstr 8172
TCP 0.0.0.0:8172 GSP-BUILD:0 LISTENING
TCP [::]:8172 GSP-BUILD:0 LISTENING
Ok i've resolved this. It appears you have to activate the web management service first and then install web deploy and i'd done it the other way round. I uninstalled WebDeploy and re-installed it, restarted the server and its working
Agree with comment.
We had a similar issue. Initial installation even post Web Management Service activation appeared to be incomplete. In our case, even though the service said it was started we couldn't achieve the "green tick" when testing the connection from the Publish dialog when defining a profile.
Reinstalling WebDeploy 3.6 made it function properly.