Package groovy.util

Class AllTestSuite

java.lang.Object
junit.framework.TestSuite
groovy.util.AllTestSuite
All Implemented Interfaces:
junit.framework.Test

@Deprecated
public class AllTestSuite
extends junit.framework.TestSuite
Deprecated.
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 log level of this class to FINEST, all file loading will be logged.

See also groovy.util.AllTestSuiteTest.groovy

  • Field Summary

    Fields
    Modifier and Type Field Description
    static java.lang.String SYSPROP_TEST_DIR
    Deprecated.
    The System Property to set as base directory for collection of Test Cases.
    static java.lang.String SYSPROP_TEST_EXCLUDES_PATTERN
    Deprecated.
    The System Property to set as a filename excludes pattern for collection of Test Cases.
    static java.lang.String SYSPROP_TEST_PATTERN
    Deprecated.
    The System Property to set as the filename pattern for collection of Test Cases.
  • Constructor Summary

    Constructors
    Constructor Description
    AllTestSuite()
    Deprecated.
     
  • Method Summary

    Modifier and Type Method Description
    protected java.lang.Class compile​(java.lang.String filename)
    Deprecated.
     
    protected void loadTest​(java.lang.String filename)
    Deprecated.
     
    static junit.framework.Test suite()
    Deprecated.
     
    static junit.framework.Test suite​(java.lang.String basedir, java.lang.String pattern)
    Deprecated.
     
    static junit.framework.Test suite​(java.lang.String basedir, java.lang.String pattern, java.lang.String excludesPattern)
    Deprecated.
     

    Methods inherited from class junit.framework.TestSuite

    addTest, addTestSuite, countTestCases, createTest, getName, getTestConstructor, run, runTest, setName, testAt, testCount, tests, toString, warning

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
  • Field Details

    • SYSPROP_TEST_DIR

      public static final java.lang.String SYSPROP_TEST_DIR
      Deprecated.
      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/".
      See Also:
      Constant Field Values
    • SYSPROP_TEST_PATTERN

      public static final java.lang.String SYSPROP_TEST_PATTERN
      Deprecated.
      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".
      See Also:
      Constant Field Values
    • SYSPROP_TEST_EXCLUDES_PATTERN

      public static final java.lang.String SYSPROP_TEST_EXCLUDES_PATTERN
      Deprecated.
      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 "".
      See Also:
      Constant Field Values
  • Constructor Details

    • AllTestSuite

      public AllTestSuite()
      Deprecated.
  • Method Details

    • suite

      public static junit.framework.Test suite()
      Deprecated.
    • suite

      public static junit.framework.Test suite​(java.lang.String basedir, java.lang.String pattern)
      Deprecated.
    • suite

      public static junit.framework.Test suite​(java.lang.String basedir, java.lang.String pattern, java.lang.String excludesPattern)
      Deprecated.
    • loadTest

      protected void loadTest​(java.lang.String filename) throws CompilationFailedException, java.io.IOException
      Deprecated.
      Throws:
      CompilationFailedException
      java.io.IOException
    • compile

      protected java.lang.Class compile​(java.lang.String filename) throws CompilationFailedException, java.io.IOException
      Deprecated.
      Throws:
      CompilationFailedException
      java.io.IOException