I am using Jenking to run my selenium scripts on a remote server. My question is "Is there any way to visually see my scripts running on the server? I mean on an actual browser when scripts are running in Jenkins?"
No, you cannot visually see a browser running on ubuntu server but apart from that you can run a headless browser and log everything to see the progress of your scripts running on server.
Yes, either use a Sauce labs account, or just run tightVNC server on the remote system, which runs a vnc server in a "Java Viewer" and by setting a "readonly password" to the server, you can open a browser and using the java viewer, basically you can watch the session and you can even "scale" the size of the desktop just like Sauce Labs can do.
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"
We're doing some testing in Rails using a headless browser for our feature tests using RSpec and the web drivers gem: https://github.com/titusfortner/webdrivers to get the Chrome driver.
However we've had some issues whereby some developers don't have Chrome installed (and don't intend to) and also we have our app running on a Jenkins pipeline and we want to avoid having to install Chrome on the server for the tests...
Is it possible to run a headless browser without installing the actual browser as well as a hard dependancy on the system that the tests run on?
I've read conflicting articles that state headless allows you to still do your testing either when the system doesn't have the browser installed... but at the same time the documentation for Chrome and Firefox state the browser also needs to be installed when using their drivers.
https://github.com/rubycdp/cuprite I also came across this which bypasses the need for WebDriver etc... but still seems to have a hard dependancy on having Chrome installed on the system the tests run on.
You have to choose a browser:
Chrome: chromedriver
Firefox: geckodriver
Edge: edgedriver
Internet Explorer: iedriver
See https://github.com/titusfortner/webdrivers
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/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.
I want to allow others to access my website created through Netbeans but I don't know how to do so. Ive searched and I found that you had to buy webservers and domain names?
However, I only want to host the webpage using my own computer since it isn't really anything commercial. How can I publish the webpage using Netbeans or my own computer? Would using IIS of Windows be possible?
Thanks!
You can download or use (if you have installed) Apache-Tomcat to deploy your web-app on your local machine.
Text from the above mentioned link.
It is possible to deploy web applications to a running Tomcat server.
If the Host autoDeploy attribute is "true", the Host will attempt to
deploy and update web applications dynamically, as needed, for example
if a new .WAR is dropped into the appBase. For this to work, the Host
needs to have background processing enabled which is the default
configuration.