I want to import some JSON data to my tests.
In order to documentation I should do that like this:
* def data = read('classpath:init/data.json')
I've created my JSON file with this content:
{
"name": "ehsan"
}
This is my code:
Background:
* def data = call read('classpath:init/data.json')
Scenario:
* print data
But it prints nothing and says:
16:11:30.898 [main] WARN com.intuit.karate - not a js function or feature file: read('classpath:init/data.json') - [type: JSON, value: com.jayway.jsonpath.internal.JsonContext@7d61eccf]