views:

122

answers:

2

Hi, i have a following problem.

I'd like ti test my JSF Application with JSFUnit.But JSFUnit supports inly junit3 (all our unit tests run with JUnit4).

Is it possible to include in pom.xml two junit dependencies (junit4 and junit3) with e.g. different scopes?

Please help and thanx in advance

A: 

If you separate the project into two submodules, one which needs JUnit3 and the other which needs JUnit4, you can specify the test dependencies separately in the child pom.

Péter Török
A: 

As Péter said, you should split your project in separate modules. In cases like this I've also seen the use of dedicated test modules turn out good results.alt text

This way the JUnit4 test dependency you have in foo-web is not visible to the tests running from foo-web-jsf-tests.

iwein