Package nesstar.test

The Nesstar Test suite is a set of tests used to check the correctness, robustness and performance of Nesstar Servers and Nesstar API releases.

See:
          Description

Interface Summary
Worker A worker performs some operations and then returns the number of units of work performed.
WorkerEx A richer version of Worker.
 

Class Summary
NesstarTestCase Root cl ass for all Nesstar Test classes.
 

Package nesstar.test Description

The Nesstar Test suite is a set of tests used to check the correctness, robustness and performance of Nesstar Servers and Nesstar API releases.

The test suite is based on  JUnit plus the following extension modules:

HTTPUnit and HTMLUnit
for testing at the HTTP level
JPerf
for reliability (stress) and performance testing

The test code is in the cvs:/faster/test directory.

The test suite performs two kinds of tests:

API Unit Tests

The skeletons of the API test classes are generated directly from the object model using the Nesstar generation tool (ant target: ant dgenerate in ejbserver).

For each public property and public method in the object model a corresponding test method is generated in the test class.

For example, for the following API class (also generated from the object model):

public class Dataset {

String title;

public String getDDI() {
}
}

The generation tool would produce a TestBase class:

public class DatasetTestBase extends NesstarTestCase {

_object Dataset;

public void testAttributeTitle() throws Exception {
String _attribute = _object.getTitle();
}

public void testOperationGetDDI() throws Exception {
untested("Dataset.getDDI is untested");
}
}


And a Test class:

public class DatasetTest extends DatasetTestBase {

public void testAttributeTitle() throws Exception {
String _attribute = _object.getTitle();
}

public void testOperationGetDDI() throws Exception {
untested("Dataset.getDDI is untested");
}
}

All modifications to the default test code must be made to the Test class, leaving the TestBase unchanged. When updates are made to the object model, and the test code is regenerated, only the TestBase class will be overwritten, so any modifications will be safe in the Test class, and the TestBase will contain skeletal code for any new method or attribute tests, which can be copied into the Test class.

The API test classes can be found in the same package as the corresponding API class, e.g.:

Functional Tests

The functional tests are in the nesstar.test.functional.

Installing the Test Suite

The test classes requires quite a few external libraries. These are stored in the CVS repository (at a later time they might be available as part of the Nesstar SDK release as well) so no special installation is required if the test suite is executed from inside CVS.

The NesstarLightTest requires some additional open source software components that are not in CVS at the moment: Mozilla v0.9.9 and 'webclient 1.2'. (note the test is obsolete and is going to be replaced.).

Running the Tests

The test suite is normally executed using targets defined in cvs:\faster\ejbserver\build.xml.

The two most useful targets are:

junit.report              run all the standard tests and produce and display an html report
junit.mytest             run you own selection of tests using the JUnit GUI client

The junit.report target runs JUnit in textual mode and generate a set of XML reports (in the cvs:/faster/ejbserver/reports directory). The reports are then converted to a single html report (cvs:/faster/docs/reports/html/bugs.html) that is automatically open and displayed in Internet Explorer.

The junit.mytest target execute a custom test suite that will normally contains only the tests that a given developer is interested in at the moment.

To create your individual testsuite complete the following steps:

To specify the server on which both the units and the functional tests have to operate (a few tests operate on hard-wired servers) copy the server's
nesstar.properties file (e.g. /Nesstar-Server-2.16/config/nesstar.properties) to cvs:/faster/ejbserver/jboss/config/nesstar.properties

Reliability Testing

The aim of reliability testing is to verify that the server can operate continiously under significant load without crashing or locking.

To check the server reliability the test suite includes:

To run the stress test:

Note: the test is currently set up to test the nesstar2 development server. It can easily be changed to test another server (we might fix it in the future so that it will automatically test the developer default server).

Performance Testing

The aim of performance testing is to verify that the server is able to satisfy in a reasonable time the requests of a specified number of concurrent users.

Some performance check are in the JUnit test suite (e.q. on query response times, check HCTest and CatalogTest.

The JMeter stress test is also useful to assess performance.

More extensive performance tests have been developed by the Health Canada development team and might be integrated in the test suite in the future.


Nesstar SDK

Copyright©2003 NSD - All Rights Reserved