JADE Unit Testing

The JADE unit testing framework is part of the RootSchema and consists of classes and an interface, which are documented in Volume 2 of the JADE Encyclopaedia of Classes.

Class or Interface Description
JadeTestCase Superclass for all user-written unit test classes
JadeTestListenerIF Interface providing callback methods on the progress and results of unit testing
JadeTestRunner Class for running user-written unit tests

Unit test methods are written in subclasses of JadeTestCase from which they inherit the assertion methods that determine whether a unit test fails or succeeds. A unit test run can be structured with methods to set up data in a known state (the test fixture) before a unit test starts and to tear down that data when the unit test has completed.

The results of a unit test run can be received by an object that implements the JadeTestListenerIF interface (the listener object). The way the results are captured, displayed, and analyzed depends on how the listener object implements the interface methods.

The JADE development environment enables you to execute a selected unit test method or all unit test methods for a selected class by pressing the F9 key. For details, see "Running a Unit Test", in Chapter 4 of the JADE Development Environment User’s Guide.

Visual Studio uses the F9 key to set breakpoints, by default, and uses the F5 key to run and continue debug execution. JADE uses the F5 key to set breakpoints and the F9 key to run and continue debug execution. Switching between the two development environments can lead to confusion and frustration when using the F5 and F9 keys.

You can swap the F9 and F5 accelerator key bindings, by checking the Swap F5 (Toggle Breakpoint) and F9 (Execute/Continue) accelerators check box on the Short Cut Keys sheet on the Preferences dialog. This check box is unchecked by default (that is, false). For details, see "Maintaining Shortcut Keys", in Chapter 2 of the JADE Development Environment User's Guide.