Setting ReadyAPI active environment from GitLab CI/CD pipeline
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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.
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
A curl command is defined in the .yml file. In this file ReadyAPI tests are executed through testEngine.
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
If you use TestEngine REST API, you must specify the environment parameter in your POST request (curl).
See the API definition: https://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.
https://apimate.eu
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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?
