Question

In larger projects using jbehave would it be normal practise to share stories between unit, integration and acceptance tests?

If it is normal practise, are the stories normally placed in their own maven project or module so that they can be added as a dependency by the various test environments?

Was it helpful?

Solution

I don't think JBehave is a good choice for unit tests. For that Junit (or TestNG) plus Hamcrest should be enough. Normally you put your unit tests in the same project that you are testing, sometimes using the same package name.

The most important goal of BDD is to make requirements clear to both customer and developers. So, the Stories are already a kind of acceptance tests that JBehave should run.

As acceptance tests runs against one or more components it is better to concentrate them in its own project.

What could be done is to share some libraries between unit/integration tests and step classes.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top