Setting QA/STG environment in Keyword tests
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Setting QA/STG environment in Keyword tests
Hello,
How do I set the environment setting URL so I don't have to edit the keyword test or change the variable url every time.
I want to set the Environment to QA or STG and automatically pick up the right URLs and run the test against it.
I have tried Project variable but the problem is I have to change the default Environment URL every time.
I think if there is a way to save the QA/STG URLs somewhere and associate it to Environment variable so if I say QA it picks up QA URL
in script testing I can easily associate the environments using if statement but with Keyword test I am having a problem
Best,
- Labels:
-
Keyword Tests
-
Test Run
-
Web Testing
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Do you mean, how to set project variables using keyword test?
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
If statements are available in Keyword tests as well. You should be able to use the same logic you're using in code to select the appropriate environment.
Can you share a screenshot of the script code and the keyword code you're attempting?
Robert Martin
[Hall of Fame]
Please consider giving a Kudo if I write good stuff
----
Why automate? I do automated testing because there's only so much a human being can do and remain healthy. Sleep is a requirement. So, while people sleep, automation that I create does what I've described above in order to make sure that nothing gets past the final defense of the testing group.
I love good food, good books, good friends, and good fun.
Mysterious Gremlin Master
Vegas Thrill Rider
Extensions available
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
this is how its added for script testing. in the rest of the project we can use URL and not worry about changing anything manually in the script.
I did try the If...Then statement, I could not get it to work
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
this is how its added for script testing. in the rest of the project we can use URL and not worry about changing anything manually in the script.
I did try the If...Then statement, I could not get it to work
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
It will be something like this,
You can use /PrjVar to update the variable at the command line, without having to modify the project variable.
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Thank you, that seems to work as long as the URL defined in NamesMapping matches the If statement that is true. is it possible to have Names Mapping also pickup from the If..Then result?
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I don't quite understand "is it possible to have Names Mapping also pickup from the If..Then result?" ?
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
The URL which is in NameMapping, this is added automatically when recording
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
You generally don't change the NameMapping during the test, you change the test to match the name mapping.
You said the If Then statement wasn't working for you. What happened when you tried it?
Marsha_R
[Community Hero]
____
[Community Heroes] are not employed by SmartBear Software but
are just volunteers who have some experience with the tools by SmartBear Software
and a desire to help others. Posts made by [Community Heroes]
may differ from the official policies of SmartBear Software and should be treated
as the own private opinion of their authors and under no circumstances as an
official answer from SmartBear Software.
The [Community Hero] signature is used with permission by SmartBear Software.
https://community.smartbear.com/t5/custom/page/page-id/hall-of-fame
