I am getting array index out of bound error when running with serenity. pasting console log here

235 views
Skip to first unread message

swathi chowdary

unread,
Feb 3, 2017, 12:17:38 PM2/3/17
to Serenity BDD Users Group
log4j:WARN No appenders could be found for logger (net.serenitybdd.jbehave.embedders.monitors.CompositeEmbedderMonitor).Processing system properties {}

log4j:WARN Please initialize the log4j system properly.
Using controls EmbedderControls[batch=false,skip=false,generateViewAfterStories=true,ignoreFailureInStories=false,ignoreFailureInView=true,verboseFailures=false,verboseFiltering=false,storyTimeouts=300,threads=1,failOnStoryTimeout=false]

(BeforeStories)

Running story stories/sample.story
Using timeout for story sample.story of 300 secs.
Story: Weather sample story
(stories/sample.story)
Meta:
@author Siva
@environment 

Narrative:
In order to verity the weather service functionality
As a user
I want to test weather by city operation with required parameters
Scenario: 
Examples:
Given currencyConverter service is operational
And we have a new atomic element is <fromCurrency>, <toCurrency> request
When currencyConverter service is executed

|fromCurrency|toCurrency|
|USD|INR|

Example: {fromCurrency=USD, toCurrency=INR, author=Siva, environment=, id=testlink id, positive=}
Given currencyConverter service is operational (FAILED)
(java.lang.ArrayIndexOutOfBoundsException: 0)
And we have a new atomic element is USD, INR request (NOT PERFORMED)
When currencyConverter service is executed (NOT PERFORMED)


java.lang.ArrayIndexOutOfBoundsException: 0
at net.thucydides.core.steps.StepFactory.parametersMatchFor(StepFactory.java:188)
at net.thucydides.core.steps.StepFactory.argumentTypesFrom(StepFactory.java:178)
at net.thucydides.core.steps.StepFactory.immutableStepLibrary(StepFactory.java:172)
at net.thucydides.core.steps.StepFactory.createProxyStepLibrary(StepFactory.java:166)
at net.thucydides.core.steps.StepFactory.instantiateNewStepLibraryFor(StepFactory.java:117)
at net.thucydides.core.steps.StepFactory.instantiateNewStepLibraryFor(StepFactory.java:109)
at net.thucydides.core.steps.StepFactory.getNewStepLibraryFor(StepFactory.java:77)
at net.thucydides.core.steps.StepFactory.getStepLibraryFor(StepFactory.java:72)
at net.thucydides.core.steps.StepAnnotations.instantiateAnyUnitiaializedSteps(StepAnnotations.java:52)
at net.thucydides.core.steps.StepAnnotations.instanciateScenarioStepFields(StepAnnotations.java:41)
at net.thucydides.core.steps.StepAnnotations.injectScenarioStepsInto(StepAnnotations.java:23)
at net.serenitybdd.jbehave.SerenityStepFactory.createInstanceOfType(SerenityStepFactory.java:82)
at org.jbehave.core.steps.StepCreator.stepsInstance(StepCreator.java:85)
at org.jbehave.core.steps.StepCreator$ParametrisedStep.perform(StepCreator.java:599)
at org.jbehave.core.embedder.PerformableTree$FineSoFar.run(PerformableTree.java:340)
...


(AfterStories)

Generating reports view to 'C:\DEV\STS_WorkSpace\currencyConverter\target\jbehave' using formats '[stats, console, html, xml, serenityreporter, junitscenarioreporter]' and view properties '{decorateNonHtml=true}'
Reports view generated with 2 stories (of which 0 pending) containing 1 scenarios (of which 0 pending)
Failures in reports view: 1 scenarios failed
java.lang.RuntimeException: org.jbehave.core.embedder.Embedder$RunningStoriesFailed: Failures in running stories: 
org.jbehave.core.embedder.PerformableTree$SomethingHappened@6742a0d4: java.lang.ArrayIndexOutOfBoundsException: 0
at net.serenitybdd.jbehave.runners.SerenityReportingRunner.run(SerenityReportingRunner.java:177)
at org.eclipse.jdt.internal.junit4.runner.JUnit4TestReference.run(JUnit4TestReference.java:86)
at org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.java:38)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:459)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:675)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:382)
at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:192)
Caused by: org.jbehave.core.embedder.Embedder$RunningStoriesFailed: Failures in running stories: 
org.jbehave.core.embedder.PerformableTree$SomethingHappened@6742a0d4: java.lang.ArrayIndexOutOfBoundsException: 0
at org.jbehave.core.embedder.Embedder$ThrowingRunningStoriesFailed.handleFailures(Embedder.java:553)
at org.jbehave.core.embedder.Embedder.handleFailures(Embedder.java:238)
at org.jbehave.core.embedder.Embedder.runStoriesAsPaths(Embedder.java:216)
at net.serenitybdd.jbehave.embedders.ExtendedEmbedder.runStoriesAsPaths(ExtendedEmbedder.java:60)
at net.serenitybdd.jbehave.runners.SerenityReportingRunner.run(SerenityReportingRunner.java:175)
... 6 more

John Smart

unread,
Feb 3, 2017, 12:20:42 PM2/3/17
to swathi chowdary, Serenity BDD Users Group
There is an issue with the parameters in one of your @Step methods. It is hard to tell more from the logs.

--
You received this message because you are subscribed to the Google Groups "Serenity BDD Users Group" group.
To unsubscribe from this group and stop receiving emails from it, send an email to thucydides-users+unsubscribe@googlegroups.com.
To post to this group, send email to thucydides-users@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.



--
___________________________________________________
John Smart | Wakaleo Consulting  |  +44 7398 832273
Making smart teams collaborate better
http://johnfergusonsmart.com  |  john....@wakaleo.com
___________________________________________________

We love breaking down silos and helping smart teams collaborate better! Ask about our tailored on-site workshops in Agile Product Planning, BDD Requirements Discovery,  BDD, TDD and Clean Coding, and Advanced BDD Test Automation.
___________________________________________________

swathi chowdary

unread,
Feb 3, 2017, 5:32:03 PM2/3/17
to Serenity BDD Users Group
Thanks  John. Issue is resolved.
Reply all
Reply to author
Forward
0 new messages