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 Serenity Report/ BDD Strories display with Springboot and SpringRunner #1518

Closed
muralij2ee6 opened this issue Jan 10, 2019 · 1 comment
Labels

Comments

@muralij2ee6
Copy link

Hi,

My Stories Runner class is

@RunWith(SpringRunner.class)
@ContextConfiguration(locations = { "classpath:applicationContext-serenity.xml" })
public class StoriesRunnerIT extends JUnitStories implements ApplicationContextAware {

private ApplicationContext context;

@Override
public Configuration configuration() {
	return new MostUsefulConfiguration().useStoryLoader(new LoadFromClasspath(this.getClass())).useStoryReporterBuilder(new StoryReporterBuilder());
}

@Override
public InjectableStepsFactory stepsFactory() {
	return new SpringStepsFactory(configuration(), context);
}

@Override
protected List<String> storyPaths() {		
	return Arrays.asList("stories/testone.story","stories/testtwo.story");
}

@Override
public void setApplicationContext(ApplicationContext applicationContext) throws BeansException {
	this.context = applicationContext;
}

}

Step class

@component
public class testone extends Steps {

@Autowired
private BeanSteps beanSteps;

@Given("some scenario")

public void method(){
}

My Pom Has all dependecies sereneity-core, failsafe, serenity-bdd with versions 2.18.1, 1.4.0 , 1.4.0

image

BDD is not displaying all stories list in JUNIT console as above.

For Maven Run serenity report is generated with no major details.
Console Log:

OutputDirectory : C:\DEV\Git\springboot\BillingPaymentManagement\bdd\target\site\serenity
Merging requirements = [Requirement{name='', type='story' parent = 'null', cardNumber='null'}, Requirement{name='Returned payment conversion bank', type='feature' parent = 'null', cardNumber='null'}, Requirement{name='Returned payment conversion credit card', type='feature' parent = 'null', cardNumber='null'}]
Merging requirements = []
Merged requirements set = [Requirement{name='', type='story' parent = 'null', cardNumber='null'}, Requirement{name='Returned payment conversion bank', type='feature' parent = 'null', cardNumber='null'}, Requirement{name='Returned payment conversion credit card', type='feature' parent = 'null', cardNumber='null'}]
[INFO] REPORTS GENERATED IN C:\DEV\Git\springboot\BillingPaymentManagement\bdd\target\site\serenity
[INFO] REPORT HOME PAGE: C:\DEV\Git\springboot\BillingPaymentManagement\bdd\target\site\serenity\index.html
[INFO] Generating release reports for: []


Seems like it is not picking up the stories properly for serenity report as well as Junit Console.

Any help is greatly appreciate it.

Thanking you,

Regards

@wakaleo
Copy link
Member

wakaleo commented Jan 10, 2019

You are running your test as a Spring integration test (@RunWith(SpringRunner.class)). You need to use the Serenity runner to produce the Serenity integration.

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

No branches or pull requests

2 participants