Package com.sun.xml.ws.test.model
Class TestDescriptor
- java.lang.Object
-
- com.sun.xml.ws.test.model.TestDescriptor
-
public class TestDescriptor extends Object
Root 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.SortedSet<Integer>bugsterIdsBugster IDs that are related to this test.List<File>clientCustomizationsPossibly empty list of JAXB/JAX-WS external binding customizations.List<TestClient>clientsClient test scenarios that are to be executed.FilecommonIf non-null, this directory contains Java files shared by service and client.StringdescriptionHuman readable description of this test.static org.iso_relax.verifier.SchemadescriptorSchemabooleandisgardWsGenOutputIf true, we don't want to package the result of wsgen so that we can test the generation of wrapper beans at the runtime.FilehomeRoot of the test data directory.List<File>javaClientsJava client.List<String>javacOptionsAdditional command-line arguments to javacbooleanjdk6List<String>metadatafilesOptional metadata files that describes this service.StringnameA Java identifier that represents a name of this test.FileresourcesIf non-null, this directory contains resources files used for tests.List<TestService>servicesServices to be deployed for this test.StringsetUpScriptOptional "set up" script executed before each client script.TransportSetsupportedTransportRepresents a set of transport that this test supports.List<String>systemPropertiesAdditional command-line arguments to javacList<String>testOptionsAdditional arguments to configure the harness behavior per test.Set<String>useSetRepresents a set of Use keywords that are used by this testList<String>wsgenOptionsAdditional command-line arguments to wsgen for generating artifacts.List<String>wsimportClientOptionsAdditional command-line arguments to wsimport for generating client artifacts.List<String>wsimportServerOptionsAdditional command-line arguments to wsimport for generating server artifacts for Java-first case.Map<String,XmlResource>xmlResources<xml-resource>s.
-
Constructor Summary
Constructors Constructor Description TestDescriptor(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
All Methods Instance Methods Concrete Methods Modifier and Type Method Description junit.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.StringtoString()Returns a human readable name that identifies the test, for better readability of the test result report.
-
-
-
Field Detail
-
name
@NotNull public final 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 File resources
If non-null, this directory contains resources files used for tests. To clients, this resource will be available fromScriptBaseClass.resource(String).
-
common
@Nullable public final 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 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.
-
metadatafiles
public final List<String> metadatafiles
Optional metadata files that describes this service.
-
bugsterIds
@NotNull public final SortedSet<Integer> bugsterIds
Bugster IDs that are related to this test. Can be empty set but not null.
-
clients
@NotNull public final 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 List<File> clientCustomizations
Possibly empty list of JAXB/JAX-WS external binding customizations.
-
setUpScript
@Nullable public final String setUpScript
Optional "set up" script executed before each client script.
-
services
@NotNull public final List<TestService> services
Services to be deployed for this test.
-
xmlResources
public final Map<String,XmlResource> xmlResources
<xml-resource>s.
-
home
@NotNull public final File home
Root of the test data directory.
-
testOptions
public final List<String> testOptions
Additional arguments to configure the harness behavior per test.
-
wsimportClientOptions
public final List<String> wsimportClientOptions
Additional command-line arguments to wsimport for generating client artifacts.
-
wsimportServerOptions
public final List<String> wsimportServerOptions
Additional command-line arguments to wsimport for generating server artifacts for Java-first case.
-
wsgenOptions
public final List<String> wsgenOptions
Additional command-line arguments to wsgen for generating artifacts.
-
systemProperties
public final List<String> systemProperties
Additional command-line arguments to javac
-
descriptorSchema
public static final org.iso_relax.verifier.Schema descriptorSchema
-
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(String shortName, File home, File resources, File common, com.sun.istack.test.VersionProcessor applicableVersions, String description, boolean disgardWsGenOutput, boolean jdk6)
-
TestDescriptor
public TestDescriptor(File descriptor, boolean disgardWsGenOutput, boolean jdk6) throws IOException, org.dom4j.DocumentException, ParserConfigurationException, SAXException
Parses aTestDescriptorfrom a test data directory.- Parameters:
descriptor- Test descriptor XML file.- Throws:
IOExceptionorg.dom4j.DocumentExceptionParserConfigurationExceptionSAXException
-
-
Method Detail
-
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
-
-