Chapter 6. Testing

Table of Contents

6.1. Running automated unit tests
6.2. Running PubSub and Harvest Tests
6.3. Writing IRIS unit tests
6.3.1. Plugin unit tests
6.3.2. IRIS unit tests
6.4. Testing Guidelines

IRIS contains automated and user-driven test cases. This document explains how to test different parts of the system.

6.1. Running automated unit tests

Once built, the automated unit tests can be run by executing "ant test" from iris/src. This takes a very long time and runs well over a hundred tests.

The results of these tests are located in iris/dest/test/html/ (use this link to access nightly build test results). The unit tests are run with each nightly build and uploaded with the documentation. Click the link to view the results. Note that some tests in the results actually test dozens of features. For example, unit tests for xmlharvest, xmlpubsub and remotexml boostrap the XML test framework into a single JUnit test.

"ant test" will run tests for all IRIS plugins. To individually test any IRIS plugin, navigate to the plugins's test folder and execute "ant test". Note that if any unit tests fail, the "ant test" task will also fail. However, the "ant test" task will execute all tests and create a report before failing the build.