Overview | Package | Class | Deprecated | Index | Help
| Groovy 1.7.10
| FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## groovy.util
[Java] Class AllTestSuite

    java.lang.Object
      junit.framework.TestSuite
          groovy.util.AllTestSuite

    public class AllTestSuite
    extends TestSuite

AllTestSuite can be used in extension of GroovyTestSuite to execute TestCases written in Groovy from inside a Java IDE. AllTestSuite collects all files below a given directory that comply to a given pattern. From these files, a TestSuite is constructed that can be run via an IDE graphical Test runner. The files are assumed to be Groovy source files and be either a TestCase or a Script that can be wrapped transparently into a TestCase. The directory and the pattern can be set via System properties (see this classes' constants for details.) When setting the loglevel of this class to FINEST, all file loading will be logged. See also groovy.util.AllTestSuiteTest.groovy

Authors:
  Dierk Koenig based on a prototype by Andrew Glover
  Paul King todo: dk: make FileNameFinder injectable

Field Summary
`static String` | `SYSPROP_TEST_DIR` The System Property to set as base directory for collection of Test Cases.
`static String` | `SYSPROP_TEST_EXCLUDES_PATTERN` The System Property to set as a filename excludes pattern for collection of Test Cases.
`static String` | `SYSPROP_TEST_PATTERN` The System Property to set as the filename pattern for collection of Test Cases.

Method Summary
`protected Class` | `compile(String fileName)`
`protected void` | `loadTest(String fileName)`
`static Test` | `suite()`
`static Test` | `suite(String basedir, String pattern)`
`static Test` | `suite(String basedir, String pattern, String excludesPattern)`

Methods inherited from class TestSuite
run, toString, getName, setName, warning, tests, countTestCases, createTest, getTestConstructor, addTest, addTestSuite, runTest, testAt, testCount, wait, wait, wait, equals, hashCode, getClass, notify, notifyAll

Methods inherited from class Object
wait, wait, wait, equals, toString, hashCode, getClass, notify, notifyAll

Field Detail

### SYSPROP_TEST_DIR

    public static final String SYSPROP_TEST_DIR

  The System Property to set as base directory for collection of Test Cases. The pattern will be used as an Ant fileset include basedir. Key is "groovy.test.dir". Default value is "./test/".

### SYSPROP_TEST_EXCLUDES_PATTERN

    public static final String SYSPROP_TEST_EXCLUDES_PATTERN

  The System Property to set as a filename excludes pattern for collection of Test Cases. When non-empty, the pattern will be used as Regular Expression pattern applied with the find operator against each candidate file.path. Key is "groovy.test.excludesPattern". Default value is "".

### SYSPROP_TEST_PATTERN

    public static final String SYSPROP_TEST_PATTERN

  The System Property to set as the filename pattern for collection of Test Cases. The pattern will be used as Regular Expression pattern applied with the find operator against each candidate file.path. Key is "groovy.test.pattern". Default value is "Test.groovy".

Method Detail

### compile

    protected Class compile(String fileName)

### loadTest

    protected void loadTest(String fileName)

### suite

    public static Test suite()

### suite

    public static Test suite(String basedir, String pattern)

### suite

    public static Test suite(String basedir, String pattern, String excludesPattern)

Copyright © 2003-2010 The Codehaus. All rights reserved.