impl.vi.deploy.dir=${webcontainer.home}/domains/domain1/autodeploy
impl.vi=glassfish
impl.vi.host=${webServerHost}
impl.vi.port=${webServerPort}
Setup and Configuration |
Previous | Next | Contents |
Note
|
The Jakarta EE Specification process provides for any number of compatible implementations. As additional implementations become available, refer to project or product documentation from those vendors for specific TCK setup and operational guidance. |
This chapter describes how to set up the SOAP Attachments TCK and JavaTest harness software. Before proceeding with the instructions in this chapter, be sure to install all required software, as described in Chapter 3, "Installation."
After completing the instructions in this chapter, proceed to Chapter 5, "Executing Tests," for instructions on running the SOAP Attachments TCK.
After configuring your environment as described in this section, continue with the instructions in Section 4.4, "Using the JavaTest Harness Software."
Note
|
In these instructions, variables in angle brackets need to be expanded
for each platform. For example, On Windows, you must escape any backslashes with an extra backslash in path separators used in any of the following properties, or use forward slashes as a path separator instead. |
Set the following environment variables in your shell environment:
JAVA_HOME
to the directory in which Java SE 8 is installed
TS_HOME
to the directory in which the SOAP Attachments TCK
2.0 software is installed
PATH
to include the following directories: JAVA_HOME/bin
,
TS_HOME/bin
, and ANT_HOME/bin
Edit your <TS_HOME>/bin/ts.jte
file and set the following
environment variables:
Set the webServerHost
property to the name of the host on which
Jakarta EE 9 CI is running.
The default setting is localhost
.
Set the webServerPort
property to the port number of the host on
which Jakarta EE 9 CI is running.
The default setting is 8080
.
Set the local.classes
property to point to the Jakarta SOAP with Attachments Implementation 2.0.0 CI
classes/JAR files.
If you are using the Jakarta EE 9 CI, Jakarta SOAP with Attachments Implementation 2.0.0, set this property to the following:
local.classes=${glassfish.ri.classes}
Set the webcontainer.home
property to the installation directory of Jakarta EE
9 CI.
Set the impl.vi
, impl.vi.deploy.dir
, impl.vi.host
, and impl.vi.port
properties to the supported web container, deploy directory, host and port for
the SOAP Attachments CI.
The supported web container for the SOAP Attachments CI is the Jakarta EE 9 CI. The
default settings for these properties are as follows:
impl.vi.deploy.dir=${webcontainer.home}/domains/domain1/autodeploy
impl.vi=glassfish
impl.vi.host=${webServerHost}
impl.vi.port=${webServerPort}
Run the ant config.vi
target to configure the Vendor
Implementation that is defined in the impl.vi
property.
cd <TS_HOME>/bin
ant config.vi
This target performs the following tasks:
* Stops the application server running the SOAP Attachments 2.0 CI
* Copies the TCK-dependent files ${tslib.name}.jar
and tsharness.jar
into the application server’s external library folder
* Starts the application server
* Creates users and the appropriate roles
* Enables HTTP trace requests
Deploy the SOAP Attachments TCK tests to the Web server:
Change to the <TS_HOME>/bin
directory.
Execute the ant deploy.all
command.
This target invokes the <TS_HOME>/bin/xml/impl/glassfish/deploy.xml
script, which deploys the SOAP Attachments TCK 2.0 WAR files to the
implementation server under test.
Follow the instructions in 5 Executing Tests to run
the tests you just deployed.
After configuring your environment as described in this section, continue with the instructions in Section 4.4, "Using the JavaTest Harness Software."
Note
|
In these instructions, variables in angle brackets need to be expanded
for each platform. For example, On Windows, you must escape any backslashes with an extra backslash in path separators used in any of the following properties, or use forward slashes as a path separator instead. |
Before You Begin
Decide against which SOAP Attachments implementation the tests will be run and determine to which the Servlet-compliant Web server the SOAP Attachments TCK applications will be published.
Package the SOAP Attachments test applications for that SOAP Attachments implementation and Servlet–compliant Web server.
See Appendix B, "Packaging the Test Applications in Servlet-Compliant WAR Files With VI-Specific Information," for information about repackaging the SOAP Attachments test application.
Set the following environment variables in your shell environment:
JAVA_HOME
to the directory in which Java SE 8 is installed
TS_HOME
to the directory in which the SOAP Attachments TCK
2.0 software is installed
TS_HOME
to the directory in which the
SOAP Attachments 2.0 VI has been installed
PATH
to include the following directories: JAVA_HOME/bin
,
TS_HOME/bin
, and ANT_HOME/bin
Edit your <TS_HOME>/bin/ts.jte
file and set the following
environment variables:
Set the webServerHost
property to the name of the host on which
your Web server is running that is configured with the Vendor
Implementation.
The default setting is localhost
.
Set the webServerPort
property to the port number of the host on
which the Web server is running that is configured with the Vendor
SOAP Attachments 2.0 Vendor Implementation.
The default setting is 8080
.
Set the webcontainer.home
property to the installation directory of the Web
server.
Set the local.classes
property to point to the classes or JAR file
for the SOAP Attachments 2.0 API.
Set the report.dir
to the default directory in which JavaTest creates a
test report for the most recent test run.
This property is a required property for the TCK Ant targets; it must be set. To
disable reporting, set the report.dir
property to none
.
work.dir
to the default directory in which JavaTest writes temporary files that
are created during test execution.
This property is required for the TCK Ant targets.
Set the impl.vi
property to the vendor implementation.
This property will be used for the directory name in which the deploy.xml
and the config.vi.xml
files will reside. See 4.3 "Custom Configuration
Handlers," and Section 4.4.1, "To Create a Custom Deployment Handler," for
more information.
Set the impl.vi.deploy.dir
property to point to the autodeploy
directory for the Web server.
Provide your own implementation of the porting package interface
provided with the SOAP Attachments TCK.
The porting package interface, TSURLInterface.java
, obtains URL
strings for web resources in an implementation-specific manner. API
documentation for the TSURLInterface.java
porting package interface is
available in the SOAP Attachments TCK documentation bundle.
Edit your <TS_HOME>/bin/ts.jte
file and set the porting.ts.url.class.1
property to point to your porting implementation class used for obtaining URLs.
The default setting for the CI porting implementation is
com.sun.ts.lib.implementation.sun.common.SunRIURL.
Execute the config.vi
command to configure your implementation for the
Concurrency TCK:
Change to the <TS_HOME>/bin
directory.
Execute the ant config.vi
command.
This target invokes the
<TS_HOME>/bin/xml/impl/<your-implementation>/config.vi.xml
script,
which configures the SOAP Attachments 2.0 implementation server under test (the
server that was designated by the impl.vi
setting in the ts.jte
file). If you are using the
Jakarta EE 9 CI, Jakarta SOAP with Attachments Implementation 2.0.0 with the impl.vi
property set to glassfish
, this target copies
required TCK JAR files to the server and then starts the server.
You can configure your implementation server manually or automatically. If
you choose to do this automatically, see 4.3 "Custom Configuration
Handlers" to create your own configuration handler.
Deploy the Concurrency TCK tests to the Web server:
Change to the <TS_HOME>/bin
directory.
Execute the ant deploy.all
command.
This target invokes the
<TS_HOME>/bin/xml/impl/<your-implementation>/deploy.xml
script,
which deploys the SOAP Attachments 2.0 WAR files to the implementation server
under test.
You can deploy the TCK WAR files manually or automatically. If you choose to do this automatically, see Section 4.4.1, "To Create a Custom Deployment Handler," to create your own custom deployment handler.
Follow the instructions in 5 Executing Tests to run the tests you just deployed.
Configuration handlers are used to configure and unconfigure a SOAP Attachments 2.0 implementation during the certification process. These are similar to deployment handlers but used for configuration. A configuration handler is an Ant build file that contains at least the required targets listed below:
config.vi
- to configure the vendor implementation
clean.vi
- to unconfigure the vendor implementation
These targets are called from the <TS_HOME>/bin/build.xml
file and
call down into the implementation-specific configuration handlers.
To provide your own configuration handler, create a config.vi.xml file
with the necessary configuration steps for your implementation and place
the file under the <TS_HOME>/bin/xml/impl/<your_impl>
directory.
For more information, you may wish to view <TS_HOME>/bin/xml/impl/glassfish/config.vi.xml
,
the configuration file for Jakarta EE 9 Compatible Implementation, Eclipse GlassFish.
Deployment handlers are used to deploy and undeploy the WAR files that contain the tests to be run during the certification process. A deployment handler is an Ant build file that contains at least the required targets listed in the table below.
The SOAP Attachments TCK provides these deployment handlers:
<TS_HOME>/bin/xml/impl/none/deploy.xml
<TS_HOME>/bin/xml/impl/glassfish/deploy.xml
<TS_HOME>/bin/xml/impl/tomcat/deploy.xml
The deploy.xml
files in each of these directories are used to control
deployment to a specific container (no deployment, deployment to
the Eclipse GlassFish Web container, deployment to the Tomcat Web container)
denoted by the name of the directory in which each deploy.xml
file
resides. The primary build.xml
file in the <TS_HOME>/bin
directory
has a target to invoke any of the required targets (-deploy
, -undeploy
,
-deploy.all
, -undeploy.all
).
To deploy tests to another SOAP Attachments implementation, you must create a custom handler.
Create a new directory in the <TS_HOME>/bin/xml/impl
directory tree.
For example, create the <TS_HOME>/bin/xml/impl/my_deployment_handler
directory.
Replace my_deployment_handler with the value of the impl.vi
property that you set in Step 5 of the configuration procedure
described in Section 4.2, "Configuring Your Environment to Repackage
and Run the TCK Against the Vendor Implementation".
Copy the deploy.xml file from the <TS_HOME>/bin/xml/impl/none
directory to the directory that you created.
Modify the required targets in the deploy.xml
file. This is what
the deploy.xml
file for the "none" deployment handler looks like.
<project name="No-op Deployment" default="deploy">
<!-- No-op deployment target -->
<target name="-deploy">
<echo message="No deploy target implemented for this deliverable"/>
</target>
<target name="-undeploy">
<echo message="No undeploy target implemented for this deliverable"/>
</target>
<target name="-deploy.all">
<echo message="No deploy target implemented for this deliverable"/>
</target>
<target name="-undeploy.all">
<echo message="No undeploy target implemented for this deliverable"/>
</target>
</project>
Although this example just echoes messages, it does include the four
required Ant targets (-deploy
, -undeploy
, -deploy.all
, -undeploy.all
)
that your custom deploy.xml
file must contain. With this as your
starting point, look at the required targets in the deploy.xml
files
in the Tomcat and Eclipse Glassfish directories for guidance as you create
the same targets for the Web container in which you will run your
implementation of SOAP Attachments.
The following Ant targets can be called from anywhere under the
<TS_HOME>/src
directory:
deploy
undeploy
deploy.all
undeploy.all
The deploy.all
and undeploy.all
targets can also be called from the
<TS_HOME>/bin
directory.
Note
|
The targets in the |
There are two general ways to run the SOAP Attachments TCK test suite using the JavaTest harness software:
Through the JavaTest GUI; if using this method, please continue on to Section 4.7, "Using the JavaTest Harness Configuration GUI."
In JavaTest batch mode, from the command line in your shell environment; if using this method, please proceed directly to Chapter 5, "Executing Tests."
You can use the JavaTest harness GUI to modify general test settings and to quickly get started with the default SOAP Attachments TCK test environment. This section covers the following topics:
Note
|
It is only necessary to proceed with this section if you want to run the JavaTest harness in GUI mode. If you plan to run the JavaTest harness in command-line mode, skip the remainder of this chapter, and continue with Chapter 5, "Executing Tests." |
In order for the JavaTest harness to execute the test suite, it requires information about how your computing environment is configured. The JavaTest harness requires two types of configuration information:
Test environment: This is data used by the tests. For example, the path to the Java runtime, how to start the product being tested, network resources, and other information required by the tests in order to run. This information does not change frequently and usually stays constant from test run to test run.
Test parameters: This is information used by the JavaTest harness to run the tests. Test parameters are values used by the JavaTest harness that determine which tests in the test suite are run, how the tests should be run, and where the test reports are stored. This information often changes from test run to test run.
The first time you run the JavaTest harness software, you are asked to specify the test suite and work directory that you want to use. (These parameters can be changed later from within the JavaTest harness GUI.)
Once the JavaTest harness GUI is displayed, whenever you choose Start, then Run Tests to begin a test run, the JavaTest harness determines whether all of the required configuration information has been supplied:
If the test environment and parameters have been completely configured, the test run starts immediately.
If any required configuration information is missing, the configuration editor displays a series of questions asking you the necessary information. This is called the configuration interview. When you have entered the configuration data, you are asked if you wish to proceed with running the test.
Before you start the JavaTest harness software, you must have a valid test suite and Java SE 8 installed on your system.
The SOAP Attachments TCK includes an Ant script that is used to execute the
JavaTest harness from the <TS_HOME>
directory. Using this Ant script
to start the JavaTest harness is part of the procedure described in
Section 4.7.3, "To Configure the JavaTest Harness to Run the
TCK Tests."
When you execute the JavaTest harness software for the first time, the JavaTest harness displays a Welcome dialog box that guides you through the initial startup configuration.
If it is able to open a test suite, the JavaTest harness displays a Welcome to JavaTest dialog box that guides you through the process of either opening an existing work directory or creating a new work directory as described in the JavaTest online help.
If the JavaTest harness is unable to open a test suite, it displays a Welcome to JavaTest dialog box that guides you through the process of opening both a test suite and a work directory as described in the JavaTest documentation.
After you specify a work directory, you can use the Test Manager to configure and run tests as described in Section 4.7.3, "To Configure the JavaTest Harness to Run the TCK Tests."
The answers you give to some of the configuration interview questions are specific to your site. For example, the name of the host on which the JavaTest harness is running. Other configuration parameters can be set however you wish. For example, where you want test report files to be stored.
Note that you only need to complete all these steps the first time you start the JavaTest test harness. After you complete these steps, you can either run all of the tests by completing the steps in Section 5.1, "Starting JavaTest," or run a subset of the tests by completing the steps in Section 5.2, "Running a Subset of the Tests."
Change to the <TS_HOME>/bin
directory and start the JavaTest test
harness:
cd <TS_HOME>/bin
ant gui
From the File menu, click Open Quick Start Wizard.
The Welcome screen displays.
Select Start a new test run, and then click Next.
You are prompted to create a new configuration or use a configuration
template.
Select Create a new configuration, and then click Next.
You are prompted to select a test suite.
Accept the default suite (<TS_HOME>/src
), and then click Next.
You are prompted to specify a work directory to use to store your test
results.
Type a work directory name or use the Browse button to select a work
directory, and then click Next.
You are prompted to start the configuration editor or start a test run.
At this point, the SOAP Attachments TCK is configured to run the
default test suite.
Deselect the Start the configuration editor option, and then click Finish.
Click Run Tests, then click Start.
The JavaTest harness starts running the tests.
To reconfigure the JavaTest test harness, do one of the following:
Click Configuration, then click New Configuration.
Click Configuration, then click Change Configuration.
Click Report, and then click Create Report.
Specify the directory in which the JavaTest test harness will write
the report, and then click OK.
A report is created, and you are asked whether you want to view it.
Click Yes to view the report.
The JavaTest GUI enables you to configure numerous test options. These options are divided into two general dialog box groups:
Group 1: Available from the JavaTest Configure/Change Configuration submenus, the following options are displayed in a tabbed dialog box:
Tests to Run
Exclude List
Keywords
Prior Status
Test Environment
Concurrency
Timeout Factor
Group 2: Available from the JavaTest Configure/Change
Configuration/Other Values submenu, or by pressing Ctrl+E
, the following
options are displayed in a paged dialog box:
Environment Files
Test Environment
Specify Tests to Run
Specify an Exclude List
Note that there is some overlap between the functions in these two dialog boxes; for those functions use the dialog box that is most convenient for you. Please refer to the JavaTest Harness documentation or the online help for complete information about these various options.
Previous | Next | Contents |