Manual tests in zero.connection.tests
The
zero.connection.tests project contains manual build verification tests for the functionality contained in the
zero.core.connection.* and
zero.connection.* packages. These packages have unit tests that are executed as part of the build process and will have passed before each new build is published. However, the build verification tests must be executed manually to verify the basic aspects of the functionality that are more difficult to test in an automated fashion.
Preparation
In order to execute the tests you will need an installation of the WebSphere sMash CLI, SVN and a web browser. The main
zero.connection.tests test application can be started as follows:
- Install the WebSphere sMash CLI and prepare the a fresh shared repository.
- Extract zero.connection.tests from the ASSEMBLE component in SVN.
- Note You need to get zero.connection.tests from ASSEMBLE and not zero.core.connection.tests from CORE
- Start the zero.connection.tests application, using zero start
- Access the zero.connection.tests home page at http://localhost:8081/
Executing the tests
Send email
Tests the use of
EmailConnection and the
zero.core.connection.* SMTP functionality to send a short email with an attachment.
- Select Send email from the zero.connection.tests home page.
- Enter your SMTP server address in the SMTP Hostname field.
- Enter your email address in the To field of the form presented (in order that you can verify the correctness of the generated email when you receive it.
- Complete the other fields of the form as you see fit and press Send.
- TEST: Confirm that the response page indicates Email sent and the response status code 250.
- Allow sufficient time for the email to be delivered to the email address entered in the To field.
- TEST: Verify the From, Subject and To fields of the received email and the message contents. If you did not modify the message text on the email form, the message should look similar this:
- TEST: View the zero.jpeg attachment included in the received email and verify that it displays correctly.
HTTP tests
Tests the invocation of a remote service over HTTP (the "remote service" is also hosted by the
zero.connection.tests application). Some of these tests stress the outbound HTTP transport more than would be acceptable in unit test and the requests do take a few minutes to complete - please be patient with them.
- Select HTTP tests from the zero.connection.tests home page.
- Press Run test to run the first test.
- If there are no failures reported, press the new Run test button to run the next test.
- TEST: Repeat the previous step until the Test successful! message appears.
REST2SOAP test
This tests uses the REST2SOAP mediation to invoke an external SOAP service over HTTP. This test must be executed on a machine that is connected to the Internet.
- Select REST2SOAP test from the zero.connection.tests home page.
- Press Run test to run the test.
- TEST: Confirm that the Test successful! message appears.
FTP test (Silverstone only)
This test does not apply to the 1.0.0.x service stream
This test uses the built-in
ftp protocol implementation to send and then retrieve a file from a remote FTP server.
Note: You will need to supply the test with the network address and login credentials for a remote FTP server that can accept plain, unencrypted TCP/IP connections from the test machine (e.g. a GSA FTP server). The test will create a remote file with the supplied name and then read it back, so you will need both read and write access to the remote directory. The test will
not delete the remote file created so you will need to manually delete it from your remote directory when the test has been completed.
- Select FTP test from the zero.connection.tests home page.
- Enter the hostname, userid, password and other parametersknown for the test.
- Press Run test to run the first test. The application will attempt to connect to the server and write the named file.
- TEST: There should be no exception displayed in the log or result page. If there is an exception reported, make sure it is not a result of an incorrectly entered parameter value on the previous form.
- Press Run test number 2. The application will attempt to connect to the server and read back the named file.
- TEST: Confirm that the Test successful! message appears.
SFTP test (Silverstone only)
This test does not apply to the 1.0.0.x service stream
This test uses the
zero.connection.sftp module to PUT, GET and DELETE resources against a remote SFTP server.
Note: This test requires a running, configured SFTP server. You should be able to PUT and GET files to and from your SFTP server via a command line, authenticating both via username/password and public/private key mechanisms. (Internet searches for 'id_rsa.pub' will yield instructions for the latter.)
This test allows three different approaches to host verification, and two approaches to user authentication. It can therefore be run up to six times in different combinations.
- Select SFTP test from the zero.connection.tests home page.
- Enter the Hostname parameter
- Host verification: enter either the host's fingerprint, or check 'Ignore fingerprint' or enter the path to your local 'known hosts' file, e.g., c:\cygwin\home\userid\.ssh\known_hosts
- User authentication: enter a Userid (this is always required) plus either a Password, or path to a private Keyfile, and the associated Passphrase
- Press Run test
- There are fourteen tests, which variously PUT, GET and DELETE files and directories.
- TEST: All fourteen tests should complete successfully. The timestamps and other information reported on the result pages should make sense.
When setting up an sftp client, we've found the following to work for Windows:
- Install cygwin and the ssh package on your laptop/client
- On your laptop, run 'ssh-keygen -t rsa' - this will create the files ~/.ssh/id_rsa and ~/.ssh/id_rsa.pub
- Copy or append the contents of ~/.ssh/id_rsa.pub to ~/.ssh/authorized_keys on the target server. At this point, running cygwin's ssh from the laptop to the server should display the prompt, "Enter passphrase for key '/home/userid/.ssh/id_rsa'"
Run zero.connection.demo sample application (Silverstone only)
This test does not apply to the 1.0.0.x service stream
TEST Install and run Connection API demonstration application,
zero.connection.demo, under the CLI. This sample is documented in the Developer's Guide.