Overview | Package | Class | Tree | Deprecated | Index | Help
| J avolution v5.3 (J2SE 1.5+)
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## javolution.testing
Class TestSuite

    java.lang.Object
      javolution.testing.TestSuite

    public abstract class TestSuite

extends java.lang.Object

This class represents a grouping of potentially `parallelizable` `test cases`.``

          class TypeFormatTest extends TestSuite {
               public TypeFormatTest() {
                    addTest(new ParseBoolean());
                    addTest(new ParseInt().ignore(true)); // Adds this test case but it is ignored for now.
                    ...
               }
               class ParseBoolean extends TestCase { ... };
               class ParseInt extends TestCase { ... };
               ...
          }

How the test suite is executed, how the test results are logged and how the test report is created depends upon the `TestContext` in which the test suite is `run`. Specialized test contexts may address specific concerns such as performance (`TimeContext`), memory usage, code coverage, etc. The test context determinates also how test results are reported (e.g. html formatted, IDE integrated, etc.)

Version:
  5.3, March 8, 2009
Author:
  Jean-Marie Dautelle
See Also:
  Wikipedia: Test Suite

Constructor Summary
`protected` | `TestSuite()` Default constructor.

Method Summary
`protected TestCase` | `addTest(TestCase testCase)` Adds the specified test case to this test suite.
`java.lang.String` | `getName()` Returns the name of this test case.
`boolean` | `isParallelizable()` Indicates if the test cases of this test suite can be run concurrently (default `true`).
`void` | `setUp()` Prepares the test suite execution (the default implementation does nothing).
`void` | `tearDown()` Cleanup once test suite execution is complete (the default implementation does nothing).
`java.util.List<TestCase>` | `tests()` Returns the collection of test cases belonging to this test suite.
`java.lang.String` | `toString()` Returns the `String` representation of this test suite.

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait`

Constructor Detail

### TestSuite

    protected TestSuite()

  Default constructor.

Method Detail

### getName

    public java.lang.String getName()

  Returns the name of this test case. The default implementation returns the class name.

  Returns:
    the test suite name.

### addTest

    protected TestCase addTest(TestCase testCase)

  Adds the specified test case to this test suite.

  Parameters:
    `testCase` - the test case being added.
  Returns:
    the specified test case.

### setUp

    public void setUp()

  Prepares the test suite execution (the default implementation does nothing).

### tearDown

    public void tearDown()

  Cleanup once test suite execution is complete (the default implementation does nothing).

### tests

    public java.util.List<TestCase> tests()

  Returns the collection of test cases belonging to this test suite.

  Returns:
    the test cases

### isParallelizable

    public boolean isParallelizable()

  Indicates if the test cases of this test suite can be run concurrently (default `true`). If the test suite is not parallelizable then the test cases are executed in sequence, first added runs first.

  Returns:
    `true` if parallelizable; `false` otherwise.

### toString

    public java.lang.String toString()

  Returns the `String` representation of this test suite.

  Overrides:
    `toString` in class `java.lang.Object`
  Returns:
    `this.getName()`

Overview | Package | Class | Tree | Deprecated | Index | Help
| J avolution v5.3 (J2SE 1.5+)
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright © 2005 - 2009 Javolution.