Related questions
TestSuite Setup in jUnit 4
I've managed to find out how to make a TestSuite in jUnit 4, but I really miss the v3 possibility of wrapping a suite in a TestSetup.
Any ideas as to how to get some @BeforeClass/@AfterClass setup executed for a …
JUnit4 run all tests in a specific package using a testsuite
Is this possible in JUnit4?
In JUnit3, I would do the following:
public class MyTestSuite {
public static Test suite() throws Exception {
doBeforeActions();
try {
TestSuite testSuite = new TestSuite();
for(Class clazz : getAllClassesInPackage("com.mypackage")){
testSuite.addTestSuite(clazz);
}
return testSuite;
} finally {
doAfterActions
}
}
...
}
Why use JUnit test suites?
I'm going to be implementing some unit tests using JUnit in some upcoming tasks for work. I have slight experience with JUnit from my previous employer, but while I was studying, I came across test suites. I don't have any …