1

I have several config files for each environment like 'karate-config-alpha/beta/prod.js', and in these files there is a step to get oauth token for other test cases to use.

var result = karate.callSingle('classpath:karate/getOauthToken.feature', config);

It works fine on local, but it's weird when running on server. Sometimes it gives an error report like this:

{"features":10,"ignored":0,"efficiency":0.0782102453358611,"failures":{"karate.testfolder":"test003.feature:8 - evaluation of 'karate-config-alpha.js' failed"},"totalTime":9075.907920000001,"threads":5,"scenarios":10,"failed":1,"passed":9,"version":"0.9.6","elapsedTime":23209.0}

Based on my understanding, I think if getting oauth token failed, all the cases should fail too. But there is only one case failed, how can this happen? I tried on local by giving a wrong oauth url, all cases failed as expected.

snoowalker
  • 33
  • 3
  • may be a bug. see: https://stackoverflow.com/a/66652068/143475 - follow this process please, or you have to figure this out on your own: https://github.com/intuit/karate/wiki/How-to-Submit-an-Issue – Peter Thomas Apr 12 '21 at 04:17

0 Answers0