Class 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 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 from ScriptBaseClass.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.
      • useSet

        public final Set<String> useSet
        Represents a set of Use keywords that are used by this test
      • 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.
      • javaClients

        @NotNull
        public final List<File> javaClients
        Java client.
      • services

        @NotNull
        public final List<TestService> services
        Services to be deployed for this test.
      • 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.
      • javacOptions

        public final List<String> javacOptions
        Additional command-line arguments to javac
      • 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
    • 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 to TestSuite (so that when TestSuite is executed, you execute this test.
        Parameters:
        container - The container to host the services.
        clientScriptName - See Main.clientScriptName
        concurrentSideEffectFree - See Main.concurrentSideEffectFree
        Returns:
        TestSuite that contains test execution plan for this test.
        Throws:
        IOException
      • toString

        public String toString()
        Returns a human readable name that identifies the test, for better readability of the test result report.
        Overrides:
        toString in class Object