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

Pass dynamic value in tags & choose TCs according to that in Template #539

Closed IamRajB closed 2 years ago

IamRajB commented 2 years ago

Would you add a way where test can accept dynamic value in tags array

For e.g. tags: $data("").env or tags: [$session.environment]

Whole test: includes: [] tags: $data("").env actors:

env: [plp-detailed, US]

adrianth commented 2 years ago

Having test tags change depending on the environment you're running in doesn't seem like a good idea, since the purpose of test tags is to make it possible to identify tests. Please describe your scenario and what you're trying to accomplish, so I can try to give you a suggestion for how to approach it.

IamRajB commented 2 years ago

Say I have test cases- TC_X, TC_Y & TC_Z and environment- dev and prod

Now I have template smoke.yaml and all 3 TCs are in there. But I want TC_Z to run on only dev environment. How can I do with having only single template?

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.