I am trying to setup karate-config.js file in our project as shown in the below. enter image description here
I have configured some test script in that file.
function fun(){
var config = {
host : "http://172.25.0.1:61047/abc"
};
return config;
}
Calling host from below scenario
Scenario: Generate Token POST
Given print 'host --------------->>>>>', host
Output is getting nothing. enter image description here
Anyone please help me here, what I made the mistake in the code.
I finally fixed this issue, i just moved the karate-config.js file from src/test/java to src/test/resource.
Now karate-config.js file has been loading and I am able to read data from it.