New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
NPE when first Scenario is Outline in 0.6.2 #282
Comments
Yes. It would be great if you can confirm this is fixed in 0.7.0.RC3 which is available. Here's the upgrade guide: https://github.com/intuit/karate/wiki/Upgrading-To-0.7.0 |
and wow, I never realized this trick works ! thanks :) | #(username) | #(password) | |
Thanks for the quick fix! I'm having trouble with 0.7.0.RC3. I get the following:
What am I doing wrong? I am setting the karate.env value with a java option of:
Apologies if this is in the documentation somewhere! |
@petercuffari hmm, can you let me know the exact JRE version you are on (output of java -version) I've been trying to track down why this changed from previous versions. And if you don't mind can you upgrade your JRE to a version greater than or equal to 1.8.0_112 and that should fix this. |
Bingo! I was on (mac):
I updated to 1.8.0_152 and it works now. By the way, I really enjoy this project. Thank you for your work! And, my middle name is Thomas :) |
@petercuffari thanks ! I will add the version requirement to the docs & upgrade guide. I'll keep this issue open since the "final" 0.7.0 release is not out. |
👍 |
A work around is possible if you are stuck using an old version of Java. Solution tested on:
The karate object is not defined at the time of parsing the config. This means that any interaction with the karate object will cause the Javascript evaluation to fail. i.e:
An example karate-config.js is:
Resulting in:
The karate object is defined at the time of the KarateFeature execution. The solution is to remove all references to the karate object in karate-config.js If you wanted to set a system property, you could do so via the Java interop:
Calling with the arguments: If you want to access the karate object, you can do this in the feature Background:
|
Hi, How can I get the stack trace? Thanks |
@Anda77 you are on a VERY old version, and you really should upgrade. we are certainly not supporting old versions |
No, I am [v1.1.0] |
@Anda77 then please follow this process: https://github.com/karatelabs/karate/wiki/How-to-Submit-an-Issue |
If the first Scenario when running the entire test suite is a "Scenario Outline", I get a NPE. If I put a dummy scenario before the outline (or if another feature file runs first), it works fine. This is only affecting 0.6.2 (earlier versions, including 0.6.1, work fine).
Does not work:
I get failed tests and this NPE:
However, when I force a simple feature to run before the Outline, it works fine:
I am using IntelliJ with a JUnit run configuration.
The text was updated successfully, but these errors were encountered: