views:

90

answers:

2

Hi,

We would like to test our web application (jsf 1.2, richfaces 3.3.3) with jsfunit. We are using junit 4.8.1 library for our unit tests. But jsfunit (1.2.0.Final) requires non existing class junit.runner.TestSuiteLoader. If i downgrade to junit 3.8, i can't use annotations in my Test classes any more.

Is there a solution for it?

Thanx in advance

+1  A: 
  1. File a bug report against jsfunit; a dependency against JUnit 3.x should not be necessary in 2010.

  2. Create the empty class in your unit tests. Try to run it again. It will complain about missing methods. Download the source for 3.8 and copy the missing methods. Modify the methods to do what you need.

Aaron Digulla
A: 

The JSFUnit FAQ says: "Currently, you can use the JUnit 4 jar, but annotations such as @Test will not work. This is due to a limitation in Cactus that is scheduled to be fixed in Cactus 2.0." http://community.jboss.org/wiki/JSFUnitFAQ

That doesn't explain the TestSuiteLoader issue you're experiencing, but it does clarify that annotations cannot be used for now.

bbasata