I’m trying to pass a specific parameter to a setup, but don’t know how to do it properly. I’ve tried to do the following code:
`Feature: test
@setup=try
Scenario: run before
* def run = "test"
* print "running in the streets"
* print parameter
Scenario Outline: run
* def setup = karate.setupOnce("try") { parameter: <params> }
* print setup.run
* print user
Examples:
| user | params |
| "A" | 1 |
| "B" | 2 |`
There’s a way to do this something like we can do to karate.call?
João Ulisses is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.
1
You cannot. The whole point of setup
is to do some logic and generate the whole table of Examples
data that now can be fed into a Scenario Outline
.
Please read this for more details: /a/76320023/143475
So please reconsider who to write your tests. An explanation can be found here: /a/78673358/143475