Load Generators going Non-Operational overnight causes CI/CD runs to fail in Jenkins
I am using Jenkins to trigger Test Runs in performance center.
Sometimes the Load Generators goes Non-Operational and this causes test triggerred from Jenkins to fail. This kills whole purpose of automating runs in Jenkins as this needs manual intervention then.
What are the workarounds available to overcome this?
I had tried and used 'HTTP Request' in Build Step in Jenkins to make call to Performance Center Admin Rest API to Authenticate and then Reconfigure Load Generator, below 2 APIs were used:
The problem here is - the 'HTTP Request' in Jenkins does not allow to capture the Cookie from Response Headers from Authenticate API and pass it as Header (Cookie) in subsequent Reconfigure API.
Please share your current Performance Center version.
Need to validate why the LGs becomes none operational from time to time. I suggest to open a support case to investigate it.
In addition please use thefollowing hint which may work as a solution for the authentication: https://stackoverflow.com/questions/12399087/curl-to-access-a-page-that-requires-a-login-from-a-different-page
I overcame this challenge now, used below approach.
1) Used 'Execute Windows Batch Command' in Build Action
2) Made a call to API Suite configured on same Load Generator
3) Reconfigured LG
Also, I noticed that the LG goes Non-Operational while initializing the test in Performance Center. This was due to suspended Controller process running (I am using same machine as LG + Controller). Most probably left behind by previous test.
So executed "Killtask /IM Wlrun.exe /F || true" everytime in Jenkins before kicking off the test.