I am new to Karate API, pardon me for the mistakes if any.
I want to generate multiple random UUID and then use them in scenario outline examples
Example: Background:
- def UUID = function() {return java.util.UUID.randomUUID() + ''}
Scenario outline: to do post call Given url 'http://localhost:8080'
- def UID = UUID()
- print UID
And request {CID:"", name :""}
When method POST
Then status 201
Examples:
|CID| name|
|UID1| james|
|UID2| rahul|
Here in above 'Examples' I wanted to use randomly generated UUID in data table of examples so that I can run multiple scenarios for UUID with one POST API call. First question: How can I generate multiple random UUID ? Second question: once multiple UUID gets generated how can i call in scenario outline examples and use them? Can anyone suggest me on this?