I would like to get a common variable for all features. Ex: base URL and path (in some features). I don't understand well in Karate official tutos what to do exactly. I put in user.feature
`Background:
* url urlBase
* path users
In karate-config.js
function() {
var env = karate.env;
karate.log('karate.env system property was:', env);
if (!env) {
env = 'dev';
}
var config = {
env: env,
appId: 'my.app.id',
appSecret: 'my.secret',
baseURL: 'https://someurl/',
users: 'users'
};
karate.configure('connectTimeout', 5000);
karate.configure('readTimeout', 5000);
return config;
}
and in my runner class:
@RunWith(Karate.class)
@CucumberOptions(features = "classpath:features/users/User.feature")
public class TestRunner{
}
}
User.feature and karate-config.js are in the same folder and Runner class is in another. Is it right? or I need more things to specify?