简体   繁体   中英

How to set value in CSV file in Karate

I am reading some test userid and password from csv file. and want to store id(combination of id and password and some random text) for each userid and password using karate.

Feature: setid

Scenario Outline: set authid

* def authId = '<username>' + '<password>' + 'test'

* print authId

* set <id> = authId

Examples:

  | read('testdata.csv') |

testdata.csv

username,password,id

shivam,abc,

rahul,pqr,

While running above code i am getting error datatest.feature:5 - no step-definition method match found for: set = authId

Can anyone help me where i am missing.

Sorry you can't update a CSV data source like that. Please use Java code, as what you seem to be trying to do is something specific and not normal API testing related.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM