score:1
i'm not sure if my context was the same as yours, but in my case the problem was a typo in my steps file. i had a then
condition with two parameters but my method signature in my steps.java
file was missing one of them. i corrected the mistake and my tests passed successfully.
here's what the error was that i was getting:
[info] using controls unmodifiableembeddercontrols[embeddercontrols[batch=false,skip=false,generateviewafterstories=true,ignorefailureinstories=true,ignorefailureinview=false,verbosefailures=false,verbosefiltering=false,storytimeoutinsecs=300,failonstorytimeout=false,threads=1]]
(beforestories)
[info] running story com/netbase/opmetricsfilterbuilder/stories/computederivedvalue.story
compute derived value
(com/netbase/opmetricsfilterbuilder/stories/computederivedvalue.story)
narrative:
in order to explore how my social media activity ties to my core business metrics
as a n analyst
i want to compute a derived time series value from a set of component time series
scenario: compute net intent to shop
given the following time series:
|date|shop|notshop|
|11/5/2014|330|400|
|11/6/2014|370|410|
|11/7/2014|320|390|
|11/8/2014|200|280|
|11/9/2014|430|450|
and a derived value name of netintenttoshop
and a formula for computing the derived value is (#{shop} - #{notshop}) / (#{shop} + #{notshop}) * 100
when the netintenttoshop is derived
then the netintenttoshop should be
|date|netintenttoshop|
|11/5/2014|-9.58904109589041|
|11/6/2014|-5.128205128205128|
|11/7/2014|-9.859154929577464|
|11/8/2014|-16.666666666666664|
|11/9/2014|-2.272727272727273| (failed)
(org.jbehave.core.io.storyresourcenotfound: story path 'netintenttoshop' not found by class loader embedderclassloader[urls=[/users/mosofsky/developer/socialmetrics/nbsocialmetrics-frontend/target/classes/, appengine-api-1.0-sdk-1.9.15.jar, servlet-api-2.5.jar, jstl-1.2.jar, objectify-5.1.1.jar, guava-17.0.jar, jeval-0.9.4.jar, gwt-user-2.7.0-rc1.jar, validation-api-1.0.0.ga.jar, validation-api-1.0.0.ga-sources.jar, gwt-dev-2.7.0-rc1.jar, asm-5.0.3.jar, asm-util-5.0.3.jar, asm-tree-5.0.3.jar, asm-commons-5.0.3.jar, jbehave-core-3.9.5.jar, hamcrest-integration-1.3.jar, commons-collections-3.2.1.jar, commons-io-2.4.jar, commons-lang-2.6.jar, plexus-utils-3.0.10.jar, freemarker-2.3.19.jar, paranamer-2.4.jar, xstream-1.4.5.jar, xmlpull-1.1.3.1.jar, xpp3_min-1.1.4c.jar, jbehave-junit-runner-1.1.2.jar, junit-4.11.jar, mockito-core-1.9.5.jar, hamcrest-core-1.3.jar, hamcrest-library-1.3.jar, objenesis-1.3.jar],parent=classrealm[plugin>org.jbehave:jbehave-maven-plugin:3.9.5, parent: sun.misc.launcher$appclassloader@6da21389]])
[warning] failed to run story com/netbase/opmetricsfilterbuilder/stories/computederivedvalue.story
org.jbehave.core.io.storyresourcenotfound: story path 'netintenttoshop' not found by class loader embedderclassloader[urls=[/users/mosofsky/developer/socialmetrics/nbsocialmetrics-frontend/target/classes/, appengine-api-1.0-sdk-1.9.15.jar, servlet-api-2.5.jar, jstl-1.2.jar, objectify-5.1.1.jar, guava-17.0.jar, jeval-0.9.4.jar, gwt-user-2.7.0-rc1.jar, validation-api-1.0.0.ga.jar, validation-api-1.0.0.ga-sources.jar, gwt-dev-2.7.0-rc1.jar, asm-5.0.3.jar, asm-util-5.0.3.jar, asm-tree-5.0.3.jar, asm-commons-5.0.3.jar, jbehave-core-3.9.5.jar, hamcrest-integration-1.3.jar, commons-collections-3.2.1.jar, commons-io-2.4.jar, commons-lang-2.6.jar, plexus-utils-3.0.10.jar, freemarker-2.3.19.jar, paranamer-2.4.jar, xstream-1.4.5.jar, xmlpull-1.1.3.1.jar, xpp3_min-1.1.4c.jar, jbehave-junit-runner-1.1.2.jar, junit-4.11.jar, mockito-core-1.9.5.jar, hamcrest-core-1.3.jar, hamcrest-library-1.3.jar, objenesis-1.3.jar],parent=classrealm[plugin>org.jbehave:jbehave-maven-plugin:3.9.5, parent: sun.misc.launcher$appclassloader@6da21389]]
at org.jbehave.core.io.loadfromclasspath.resourceasstream(loadfromclasspath.java:44)
at org.jbehave.core.io.loadfromclasspath.loadresourceastext(loadfromclasspath.java:29)
at org.jbehave.core.model.examplestablefactory.createexamplestable(examplestablefactory.java:76)
at org.jbehave.core.steps.parameterconverters$examplestableconverter.convertvalue(parameterconverters.java:647)
at org.jbehave.core.steps.parameterconverters.convert(parameterconverters.java:151)
at org.jbehave.core.steps.stepcreator.convertparametervalues(stepcreator.java:304)
at org.jbehave.core.steps.stepcreator.access$1100(stepcreator.java:36)
at org.jbehave.core.steps.stepcreator$parametrisedstep.parametrisestep(stepcreator.java:640)
at org.jbehave.core.steps.stepcreator$parametrisedstep.perform(stepcreator.java:592)
at org.jbehave.core.embedder.storyrunner$finesofar.run(storyrunner.java:535)
at org.jbehave.core.embedder.storyrunner.runstepswhilekeepingstate(storyrunner.java:515)
at org.jbehave.core.embedder.storyrunner.runscenariosteps(storyrunner.java:479)
at org.jbehave.core.embedder.storyrunner.runstepswithlifecycle(storyrunner.java:445)
at org.jbehave.core.embedder.storyrunner.runcancellable(storyrunner.java:305)
at org.jbehave.core.embedder.storyrunner.run(storyrunner.java:220)
at org.jbehave.core.embedder.storyrunner.run(storyrunner.java:181)
at org.jbehave.core.embedder.storymanager$enqueuedstory.call(storymanager.java:262)
at org.jbehave.core.embedder.storymanager$enqueuedstory.call(storymanager.java:229)
at java.util.concurrent.futuretask.run(futuretask.java:262)
at java.util.concurrent.threadpoolexecutor.runworker(threadpoolexecutor.java:1145)
at java.util.concurrent.threadpoolexecutor$worker.run(threadpoolexecutor.java:615)
at java.lang.thread.run(thread.java:745)
here's the erroneous method signature:
@then("the $derivedvaluename should be: $expectedoutputdatatable")
public void thenthederivedvalueshouldbe(examplestable expectedoutputdatatable) {
here's the correction:
@then("the $derivedvaluename should be: $expectedoutputdatatable")
public void thenthederivedvalueshouldbe(string derivedvaluename, examplestable expectedoutputdatatable) {
it seems like a funny error message for my situation. i guess if a parameter is missing from the steps.java
file then jbehave might go search for it as a resource.
Source: stackoverflow.com
Related Query
- org.jbehave.core.io.storyresourcenotfound exception when running jbehave test in eclipse
- Class Not Found Exception when running JUnit test
- Eclipselink throws exception when running JUnit test
- how to stop eclipse breaking at every caught exception when running in debug
- Getting class not found Exception when running in eclipse
- Maven surefire arguments when running JUnit test via eclipse
- ClassNotFoundException when running a junit test in eclipse
- java.lang.NoClassDefFoundError when running JUnit plug-in test
- Prevent launching eclipse GUI when running JUnit Plug-in Test
- Spring Boot incorrectly loads test configuration when running from eclipse+gradle
- Is there a way to use a custom JUnit Test Runner when running tests in Eclipse?
- Out of Memory (java heap) when running suite with too many test cases
- Getting a NPE when running an individual JUnit Test case on Eclipse
- error when running groovy test suite
- java.lang.NoClassDefFoundError when running Scala JUnit Test on Scala IDE (Eclipse Kepler)
- File object creation fails when running code as Junit test in Eclipse/STS
- Unit test fails only when running from with Ant task
- "projectId must match the following pattern" exception when running Objectify on Google Cloud tools for Eclipse
- security exception when running java application outside eclipse
- java.lang.UnsatisfiedLinkError when running uispec4j test case
- java.lang.StackOverflowError when running class as TestNG Test in Selenium
- Terminate/Stop maven test when running from eclipse
- Eclipse runs previous compiled test classes, unless I manually save the changes (ctrl + s) when running tests
- Override logging settings when running a test from Eclipse JUnit plugin?
- Getting Class Not found Exception when try to run test in eclipse
- Error: no lwjgl64 in java.library.path in Eclipse when running Maven Test
- Exception when starting up the eclipse platform for a junit test
- Eclipse - "Keep JUnit running after a test when debugging"
- Unable to find APK file when running Appium test
- Robolectric ignores custom and test application class when running more than one test
More Query from same tag
- JDBC data source not working when project deployed on tomcat
- Image in layout is not the correct size
- How can I share my workspace with two platforms (OS X and Win)?
- Run A Simple Java Program in Eclipse?
- How to rename variable when renaming class
- import to eclipse from android developer tools
- Can not Convert to Maven Project in Eclipse
- Eclipse isn't recognizing a method in an imported JAR file. Why not?
- how can i modify main method to get input and output from the comandline?
- How to scroll a layout view from right to left in Appium?
- Eclipse window doesn't activate if it's minimized
- Eclipse marks OpenGL functions cannot be resolved
- How to refer one package as jar in other package?
- MyBatis Spring integration with Jetty, Map Config XML configuration not found
- How do I use other API versions as build targets in my Android Project?
- Debugging with eclipse and xdebug won't go past the first line
- How to disable android studio unit tests (androidTest)
- Android Eclipse- Do I need a new Manifest file for each activity?
- Clone an Eclipse project repository into Netbeans from GitHub
- unit testing a TabbedPropertySection
- Nested working set in myeclipse workbench
- Trying to configure eclipse for android development
- java.lang.NoClassDefFoundError when running jdk 1.7 compiled jarfile inside project compiled with 1.6 jdk
- Error thrown when try to add project to tomcat
- How to Automatically Modify versionName in Manifest during Build?
- Eclipse product development - Java runtime differences
- Column count doesn't match value count at row 1 [Java]
- channel 3: open failed: connect failed: Connection refused
- Other ways of setting (and unsetting) http-proxy-host for subversion (MacOS)
- How to use eclipse to batch formatting XML files in android project?