Ability to write variables in test file
See original GitHub issueLooking forward for something like where users are able to declare their own variables inside tavern file. I know there is a way to use !include and declare but I want it to be specific to this test case file.
test_name: Sample Test Name
variables:
common_url: "https://sample.com/{group_endpoint}"
stages:
- name: List specific group with id
request:
url: "{common_url}/id/abc1"
method: GET
response:
status_code: 200
- name: List specific group with id2
request:
url: "{common_url}/id/abc2"
method: GET
response:
status_code: 200
Issue Analytics
- State:
- Created 2 years ago
- Comments:5 (2 by maintainers)
Top Results From Across the Web
How to write any variable created in a test to the jasmine ...
I have jasmine-reporters set up and working, and writing to an output.xml file. How do I get any variables I create in my...
Read more >Test your skills: variables - Learn web development | MDN
The aim of this skill test is to assess whether you've understood our Storing the information you need — Variables article.
Read more >How to Write Test Cases: The Ultimate Guide with Examples
Tutorial #3: Writing Test Cases from SRS Document ... Tutorial #24: Boundary value analysis and Equivalence partitioning ...
Read more >Unit Tests, How to Write Testable Code, and Why It Matters
In this article, I will show that unit testing itself is quite easy; the real problems that complicate unit testing, and introduce expensive...
Read more >TestComplete 301: Variables & Variable Creation - YouTube
This class will teach you all about variables in TestComplete. Download a free trial of TestComplete here: ...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
What I mean is I have a
common.yaml
file which contains some variables like domain name and port number. But now I want to add more variable specific to the test only and use some variables fromcommon.yaml
to build new variables specific for the current test file.Ah sorry, I didn’t realise you meant inside one file and not just in one test.
Each test in Tavern is a separate YAML document and are all basically treated as separate files so you can’t do something like that. Do you want something like:
?