authorjapps / authorjapps/zerocode
Variable section for Zerocode DSL
- Dominant language
- Java
- Stars
- 1k
- Forks
- 453
- Avg merge
- 7d 2h
- Merged PRs (30d)
- 5
Description
As an automation test engineer
I want a port number or a random number or a random string or all of them to be available to my steps inside a single scenario
So that I will be able to reuse this in my steps easily.
Is this already available... by chance?
An example would look like below:
```json
{
"name":"vars",
"port":8090,
"employeeName":"Joe Tidd",
}
In the next step or in any subsequent steps:
{
"url": "http://hbc.api.github.com:${vars.port}/api/v1/employees",
"method": "POST",
"request": {
"body":{
"name": "${vars.employeeName}"
}
},
"verify":{
"status": 201
}
}
In next step e.g.:
{
"url": "http://hbc.api.github.com:${vars.port}/api/v1/employees/${vars.employeeName}",
"method": "GET",
"request": {
},
"verify":{
"status": 200,
"body":{
"name": "${vars.employeeName}"
}
}
}
```
Contributor guide
Research direction
The issue names no files, tests, or entry points, so first search the scenario parser and step value interpolation for existing variable support. Define and test the intended syntax and lifecycle for fixed, random, port, and reusable scenario variables, including the example's later-step substitutions.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java
- Domain
- testing
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100