thinkerou
thinkerou

Reputation: 1877

How set dynamic url param?

Because my all case run by jenkins and I have the default url on karate-config.js.

But the jenkins job should support other url, so I want to pass the url address dynamic.

I know env, but I don't know how set it?

thanks!

Upvotes: 1

Views: 225

Answers (1)

Peter Thomas
Peter Thomas

Reputation: 58058

Pass it as a Java system property:

-D my.url=http://foo.bar

And in Karate:

var url = karate.properties['my.url'];

Please refer: https://github.com/intuit/karate/issues/547

Upvotes: 2

Related Questions