1

I have a sample array:

* def passwordData = ["abc", "abc2", "abc3", "abc4"]

And I have a scenario outline

Scenario Outline: xyz
      * someApiCall(username, password)
      Examples:
        | username | password        |
        |  admin   | #(passwordData) |    

I want to send all the values of passwordData into examples one by one. what I want is, there should be 4 API calls based on 4 different sets of password data. like,

set 1 - [admin, abc]
set 2 - [admin, abc2]
set 3 - [admin, abc3]
set 4 - [admin, abc4]

but currently, that's not happening, it is considering the whole password data in one and a comma-separated value is sent.

is there a way to achieve this in karate?

  • in addition to linked answer, note that functions can be used to generate a dynamic-scenario outline: https://github.com/karatelabs/karate#json-function-data-source – Peter Thomas Jan 17 '23 at 17:33

0 Answers0