Manual tests for messaging components
The
zero.messaging.manual..tests* projects contain manual build verification tests for the functionality contained in the
zero.messaging.* 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:
- Two fresh installations of Eclipse 3.3.x ("Eclipse for RCP/Plug-in Developers" recommended).
- One containing the appropriate level of the Project Zero plug-in.
- One containing Equinox (most easily obtained by using "Eclipse for RCP/Plug-in Developers").
- An SVN client (command line or Subcplise).
- A WebSphere sMash CLI installation (for the messaging sample test)
- A web browser.
To prepare the Project Zero test applications:
- Create a new Eclipse workspace for Project Zero development and empty your Project Zero local repository.
- Extract zero.messaging.manual.broker1.tests, zero.messaging.manual.broker2.tests and zero.messaging.manual.client.tests from the MESSAGING component in SVN into your workspace.
- Resolve the project dependencies using the Project Zero resolve process.
- Start all three projects zero.messaging.manual.broker1.tests, zero.messaging.manual.broker2.tests and zero.messaging.manual.client.tests as a Project Zero applications.
- Access the zero.messaging.manual.client.tests home page at http://localhost:8080/
Executing the tests
Store and forward round trip tests
In this test, messages are sent by the "local client" to the "remote broker", forwarded back to the "local broker" and
finally received by the "local client". This verifies the ordering and content of these messages.
- Select Store-and-forward round-trip from the zero.messaging.manual.client.tests home page.
- Enter 10 for the number of Messages to use in the test.
- Press Run step one to run the first step.
- If there are no failures reported, press the new Run step # button to run the next step of the test.
- TEST: Repeat the previous step until the Test successful! message appears.
Broker stats tests
As in the previous test, messages are sent by the "local client" to the "remote broker", forwarded back to the "local broker" and
finally received by the "local client". This verifies the ordering and content of these messages as well as the queue lengths
reported by the brokers.
Tests the queue lengths of each broker when the messages are all sent and received in a single group.
- Select Broker stats from the zero.messaging.manual.client.tests home page.
- Enter 10 for the number of Messages to use in the test. Press Begin Test.
- Enter 10. Press GO. Verify Total Sent=10, Remote Queue=10, Local Queue=0, Total Received=0
- Press GO. Verify Total Sent=10, Remote Queue=0, Local Queue=10, Total Received=0
- Enter 10. Press GO. Verify Total Sent=10, Remote Queue=0, Local Queue=0, Total Received=10
- Verify Test succeeded! message appears.
Tests the queue lengths of each broker when the messages are all sent and received intermittently.
- Select Return to Test Index.
- Select Broker stats from the zero.messaging.manual.client.tests home page.
- Enter 10 for the number of Messages to use in the test. Press Begin Test.
- Enter 6. Press GO. Verify Total Sent=6, Remote Queue=6, Local Queue=0, Total Received=0
- Press GO. Verify Total Sent=6, Remote Queue=0, Local Queue=6 Total Received=0
- Enter 4. Press GO. Verify Total Sent=6, Remote Queue=0, Local Queue=2, Total Received=4
- Enter 4. Press GO. Verify Total Sent=10, Remote Queue=4, Local Queue=2, Total Received=4
- Press GO. Verify Total Sent=10, Remote Queue=0, Local Queue=6 Total Received=4
- Enter 6. Press GO. Verify Total Sent=10, Remote Queue=0, Local Queue=0, Total Received=10
- Verify Test succeeded! message appears.
Dynamic pipe config test
- Select Dynamic pipe config test from the zero.messaging.manual.client.tests home page.
- Press "Run test" and carefully follow the instructions displayed for each stage of the test. Note...
- "broker1" refers to the zero.messaging.manual.broker1.tests application and "broker2" refers to the zero.messaging.manual.broker2.tests application.
- The test involves editing the config files of running broker applications. It is important to ensure that the applications are stopped and started as instructed by the instructions displayed by the test.
- When you have followed the instructions and observed any messages on each page, simply press the button to proceed to the next stage of test. Some stages may take several seconds to complete their processing and display the next step.
- TEST After completing the 6 test steps, the message "Test successful!" should be displayed.
- TEST Review the logs of all three applications for SEVERE messages. There should be none in the client log or broker2 log. The broker1 log will contain several SEVERE messages from certain stages in the test, as documented in the test case instructions. Ensure there were no unexpected SEVERE messages.
'zero broker' command line test - SILVERSTONE ONLY
- Ensure that the latest Silverstone, i.e. version [1.1.0.0, 2.0.0.0[ 'zero' command is on your path
- cd zero.messaging.manual.broker1.tests
- Test the 'help' function: "zero help broker" - this should output a useful help message
- Check that "zero broker" outputs the same help information as "zero help broker"
- Issue "zero broker list" and verify that a list of broker names and their associated message store directories are printed to stdout
- (On Windows) check that the local broker, testBroker1, appears in the Windows registry by running 'regedit' and navigating to HKEY_CURRENT_USER/Software/JavaSoft/Prefs/Micro/Broker/Brokers/
- Verify that destroying the local broker works: "zero broker destroy testBroker1". This should delete the local broker instance (everything under messageStore/) and remove if from the Windows registry (View -> Refresh, or F5, in regedit)
- Verify that a remote broker cannot be destroyed without specifying its message store directory: "zero broker destroy testBroker2" should fail, giving an error message "CWPZA5257E: Please specify the message store directory associated with the broker named testBroker2"
- Delete the remote broker with the command "zero broker destroy testBroker2 [path to testBroker2's messageStore/ directory]"
External client OSGi test
This test uses the external client within an OSGi environment to communicate with the three
zero.messaging.manual..tests* Project Zero applications used above.
- Create a new Eclipse workspace using "Eclipse for RCP/Plug-in Developers", for plugin development
- Extract zero.messaging.manual.externalclient.tests from the MESSAGING component in SVN into your workspace
- Obtain the external client JARs from the build repository:
- Download the JARs using zero create externalclient from zero:zero.messaging.externalclient
- Copy all the JARs from externalclient/jars to the jars directory in your zero.messaging.manual.externalclient.tests project.
- TEST Open the testPlatform.target file and click the "Set as Target Platform" link at the top of the document. This should resolve the compilation errors. (If not - double check that you completed Step 3)
- The test application is coded to assume an IBM JDK. If you are using a Sun JDK then you need to to:
- Open zero.messaging.manual.externalclient.tests.TestRunner
- Remove the line cf[i].setAlgorithm("IbmX509");
- Make sure the project is recompiled.
- Start the Project Zero test applications (zero.messaging.manual.broker1.tests, zero.messaging.manual.broker2.tests and zero.messaging.manual.client.tests) and wait for all three to initialize.
- Right-click on runTest.launch and select "Open Run Dialog":
- Select runTest under "OSGi Framework".
- Select the "Settings" tab and ensure that Runtime JRE points to your test IBM Java runtime.
- Press the "Run" button.
- TEST The external client test project OSGi console should display "zero.messaging.manual.externalclient.tests: Started." and the test should run.
- TEST When the test has completed, the message "Test PASSED" should be displayed in the external client console.
Messaging sample test
TEST Use the CLI installers (base and then RTE) to install and run the messaging sample scenario documented in the Reliable Transport Extension Guide.