Skip to main content

jtharness having problems loading JUnitSuperTestFinder or JUnitAnnotationTestFinder

Please note these forums are being decommissioned and use the new and improved forums at
1 reply [Last post]
Joined: 2013-04-07


I am trying to use jtharness to put a front end on my collection of JUnit4 tests.

I've read the section in the JavaTest Harness Architect’s Guide about retrofitting JUnit tests into Javatest - all seems straightforward. So I've got the right jars in my /lib dir (jt-junit, junit-4.8.1) and altered my testsuite.jtt accordingly to include

finder = com.sun.javatest.junit.JUnitSuperTestFinder -superclass junit.framework.TestCase
testsuite = com.sun.javatest.junit.JUnitTestSuite
interview = com.sun.javatest.junit.JUnitBaseInterview

However jtharness won't even let me load testsuite.jtt now - I'm obviously doing something fundamental wrong!

I've narrowed this down to JUnitSuperTestFinder, because if I return to using TagTestFinder then the testsuite loads (but obviously doesn't find any tests)

Any idea what I've missed?


Reply viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
Joined: 2013-04-07

I tried this:

JUnit 4.x style tests do not use a specific superclass, rather, they tag
classes with the org.junit.Test annotation. The name="ProductName"
content="JavaTest Harness"?> harness library jt-junit.jar provides the
class com.sun.javatest.junit.JUnitAnnotationTestFinder to find 4.x style
tests. It operates much like the JUnitSuperTestFinder class, but looks for
different criteria

... but using JUnitAnnotationTestFinder gave me the same - the testsuite still doesn't load

I've checked that my JUnit4 tests have @Before, @Test, @After tags in the code