mcdcorp / opentest

Open source test automation tool for web applications, mobile apps and APIs
https://getopentest.org
MIT License
447 stars 107 forks source link

How to pass sessionLabel of a template dynamically from CI/CD ? #502

Closed IamRajB closed 2 years ago

IamRajB commented 3 years ago

OpenTest version number: 1.2.4

Steps to reproduce:

  1. Run any template containing a sessionLabel
  2. Run command opentest session create --template $TEMPLATE --env $ENVIRONMENT --server http://localhost:3030 --wait

Is there any way to pass sessionLabel or modify existing sessionLabel through command or any way from CI/CD ?

adrianth commented 3 years ago

You can do that by making an API call to the server, as described here: https://getopentest.org/reference/web-api.html#creating-a-test-session. The second sample payload in that section does just that.

IamRajB commented 3 years ago

Right now the command 'opentest session create --template template_name' is being used in Jenkins. Having a custom sessionLabel with this command seems not possible.

How to make API call(in order to have custom sessionLabel) to server FROM Jenkins/CircleCi ?

stale[bot] commented 2 years ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.