Combining Test Suites

Combining Test Suites


Posted in : Java Posted on : November 25, 2010 at 5:30 PM Comments : [ 0 ]

This section contains the detail about Combining Test Suites in Test Suite.

Combining Test Suites

We can combine different suites into one suite. We have two different suites , these suites have following classes :

AllTests(Suite)

  • CounterTest

  • MyClassTest

  • PetTest

AllTestsSecond(Suite)

  • ExceptionTest

  • SetUpTest

  • SimpleTest

We have combine these two suites into one as follows :

package devmanuals.junit;

import org.junit.runner.RunWith;
import org.junit.runners.Suite;
import org.junit.runners.Suite.SuiteClasses;

@RunWith(Suite.class)
@SuiteClasses( { AllTests.class, AllTestsSecond.class })

public class MainAllTests {
}

The MainAllTests Suite contains two different Suites, i.e Alltests & AllTestsSecond. The Output of this Combine Test is given next :

Download Source Code

Go to Topic «PreviousHomeNext»

Your Comment:


Your Name (*) :
Your Email :
Subject (*):
Your Comment (*):
  Reload Image
 
 

 
Tutorial Topics