I have this scenario which I am reading a CSV file for Example values, and load them into my input JSON:
Scenario Outline:
* def inputJson = karate.read('../karate/data/sample.json')
* print "Input JSON is: " + karate.pretty(inputJson)
Examples:
|read('classpath:karate/data/testData.csv')|
In my sample.json:
{
"testField" : "#(testField)"
}
And in my testData.csv:
testField,a,b,c,...
null,,,...
When I print out inputJson, the value null
of testField
is read as a string "null"
.
I also tried replacing the value as empty, as well as using testField!
in my CSV header, but none of them loads the null value properly as null
.
Any advice to achieve this?
Thank you in advance.