Skip to content
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

not able to generate jbehave reports properly. #4

Open
kcsekhar25 opened this issue Dec 18, 2012 · 0 comments
Open

not able to generate jbehave reports properly. #4

kcsekhar25 opened this issue Dec 18, 2012 · 0 comments

Comments

@kcsekhar25
Copy link

i am using ur sample code

package sample_stepsfactory;
import org.jbehave.core.annotations.Given;
import org.jbehave.core.annotations.Named;
import org.jbehave.core.annotations.Then;
import org.jbehave.core.annotations.When;

public class ExampleSteps {
int x;

@Given("a variable x with value $value")
public void givenXValue(@Named("value") int value) {
    x = value;
}

@When("I multiply x by $value")
public void whenImultiplyXBy(@Named("value") int value) {
    x = x * value;
}

@Then("x should equal $value")
public void thenXshouldBe(@Named("value") int value) {
    if (value != x)
        throw new RuntimeException("x is " + x + ", but should be " + value);
}

}


package sample_stepsfactory;

import java.util.Arrays;
import java.util.List;

import org.jbehave.core.junit.JUnitStories;
import org.jbehave.core.steps.InjectableStepsFactory;
import org.jbehave.core.steps.InstanceStepsFactory;
import org.junit.runner.RunWith;
import de.codecentric.jbehave.junit.monitoring.JUnitReportingRunner;

@RunWith(JUnitReportingRunner.class)
public class SimpleJBehave extends JUnitStories {

public SimpleJBehave() {
    super();
}

@Override
public InjectableStepsFactory stepsFactory() {
    return new InstanceStepsFactory(configuration(), new ExampleSteps());
}

@Override
protected List<String> storyPaths() {
    return Arrays.asList("Math");
}

}

it is not creating any reports.

please suggest where i am going wrong.
i am referign below jars
freemarker2.319,jbehave3.7.4,commons collections3.2.1,commons-lang-2.5,commons-io-1.4,paranamer2.4,plexux-utils-20.5,junit4.8.1,jbehave-junit-runner10.2-snapshot.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant