Create a new test
We can create a new test to add to an existing category and set of tests.
These instructions describe how to create a new test in an existing category and set of tests (for example, the Queues test set in the Queue manager tests category) in IBM MQ Explorer. The instructions explain how to define the test in the Eclipse development environment. For information about writing the Java test source, see the WMQTest interface.
To create a new set or category of tests instead of using an existing set or category, or if you have created new objects to administer in IBM MQ Explorer and we are writing tests for the new objects, see Create new test categories, test sets, and object types.
- Create an Eclipse plugin project to contain the new test
- Defining a new test
- Writing a new test
- Deploying the new test
Parent topic: Adding new tests
Ensure that we have installed the Eclipse Graphical Editing
Framework (GEF) tools. For more information, see Installing IBM MQ Explorer into Eclipse environments. Create and configure a new plug-in project to contain
your new test: Note the
value in the ID field
can be different from the value that you entered in the Name field on the previous page
of the wizard. The project name is used only during development; the
plugin ID is used by Eclipse to load and identify the plugin.
If the listed plug-ins are not available, install the Eclipse
Graphical Editing Framework (GEF) tools. For more information, see Installing IBM MQ Explorer into Eclipse environments.
The following instructions describe how to define a new
test an existing test set (for example, in the Queues test set), in the existing Queue manager tests category.
For more information about creating new test sets in the Queue manager
tests category, creating new categories, or defining new object types
to be tested, see Create new categories,
test sets, and object types. Configure your plug-in to
contain a new test:
The plug-in project is now configured to contain a new
test; next we need to write the test itself. Define a new test
for each new test that we want to write. Create a new Java class that contains the test:
We have completed writing the test and configuring the
plugin that contains the test. Next, export the plug-in and deploy
the plug-in to test it. Write a new test for each test that
you defined in the plugin.xml file. Export the plug-in that contains your test (or set of tests) to the file system then restart
IBM MQ Explorer so that the new plug-in is loaded and we can
run the tests:
We have deployed your new plugin. Now we can run your
new tests.Create an Eclipse plug-in project to contain the new test
Before starting
About this task
Procedure
Results
The plug-in project is ready to contain tests
Defining a new test
About this task
Procedure
Attribute
Description
Example value
id
The unique identifier of the test.
com.ibm.mq.explorer.tests.samples.QueueNames
name
The meaningful name of the test.
My Queues Test
class
The Java class that contains the test. Do not
enter this value yet; we can automatically enter this value when you create the class later.
com.ibm.mq.explorer.tests.samples.QueueNames
testset
The category to which the test belongs. The example value shown
associates the test with the category Queue manager tests.
com.ibm.mq.explorer.tests.samples.wmq
testsubset
The subcategory to which the test belongs. The example value
shown associates the test with the subcategory Queues.
queues
description
A description of what the test checks.
Checks queue names against simple naming
conventions.
furtherinfo
The location of an HTML or XHTML document that contains more information about the test. This
document is displayed in IBM MQ Explorer when you double-click
the test in the Run Tests dialog or a test result in the Test Results view. For more information,
see Test Documentation
doc/QueueNamesInfo.html (The
location of the file relative to the plugin.xml file.)
Results
Writing a new test
About this task
Procedure
Results
Deploying the new test
About this task
Procedure
Results