javac fpopulate.java
java fpopulate -s test1 -d dest_url
Setup and Configuration |
Previous | Next | Contents |
This chapter describes how to set up the JavaMail 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 JavaMail TCK.
This chapter includes the following topics:
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 7 is installed
TS_HOME
to the directory in which the JavaMail TCK
1.6 software is installed
JARPATH
to the directory in which the JavaMail
1.6 RI has been installed
PATH
to include the following directories: JAVA_HOME/bin
and <TS_HOME>/tools/ant/bin
Edit your <TS_HOME>/bin/javamail.jte
file and set the following
environment variables:
Set the JAVA_HOME
property to the directory in which Java SE 7
is installed.
Set the TS_HOME
property to the directory in which the
JavaMail TCK 1.6 software is installed.
Set the JARPATH
property to the directory in which the
JavaMail 1.6 RI has been installed.
Run the JavaTest harness in GUI or command-line mode, as described in Section 4.4, "Using the JavaTest Harness Software."
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 7 is installed
TS_HOME
to the directory in which the JavaMail TCK
1.6 software is installed
JARPATH
to the directory in which the JavaMail
1.6 Vendor Implementation has been installed
PATH
to include the following directories: JAVA_HOME/bin
and <TS_HOME>/tools/ant/bin
Edit your <TS_HOME>/bin/javamail.jte
file and set the following
environment variables:
Set the JAVA_HOME
property to the directory in which Java SE 7
is installed.
Set the TS_HOME
property to the directory in which the
JavaMail TCK 1.6 software is installed.
Set the JARPATH
property to the directory in which the
JavaMail 1.6 Vendor Implementation has been
installed.
Run the JavaTest harness in GUI or command-line mode, as described in Section 4.4, "Using the JavaTest Harness Software."
Install IMAP server software on a machine.
Note that the IMAP server must support IMAP4 (RFC 1730) or IMAP4rev1 (RFC 2060).
Create one user account with password on this server.
Note that a password is necessary.
Populate the mailbox for the user you just created:
Change to the $TS_HOME/tests/mailboxes
directory.
Execute the following commands:
javac fpopulate.java
java fpopulate -s test1 -d dest_url
where dest_url
is of the form:
protocol://username:password@hostname/
Install SMTP software on a machine.
Configure a user account so that the SMTP server can deliver email to
that account.
Refer to your SMTP server documentation for instructions.
Edit your <TS_HOME>/bin/javamail.jte
file and set the following variables:
JAVAMAIL_SERVER
to the server on which the mail server is installed
JAVAMAIL_USERNAME
to the user name for the user account you created
in step 2
JAVAMAIL_PASSWORD
to the password for the user account you created
in step 2
JAVAMAIL_ROOT_PATH
to the folder under which your test mailboxes are
defined
This variable must be set to "" or "/" if your mailboxes are directly under
the root.
SMTP_USERNAME
to the SMTP user name
This is usually the same as the IMAP user name if you are using a mail server.
SMTP_DOMAIN
to the domain name of the server; for example,
sun.com
, aol.com
There are two general ways to run the JavaMail TCK test suite using the JavaTest harness software:
Through the JavaTest GUI; if using this method, please continue on to Section 4.5, "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 JavaMail 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 7 installed on your system.
The JavaMail 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.5.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.5.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 JavaMail 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 |