Class TestDescriptor
- java.lang.Object
-
- com.sun.xml.ws.test.model.TestDescriptor
-
public class TestDescriptor extends java.lang.ObjectRoot object of the test model. Describes one test.TODO: Transaction needs some 'beforeTest'/'afterTest' hook to clean up database
- Author:
- Kohsuke Kawaguchi
-
-
Field Summary
Fields Modifier and Type Field Description com.sun.istack.test.VersionProcessorapplicableVersionsVersions of the program that this test applies.java.util.SortedSet<java.lang.Integer>bugsterIdsBugster IDs that are related to this test.java.util.List<java.io.File>clientCustomizationsPossibly empty list of JAXB/JAX-WS external binding customizations.java.util.List<TestClient>clientsClient test scenarios that are to be executed.java.io.FilecommonIf non-null, this directory contains Java files shared by service and client.java.lang.StringdescriptionHuman readable description of this test.booleandisgardWsGenOutputIf true, we don't want to package the result of wsgen so that we can test the generation of wrapper beans at the runtime.java.io.FilehomeRoot of the test data directory.java.util.List<java.io.File>javaClientsJava client.java.util.List<java.lang.String>javacOptionsAdditional command-line arguments to javacbooleanjdk6java.util.List<java.lang.String>metadatafilesOptional metadata files that describes this service.java.lang.StringnameA Java identifier that represents a name of this test.java.io.FileresourcesIf non-null, this directory contains resources files used for tests.java.util.List<TestService>servicesServices to be deployed for this test.java.lang.StringsetUpScriptOptional "set up" script executed before each client script.TransportSetsupportedTransportRepresents a set of transport that this test supports.java.util.List<java.lang.String>systemPropertiesAdditional command-line arguments to javacjava.util.List<java.lang.String>testOptionsAdditional arguments to configure the harness behavior per test.java.util.Set<java.lang.String>useSetRepresents a set of Use keywords that are used by this testjava.util.List<java.lang.String>wsgenOptionsAdditional command-line arguments to wsgen for generating artifacts.java.util.List<java.lang.String>wsimportClientOptionsAdditional command-line arguments to wsimport for generating client artifacts.java.util.List<java.lang.String>wsimportServerOptionsAdditional command-line arguments to wsimport for generating server artifacts for Java-first case.java.util.Map<java.lang.String,XmlResource>xmlResources<xml-resource>s.
-
Constructor Summary
Constructors Constructor Description TestDescriptor(java.io.File descriptor, boolean disgardWsGenOutput, boolean jdk6)Parses aTestDescriptorfrom a test data directory.TestDescriptor(java.lang.String shortName, java.io.File home, java.io.File resources, java.io.File common, com.sun.istack.test.VersionProcessor applicableVersions, java.lang.String description, boolean disgardWsGenOutput, boolean jdk6)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description junit.framework.TestSuitebuild(ApplicationContainer container, WsTool wsimport, java.lang.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.java.lang.StringtoString()Returns a human readable name that identifies the test, for better readability of the test result report.
-
-
-
Field Detail
-
name
@NotNull public final java.lang.String 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
@Nullable public final java.io.File resources
If non-null, this directory contains resources files used for tests.To clients, this resource will be available from
ScriptBaseClass.resource(String).
-
common
@Nullable public final java.io.File common
If non-null, this directory contains Java files shared by service and client.
-
applicableVersions
@NotNull public final com.sun.istack.test.VersionProcessor applicableVersions
Versions of the program that this test applies.
-
description
@Nullable public final java.lang.String description
Human readable description of this test. This could be long text that spans across multiple lines.
-
supportedTransport
@NotNull public final TransportSet supportedTransport
Represents a set of transport that this test supports.
-
useSet
public final java.util.Set<java.lang.String> useSet
Represents a set of Use keywords that are used by this test
-
metadatafiles
public final java.util.List<java.lang.String> metadatafiles
Optional metadata files that describes this service.
-
bugsterIds
@NotNull public final java.util.SortedSet<java.lang.Integer> bugsterIds
Bugster IDs that are related to this test. Can be empty set but not null.
-
clients
@NotNull public final java.util.List<TestClient> 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
@NotNull public final java.util.List<java.io.File> clientCustomizations
Possibly empty list of JAXB/JAX-WS external binding customizations.
-
setUpScript
@Nullable public final java.lang.String setUpScript
Optional "set up" script executed before each client script.
-
javaClients
@NotNull public final java.util.List<java.io.File> javaClients
Java client.
-
services
@NotNull public final java.util.List<TestService> services
Services to be deployed for this test.
-
xmlResources
public final java.util.Map<java.lang.String,XmlResource> xmlResources
<xml-resource>s.
-
home
@NotNull public final java.io.File home
Root of the test data directory.
-
testOptions
public final java.util.List<java.lang.String> testOptions
Additional arguments to configure the harness behavior per test.
-
wsimportClientOptions
public final java.util.List<java.lang.String> wsimportClientOptions
Additional command-line arguments to wsimport for generating client artifacts.
-
wsimportServerOptions
public final java.util.List<java.lang.String> wsimportServerOptions
Additional command-line arguments to wsimport for generating server artifacts for Java-first case.
-
wsgenOptions
public final java.util.List<java.lang.String> wsgenOptions
Additional command-line arguments to wsgen for generating artifacts.
-
javacOptions
public final java.util.List<java.lang.String> javacOptions
Additional command-line arguments to javac
-
systemProperties
public final java.util.List<java.lang.String> systemProperties
Additional command-line arguments to javac
-
disgardWsGenOutput
public final boolean disgardWsGenOutput
If 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 Detail
-
TestDescriptor
public TestDescriptor(java.lang.String shortName, java.io.File home, java.io.File resources, java.io.File common, com.sun.istack.test.VersionProcessor applicableVersions, java.lang.String description, boolean disgardWsGenOutput, boolean jdk6)
-
TestDescriptor
public TestDescriptor(java.io.File descriptor, boolean disgardWsGenOutput, boolean jdk6) throws java.io.IOException, javax.xml.parsers.ParserConfigurationException, org.xml.sax.SAXExceptionParses aTestDescriptorfrom a test data directory.- Parameters:
descriptor- Test descriptor XML file.- Throws:
java.io.IOExceptionjavax.xml.parsers.ParserConfigurationExceptionorg.xml.sax.SAXException
-
-
Method Detail
-
build
public junit.framework.TestSuite build(ApplicationContainer container, WsTool wsimport, java.lang.String clientScriptName, boolean concurrentSideEffectFree, com.sun.istack.test.VersionNumber version) throws java.io.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:
java.io.IOException
-
toString
public java.lang.String toString()
Returns a human readable name that identifies the test, for better readability of the test result report.- Overrides:
toStringin classjava.lang.Object
-
-