-
-
Notifications
You must be signed in to change notification settings - Fork 406
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Tokens in csvSource parameter sources computed at usage #659
Comments
Hi, just wondering if this issue is still open. If so, can I work on this issue? |
@luke-zhou , It's open. You can start working please. |
cool, that is good. just want to confirm my idea here.
so when the user need to use the same value as the previous random value, he can just quote the name-tag.
|
Hello @luke-zhou , really appreciate you have been trying to solutionize it. Good to see your ideas, prefix "#first" etc might create confusion imo. Can you have a look at the Issue description section "Solution to Implement:", which could be simpler ? Basically the 1st line has got words (without spaces) wrapped by "|", will be treated as a headers.
Everytime a scenario runs it should pick the value under each header (e.g "${PARAM.firstRandom}" <------- instead of ${0} which is the current behavior). Also it will keep the scenario clean and readable. Can you give it a try to implement it? |
Also, keep |
ok, no problem, will give a shot |
PR is ready to be merged. Test result is here: |
TODO - Add documentation for this feature. |
Solution to Implement:
YAML View of Scenario:
Usage:
When it runs, it should replace the random values like below:
JSON View of Scenario:
Usage:
When it runs, it should replace with the random values like below:
---------------- End of Solution -----------------
************ ISSUE DESCRIPTION ************
Goal:
I want to generate a random ID and use it throughout a test scenario, without bloating the scenario file (lookups such as
$.create_app.request.records[0].key
too bloaty).How I want to achieve this:
Generate random id's in a csvSource and reference them throughout the scenario.
Bonus points if the values in the csvSource can be named and referenced in a manner like
${PARAM:APP_ID}
or even#.APP_ID
.Issue:
Tokens such as
${RANDOM.NUMBER}
are only computed at usage in parameter sources, as opposed to when the scenario starts.Scenario to replicate:
Exception:
The text was updated successfully, but these errors were encountered: