Web Tests JUnitFormatter ArrayIndexOutOfBoundsException


We are facing an issue when executing Web Tests. After 8 of our web tests in a Feature we are getting an index out of bounds error by Katalon. The tests pass correctly, but at the top level gives the error and stops the execution.

=============== ROOT CAUSE =====================
Caused by: java.lang.ArrayIndexOutOfBoundsException: 71

10-09-2020 10:20:47 AM runFeatureFile("Include/features/Authentication - Authorization/Change Password.feature")

Verification FAILED.
com.kms.katalon.core.exception.StepFailedException: Keyword runFeatureFile was failed (Root cause: java.lang.ArrayIndexOutOfBoundsException: 71
at cucumber.runtime.formatter.TestSourcesModel.getKeywordFromSource(TestSourcesModel.java:124)
  at cucumber.runtime.formatter.JUnitFormatter.access$300(JUnitFormatter.java:42)

Full Log here: oob_full_log.txt (6.7 KB)

Here you can see the tests passing but failing on the top level because of the out of bounds.

If we remove the feature step where this error appears, it will appear on the next one, so it is not an issue of the step implementation. It is always the 8th webtest for us.

We have reproduced this in different machines and with different Katalon versions.
ie: 7.5.5, 7.6.5, 7.6.6, 7.7.2
All give the same error.

We are using/executing gherkin feature files.

Any idea what could be causing this and/or how to fix it?

Best Regards,

1 Like

Hi @ixent.gallego

Please share the full stack-trace in the Console tab

Hello @duyluong ,

Yes, sorry. Here’s the full console stack trace: full_console_stack_trace_oob.txt (78.2 KB)


Hi @ixent.gallego,

Seems like this is a bug of the cucumber-jvm when generating the JUnit report: https://github.com/cucumber/cucumber-jvm/issues/1575

We will consider to update cucumber-jvm to a higher version.

Work-around solutions for you now:

  • Split the feature file to smaller files.
  • Keep this file as it is but using Run with Cucumber Runner keyword in test case to run it.
1 Like

Hello @duyluong ,

Yes, we did end up splitting the feature files into smaller files. That doesn’t cause any problem, though it is not a proper solution and we expect this to be fixed in a future version.

Thanks for the inputs.