2

I want to skip karate test execution when url is empty. Currently, during the Jenkins execution if karate.env is not passed, I am not setting url/domainName in karate-config.js. In that case, my karate test cases fails due to blank url/hostName. I want to skip all karate test execution if value is not being passed in karate.env system property. Please suggest how can I achieve the above. Thanks

rightprog
  • 21
  • 2

1 Answers1

1

This is not supported. You can try hooks, but the API can change in future: https://stackoverflow.com/a/59080128/143475

Peter Thomas
  • 54,465
  • 21
  • 84
  • 248
  • I tried * eval if (karate.env == 'NoUrl') karate.abort() in the 'Background' , but still get org.apache.http.client.ClientProtocolException since its trying to use the url variable I am trying to fetch in next line. – rightprog Nov 02 '20 at 08:39
  • so please contribute code. this is an open source project – Peter Thomas Nov 02 '20 at 09:55