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?
No this is not right. I suggest you refer to the quickstart documentation of Karate where you can generate a simple project. Get that running first, and then try to set the URL from the karate-config.js. All the best.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With