org.opengis.cite.ogcapifeatures10

## Class TestNGController

- java.lang.Object
- - org.opengis.cite.ogcapifeatures10.TestNGController

- All Implemented Interfaces:
    com.occamlab.te.spi.jaxrs.TestSuiteController

      public class TestNGController
      extends Object
      implements com.occamlab.te.spi.jaxrs.TestSuiteController

  Main test run controller oversees execution of TestNG test suites.

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `TestNGController()` Default constructor uses the location given by the "java.io.tmpdir" system property as the root output directory.
    `TestNGController(String outputDir)` Construct a controller that writes results to the given output directory.

  - ### Method Summary

    All Methods Static Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `Source` | `doTestRun(Document testRunArgs)`
    `String` | `getCode()`
    `String` | `getTitle()`
    `String` | `getVersion()`
    `static void` | `main(String[] args)` A convenience method for running the test suite using a command-line interface.
    `(package private) void` | `validateTestRunArgs(Document testRunArgs)` Validates the test run arguments.

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Constructor Detail

    - #### TestNGController

          public TestNGController()

      Default constructor uses the location given by the "java.io.tmpdir" system property as the root output directory.

    - #### TestNGController

          public TestNGController(String outputDir)

      Construct a controller that writes results to the given output directory.
      Parameters:
        `outputDir` - The location of the directory in which test results will be written (a file system path or a 'file' URI). It will be created if it does not exist.

  - ### Method Detail

    - #### main

          public static void main(String[] args)
                           throws Exception

      A convenience method for running the test suite using a command-line interface. The default values of the test run arguments are as follows:
      - XML properties file: ${user.home}/test-run-props.xml
      - outputDir: ${user.home}
      - deleteSubjectOnFinish: false

      Synopsis

           ets-*-aio.jar [-o|--outputDir $TMPDIR] [-d|--deleteSubjectOnFinish] [test-run-props.xml]

      Parameters:
        `args` - Test run arguments (optional). The first argument must refer to an XML properties file containing the expected set of test run arguments. If no argument is supplied, the file located at ${user.home}/test-run-props.xml will be used.
      Throws:
        `Exception` - If the test run cannot be executed (usually due to unsatisfied pre-conditions).

    - #### getCode

          public String getCode()

      Specified by:
        `getCode` in interface `com.occamlab.te.spi.jaxrs.TestSuiteController`

    - #### getVersion

          public String getVersion()

      Specified by:
        `getVersion` in interface `com.occamlab.te.spi.jaxrs.TestSuiteController`

    - #### getTitle

          public String getTitle()

      Specified by:
        `getTitle` in interface `com.occamlab.te.spi.jaxrs.TestSuiteController`

    - #### doTestRun

          public Source doTestRun(Document testRunArgs)
                           throws Exception

      Specified by:
        `doTestRun` in interface `com.occamlab.te.spi.jaxrs.TestSuiteController`
      Throws:
        `Exception`

    - #### validateTestRunArgs

          void validateTestRunArgs(Document testRunArgs)

      Validates the test run arguments. The test run is aborted if any of these checks fail.
      Parameters:
        `testRunArgs` - A DOM Document containing a set of XML properties (key-value pairs).
      Throws:
        `IllegalArgumentException` - If any arguments are missing or invalid for some reason.

Copyright © 2020 Open Geospatial Consortium. All rights reserved.