Linked Questions

104 votes
5 answers
82k views

How do I create test suites with JUnit 4? All the documentation I've seen doesn't seem to be working for me. And if I use the Eclipse wizard it doesn't give me an option to select any of the test ...
Adam Taylor's user avatar
  • 7,853
17 votes
6 answers
9k views

I have in my project a lot of unit tests, written in JUnit and TestNG. The building process is based on maven with surefire plugin. Is there any way/plugin for maven to fail the build when at least ...
lukastymo's user avatar
  • 26.9k
6 votes
2 answers
10k views

Possible Duplicate: Conditionally ignoring tests in JUnit 4 I have a suite of system tests that are run with Parameterized runner and that I would like to run against different environments. Some ...
narthi's user avatar
  • 2,228
2 votes
2 answers
6k views

I need the following test @runwith(cache, memory) class CollectionA is -- this is a suite (aka folder) class Cache { -- this is a sub-suite (aka folder) @test testCache1() -- this is a ...
Val's user avatar
  • 11.2k
6 votes
3 answers
2k views

The Apache Maven Surefire site has the following example syntax to exclude tests from running: <configuration> <excludes> <exclude>**/TestCircle.java</exclude> <...
hawkeye's user avatar
  • 36k
3 votes
3 answers
2k views

I need to write a JUnit test case for a never ending main() method. This main() method after processing some files sleeps for a minute and then resumes its execution. This process goes on and on and ...
Anil's user avatar
  • 173
2 votes
0 answers
2k views

I want to add a subtest, FailingIO, to FailingTest while inheriting the parent's useful methods @RunWith(Suite.class) @Suite.SuiteClasses({FailingTest.FailingIO.class}) class FailingTest { @Test ...
Val's user avatar
  • 11.2k
1 vote
2 answers
1k views

I'm trying to support running tags/groups of tests on the Maven commandline. I think I have the correct syntax setup in my .scala file (see below), but I'm unsure how to actually execute on the ...
Aaron Shaver's user avatar
2 votes
1 answer
398 views

I have an ant task set up like so: <target name="unit-test" description="unit tests" depends="compile-tests"> <mkdir dir="${build}/test"/> <mkdir dir="${build}/test/raw"/> &...
Mark Tozzi's user avatar
1 vote
1 answer
410 views

I have a matrix pipeline job which performs multiple stages (something like ~200) most of which are functional tests whose results are recorded by the following code: stage('Report') { ...
ncarrier's user avatar
  • 515
0 votes
0 answers
254 views

I want to run 10 groups after each other, and every single group should contain 10 tests and each test running parallel. I tried with a factory class, but if I placed It multiple times in the suite ...
Balázs Kovács's user avatar
-1 votes
2 answers
179 views

I have a class with methods like below... class one{ @Test method1{} @Test method2{} @Test method3{} } I m using below class to run above Tests using JUnit. class ...
Bala's user avatar
  • 204
0 votes
3 answers
215 views

I have a test suite that is being run on a bunch of sites we have created. The majority of the sites work the same way so instead of having lots of duplicate code I can run all the tests on all sites. ...
Doctor Who's user avatar
  • 1,719
2 votes
2 answers
114 views

We have a bunch junit tests in our current project. Essentially we are looking for a way to run all the test in a given package. Currently in Netbeans I see you can run all the tests or a single test, ...
Jacob Schoen's user avatar
  • 14.2k
1 vote
1 answer
106 views

I'm working with a large project with 50,000 source files about 5000 tests spread over 2000 classes. These are mostly JUnit 3 with a smattering of JUnit 4. These tests are run on a frequent (daily or ...
locka's user avatar
  • 6,079