SeamFramework.orgCommunity Documentation

Chapter 11. Configuration

11.1. JBoss Test Harness Properties

This chapter lays out how to configure the JBoss Test Harness by specifying the API implementation classes, defining the target container connection information, and various other switches. Finally, a detailed account of how the JBoss Test Harness negotiates the execution of the tests in the container is given.

The JBoss Test Harness allows the test suite to be launched in a pluggable fashion. In order to execute a test suite, the JBoss Test Harness must be configured by specifying implementations of the test launcher and container APIs.

System properties and/or the resource META-INF/, a Java properties file, are used to configure the JBoss Test Harness. The bootstrap configuration builder looks to the property org.jboss.testharness.api.ConfigurationBuilder, the first property listed in table 3.1, for the fully qualified class name (FQCN) of a concrete configuration builder implementation to get started. This implementation loads the remaining configuration settings and produces a JBoss Test Harness configuration.

For you convenience, the default configuration builder implementation org.jboss.testharness.impl.PropertiesBasedConfigurationBuilder is provided, which collates all the JBoss Test Harness configuration settings from system and Java properties. It does so by aggregating the system properties with the properties defined in the META-INF/ resource in any classpath entry under a single properties map, allowing you to partition the configuration settings as needed.

A complete list of configuration properties for the JBoss Test Harness has been itemized in Table 11.1, “JBoss Test Harness Configuration Properties”, accompanied by the default value (if any) and a description for each property.

Table 11.1. JBoss Test Harness Configuration Properties

Property = Default ValueDescription
org.jboss.testharness.api.ConfigurationBuilder= org.jboss.testharness.impl.PropertiesBasedConfigurationBuilder The configuration bootstrap class for the JBoss Test Harness.
org.jboss.testharness.testPackage= The top-level Java package containing classes to be tested. Used to determine which artifacts to dump to disk only; not used during running of a suite.
org.jboss.testharness.libraryDirectory= Directory containing extra JARs which should be deployed in the artifact (for example in WEB-INF/lib.
org.jboss.testharness.standalone=true Tests are run using standalone mode if true or using in-container mode if false.
org.jboss.testharness.runIntegrationTests=false If true, integration tests are run. In-container mode must be activated.
org.jboss.testharness.spi.Containers= The deployment implementation for setting up and tearing down the container and deploying and undeploying in-container tests. The host and port on which the container is running.
org.jboss.testharness.connectDelay=5000 The timeout (ms) when attempting to connect to the container (e.g. via http).
org.jboss.testharness.api.TestLauncher= The in-container test launcher, the built in org.jboss.testharness.impl.runner.servlet.ServletTestLauncher is provided and suitable for any Servlet environment.
org.jboss.testharness.container.\ deploymentExceptionTransformer= Provides an interception feature for deployment exceptions, allowing them to be inspected and altered before reporting to the test harness for validation by the test case.
org.jboss.testharness.container.forceRestart=false Whether the container should be restarted before the tests are executed.
org.jboss.testharness.container.extraConfigurationDir= A directory containing a or files that define additional properties. Can be used to provide runtime specific properties.
org.jboss.testharness.spi.StandaloneContainers= The container implementation for executing standalone tests.
dumpArtifacts=false Whether the test artifacts should be written to disk for inspection.
org.jboss.testharness.outputDirectory= Directory where test artifacts will be written to disk, if dumpArtifacts is true.