Issue while running test suites running parallel in Cypress with Jenkins - jenkins

my team integrated test suites developed in Cypress with Jenkins. They are planning to run all 10 test suites in parallel using Jenkins CI/CD pipeline with a single server node which is 32 GB machine. But when running in parallel all 10 test suites in parallel it is failing with below error.
Fatal server error:
(EE) Server is already active for display 111
If this server is no longer running, remove /tmp/.X111-lock
and start again.
Can anyone please let me know how to resolve this issue?

Related

How to re-run cypress test case failures through Jenkins pipeline?

I am running my cypress through Jenkins and Bamboo. Recently, I got so many failure based on issues out RDMS. I had to re run all the failures based on the tests spec name through Jenkins.
Is there any way to re-run my failed specs / tests through Jenkins for my Cypress automation framework ?
Please watch Gleb Bahmutov Cypress v12.5.0 Debug Tab, at 1:18 "Run failures" button.
This Debug Tab is new to Cypress 12.5.0.
The changelog states
12.5.0
Released 01/31/2023
Features:
Easily debug failed CI test runs recorded to the Cypress Cloud from your local Cypress app with the new Debug page.
The documentation is here Debug

Setup & Execution of Jmeter Distributed Test run from Jenkins

i'm looking for some assistance in execution of Jmeter distributed test runs using Jenkins hosted on Windows platform.
I need to know how to
Start Jmeter master/slave agents (jmeter-server.bat) from Jenkins machine.
how to stop the above process once the test run completes.
A hint: if you don't "stop the above process once the test run completes" you won't have to "start" them.
If you want to control everything from Jenkins you need to install Jenkins agent process on each machine you intend to use as JMeter slave, see Step by step guide to set up master and agent machines on Windows Jenkins wiki page for more details.
Once done you can create a job which will start JMeter processes using simple "Execute windows batch command" step on the agent machines
With regards to your point 2 - it's sufficient to set server.exitaftertest JMeter property to true on slave machines in any convenient way, i.e. by adding -J command-line argument like:
jmeter-server.bat -Jserver.exitaftertest=true
For any Distributed Load Run via Jmeter, the pre-requisite is to get the Jmeter-server.bat running to support and enable master-slave communications by Jmeter between Load agents. Initially i had a struggle how to get this executed as first step in Jenkins and then followed execution of Jmeter commands for load test using Remote distributed run. Hence instead of running the pre-requisite condition of running Jmeter-server.bat from jenkins i made it as a Windows service (as load agents are windows machines) which is running all time and whenever Load test starts from Jenkins, the Jmeter-server running in background which will allow distributed run to go.

Triggering ALM test sets (UFT tests) in Jenkins Unix slave

We have a Jenkins Unix slave through which builds are scheduled in different testing environments.
Objective:
To schedule a job in Jenkins unix slave to trigger 2 ALM test sets(containing 30 UFT test cases each) in 2 different physical machines.
Could you please let me know the following:
i. Is it possible to trigger a job to run ALM test sets(containing UFT scripts) in a Jenkins Unix slave ?
ii. If yes, then is it possible in Jenkins to know that execution of all 60 scripts has been completed so that entire team can be notified of the results.
Analysis done from our side:
We checked with our Jenkins admin to provide a Windows slave but its not possible due to project restrictions. If we schedule a job in Jenkins to run a Windows batch file , it throws an exception as it tries to run the .bat file in Jenkins Unix Slave.
According to the official UFT PAM - Operating Systems, it is not Supported - only on Windows Computers. If you are doing Web Testing, then you can try UFT Developer (or formerly LeanFT) that supports Linux Systems.
If it's only WebTesting than on the other side you are better of with some Free Tools, beginning with Selenium, Taiko, Cypress etc

Deploy test agent task runs infinitely and does not exit

Issue Description:
We have release definitions set up to execute Coded UI test cases, the test agent deployment task has run into an issue where in it the execution does not end until the deployment is manually cancelled, the message displayed on the terminal is as follows "DistributedTests: Task 'ConfigureTestAgent' on machine 'HOSTNAME:5985' is taking time. Please Wait"
vsts_testagent.exe path is supplied from local path.
Environment Details:
TFS on-premises , TFS 2017 15.112.26307.0 (Tfs2017.Update1)
Build Agent : Private, OS: Windows Server 2012 R2, build agent version : 2.112.0
Test Agent : Private, OS: Windows 10
Test deployment task version: vstf_testagent.exe version version 14.0.23107.10
Test agent deployment step will spend longer time when the first time to deploy the test agents on a machine, if a server has been deployed successfully before, it would be much faster.
Please try below items to fix that:
Try with same credentials for build agent and test agent.
Try to download the test agent and install it on that machine manually, then try to queue build with the test agent deployment taskagain. (Install and configure test agents)
Try to deploy the test agent on another clean test machine.
Similar issue in Github for your reference: https://github.com/Microsoft/vsts-tasks/issues/2023

Configure Jenkins to Execute tests in UFT

I am running UFT Test Suite manually on the host machine, however i now have the requirement to run the smoke tests as soon as the new build is delivered in jenkins. For that i need to run the test suite automatically using Jenkings. Can someone help me in the direction, how this can be achieved? I have never used Jenkins before.
Looks like theres a plugin for Jenkins which enables integration with HP UFT. Take a look at the Jenkins wiki page for instructions about how to install and use it.
As you didn't mention that you are using ALM so I am assuming that you have some kind of driver script in vbs which runs your test suite. You do not necessarily require any plugin in jenkins to run your UFT suite(however you can also check the suggestion given in the previous answer). Create a job in jenkins and call your vbs file (driver file) or a bat file which kicks off your execution your test machine.
Your test execution machine can be configured as jenkins slave. Only thing which you need to take care off is to remove the settings which can let go your jenkins slave machine which is your uft execution machine in standby mode or locked user mode(uft scripts will fail otherwise). You can handle this by configuring windows settings(if admin allows) or by using some small scripts to move mouse after some intervals.
Your test execution job in jenkins(master) machine can be made dependent on the job which goes to success when new build is available. As soon as new build is available - that job goes to success then your Test job gets notified and connects to UFT execution machine(slave) and starts running your test.
I am trying to integrate ALM with jenkins but not working
Started by user admin
Running as SYSTEM
Building in workspace C:\JENKINSHOME\workspace\CLRP_AUTO_RN
[CLRP_AUTO_RN] $ C:\JENKINSHOME\workspace\CLRP_AUTO_RN\HpToolsLauncher.exe -paramfile props05092020010832244.txt
"Started..."
Timeout is set to: -1
Run mode is set to: RUN_PLANNED_HOST
Unable to retrieve test set folder: Node not found.
Node not found.
Starting test set execution
Test set name: CLRP Smoke Test Automation Run, Test set id: 104
Class not registered (Exception from HRESULT: 0x80040154 (REGDB_E_CLASSNOTREG))
Could not create scheduler, please verify ALM client installation on run machine by downloading and in installing the add-in form: http://almserver:8080/qcbin/TDConnectivity_index.html
Build step 'Execute Micro Focus functional tests from Micro Focus ALM' changed build result to FAILURE
Finished: FAILURE

Resources