getting the below error after running a faeature file ERROR c.k.k.core.keyword.internal.KeywordMain - Keyword runFeatureFile was failed (Root cause: java.lang.ArrayIndexOutOfBoundsException: 55
at cucumber.runtime.formatter.TestSourcesModel.getKeywordFromSource(TestSourcesModel.java:124)
at cucumber.runtime.formatter.JUnitFormatter$TestCase.getKeywordFromSource(JUnitFormatter.java:287)
at cucumber.runtime.formatter.JUnitFormatter$TestCase.addStepAndResultListing(JUnitFormatter.java:277)
at cucumber.runtime.formatter.JUnitFormatter$TestCase.addTestCaseElement(JUnitFormatter.java:232)
at cucumber.runtime.formatter.JUnitFormatter.handleTestCaseFinished(JUnitFormatter.java:134)
at cucumber.runtime.formatter.JUnitFormatter.access$300(JUnitFormatter.java:42)
You can check which version of the cumber-jvm project Katalon uses. See the .classpath file in your Katalon project. Katalon Studio v8.6.5 uses v3.0.2 of the cucumber-jvm library.
As you see, Katalon Studio is not in sync with the cucumber-jvm project.
It is quite likely that the v3.0.2 had some bugs. These bugs would have been fixed in the later versions; but Katalon Studio is not able to benefit these fixes.
Unfortunately, this issue will be very difficult for Katalon team to fix. They would have to start with upgrading the external dependencies (e.g., to cucumber-jvm.7.13.0). It will inevitably involve a lot of work.
In April this year, @duyluong wrote that they will work on “overhauling” their product to catch up the latest version of various external dependencies;
However we haven’t heard of any progress of the great attempt yet.
I suppose that you will get problems if you try to replace the bundled old version cucumber-*.jars to a newer version. Why?
Since version 4.5.0 the package cucumber.api.junit.Cucumber has moved to io.cucumber.junit.Cucumber and package cucumber.api.CucumberOptions has moved to io.cucumber.junit.CucumberOptions
This change of package name from cucumber.* to io.cucumber.* is quite significant. Any code dependent on the cucumber.* package (v3.0.2) will fail to run with a cucumber of newer version (e.g, v7.13.0).
can you please share the projects and step to reproduce so that my team can support? If you are a paid user, please help submit a ticket here Katalon Help Center. Thank you
Inside your lines of code (in test case or step definition), if you’re trying to call CucumberKW.runFeatureFile(), this error is displayed. Instead replace the Gherkin lines from a feature file you’re calling to the current feature file that is running, the issue got addressed. Please try and share your thoughts.
Hi,
Basically I’m calling another feature in one feature file to get the variable values to be used in current feature file using call Testcase() as we can’t use varaiables in one feature file to another. That time I’m getting this error in current feature file.
Are you sure that the “one feature file” is always present?
I guess, when you miss the “one feature file” on disk, you get the java.lang.ArrayIndexOutOfBoundsException; don’t you?
In that case, your code should check if the “one feature files” is present or not before it calls the feature contained in the “one feature file”. If the file isn’t present, of course, your code should not go forward. You code should branch the processing as appropriate.
In feature file 1(actual file)> calling feature file 2 tests using call test case> In this I’m calling feature file 3 tests as I want to do all these feature file 3 and 2 before running feature file1.
When I run feature file1>it is calling feature file2> which calls feature file 3, and feature file 3 is running successfully and feature file2 all steps are running fine , but at the end I’m getting this exception.After that Feature file is also running the tests. But at the end I’m not able to see either test has passed or failed bit in console it is displaying this error.
All these feature files I’m running beacuse I want to use variables of feature file 2 and 3 in feature file file1