Ask a Question

Setting ReadyAPI active environment from GitLab CI/CD pipeline

mu123
Occasional Contributor

Setting ReadyAPI active environment from GitLab CI/CD pipeline

Our regression test suite runs daily against the environment env1. Occasionally we need to run the test suite against the environment env2.  As of now we modify the environment in ReadyAPI and commit the code to the GitLab master branch. This modified code will be run during the daily CI/CD pipeline schedule. Once completed, we again modify the environment in ReadyAPI and commit the code. I was wondering if there is any way to pass the active environment from GitLab to ReadyAPI. This will avoid modifying the code every time we need to run the test against a different environment.

4 REPLIES 4
KarelHusa
Super Contributor

@mu123, how do you currently run ReadyAPi from GitLab?

 

 

Karel@apimate.eu
https://apimate.eu
mu123
Occasional Contributor

A curl command is defined in the .yml file. In this file ReadyAPI tests are executed through testEngine.

KarelHusa
Super Contributor

@mu123,

If you use TestEngine REST API, you must specify the environment parameter in your POST request (curl).

 

See the API definitionhttps://app.swaggerhub.com/apis/smartbear/readyapi-testengine/1.10.1#/testjob/postProjectTestjob

 

The postProjectTestjob operation has a query parameter called environment.

 

Further information is in https://support.smartbear.com/testengine/docs/how-to/run-test.html.

 

Karel@apimate.eu
https://apimate.eu
mu123
Occasional Contributor

Thanks for the reply.

There is a POST request in the command and the environment is mentioned as env1.

POST "http://remoteServer/environment=env1

 

If I define a variable for the environment and pass the value in the command, would the process use this as the active environment when executing the test suite in ReadyAPI?

cancel
Showing results for 
Search instead for 
Did you mean: