Class TestDescriptor
TODO: Transaction needs some 'beforeTest'/'afterTest' hook to clean up database
- Author:
- Kohsuke Kawaguchi
-
Field Summary
FieldsModifier and TypeFieldDescriptionfinal com.sun.istack.test.VersionProcessorVersions of the program that this test applies.Bugster IDs that are related to this test.Possibly empty list of JAXB/JAX-WS external binding customizations.final List<TestClient> Client test scenarios that are to be executed.final FileIf non-null, this directory contains Java files shared by service and client.final StringHuman readable description of this test.final booleanIf true, we don't want to package the result of wsgen so that we can test the generation of wrapper beans at the runtime.final FileRoot of the test data directory.Java client.Additional command-line arguments to javacfinal booleanOptional metadata files that describes this service.final StringA Java identifier that represents a name of this test.final FileIf non-null, this directory contains resources files used for tests.final List<TestService> Services to be deployed for this test.final StringOptional "set up" script executed before each client script.final TransportSetRepresents a set of transport that this test supports.Additional command-line arguments to javacAdditional arguments to configure the harness behavior per test.Represents a set of Use keywords that are used by this testAdditional command-line arguments to wsgen for generating artifacts.Additional command-line arguments to wsimport for generating client artifacts.Additional command-line arguments to wsimport for generating server artifacts for Java-first case.final Map<String, XmlResource> <xml-resource>s. -
Constructor Summary
ConstructorsConstructorDescriptionTestDescriptor(File descriptor, boolean disgardWsGenOutput, boolean jdk6) Parses aTestDescriptorfrom a test data directory.TestDescriptor(String shortName, File home, File resources, File common, com.sun.istack.test.VersionProcessor applicableVersions, String description, boolean disgardWsGenOutput, boolean jdk6) -
Method Summary
Modifier and TypeMethodDescriptionjunit.framework.TestSuitebuild(ApplicationContainer container, WsTool wsimport, String clientScriptName, boolean concurrentSideEffectFree, com.sun.istack.test.VersionNumber version) Creates the execution plan of this test descriptor and adds them toTestSuite(so that whenTestSuiteis executed, you execute this test.toString()Returns a human readable name that identifies the test, for better readability of the test result report.
-
Field Details
-
name
A Java identifier that represents a name of this test.A test name needs to be unique among all the tests. It will be generated by the test harness dynamically from the test's partial directory path. Namely, from toplevel test case directory to the specific test case directory. Something like this 'testcases.policy.parsing.someSpecificTest'
This token is used by the harness to avoid collision when running multiple tests in parallel (for example, this can be used as a web application name so that multiple test services can be deployed on the same container without interference.)
-
resources
If non-null, this directory contains resources files used for tests.To clients, this resource will be available from
ScriptBaseClass.resource(String). -
common
If non-null, this directory contains Java files shared by service and client. -
applicableVersions
@NotNull public final com.sun.istack.test.VersionProcessor applicableVersionsVersions of the program that this test applies. -
description
Human readable description of this test. This could be long text that spans across multiple lines. -
supportedTransport
Represents a set of transport that this test supports. -
useSet
Represents a set of Use keywords that are used by this test -
metadatafiles
Optional metadata files that describes this service. -
bugsterIds
Bugster IDs that are related to this test. Can be empty set but not null. -
clients
Client test scenarios that are to be executed.When this field is empty, that means the test is just to make sure that the service deploys.
-
clientCustomizations
Possibly empty list of JAXB/JAX-WS external binding customizations. -
setUpScript
Optional "set up" script executed before each client script. -
javaClients
Java client. -
services
Services to be deployed for this test. -
xmlResources
<xml-resource>s. -
home
Root of the test data directory. -
testOptions
Additional arguments to configure the harness behavior per test. -
wsimportClientOptions
Additional command-line arguments to wsimport for generating client artifacts. -
wsimportServerOptions
Additional command-line arguments to wsimport for generating server artifacts for Java-first case. -
wsgenOptions
Additional command-line arguments to wsgen for generating artifacts. -
javacOptions
Additional command-line arguments to javac -
systemProperties
Additional command-line arguments to javac -
disgardWsGenOutput
public final boolean disgardWsGenOutputIf true, we don't want to package the result of wsgen so that we can test the generation of wrapper beans at the runtime.False otherwise.
-
jdk6
public final boolean jdk6
-
-
Constructor Details
-
TestDescriptor
-
TestDescriptor
public TestDescriptor(File descriptor, boolean disgardWsGenOutput, boolean jdk6) throws IOException, ParserConfigurationException, SAXException Parses aTestDescriptorfrom a test data directory.- Parameters:
descriptor- Test descriptor XML file.- Throws:
IOExceptionParserConfigurationExceptionSAXException
-
-
Method Details
-
build
public junit.framework.TestSuite build(ApplicationContainer container, WsTool wsimport, String clientScriptName, boolean concurrentSideEffectFree, com.sun.istack.test.VersionNumber version) throws IOException Creates the execution plan of this test descriptor and adds them toTestSuite(so that whenTestSuiteis executed, you execute this test.- Parameters:
container- The container to host the services.clientScriptName- SeeMain.clientScriptNameconcurrentSideEffectFree- SeeMain.concurrentSideEffectFree- Returns:
TestSuitethat contains test execution plan for this test.- Throws:
IOException
-
toString
Returns a human readable name that identifies the test, for better readability of the test result report.
-