Skip to content

not able to generate jbehave reports properly. #4

@kcsekhar25

Description

@kcsekhar25

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions