Unit testing enables you to improve the quality and reliability of your applications by writing unit tests as your system is built and by performing extensive unit testing with minimal user intervention. You can build your own unit testing driver or you can use the default JADE unit test functionality.
Develop tests for a unit of code (which can be a fragment, a method, or a module) as the code is written, to ensure that quality is built into a project from the early stages.
Unit tests isolate each part of the program and show that the individual parts are correct. They provide a strict, written contract that the piece of code must satisfy. Use unit testing to:
Enable refactoring without regression (that is, ensuring the module still works correctly)
Eliminate uncertainty in the units
Enable a bottom-up testing style approach
Document the functionality provided by a unit and how to use it
The Jade menu displays the Unit Test Debug command if a user-defined schema with the
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,
To run a unit test and invoke the test dialog
To invoke the test dialog, press F9 or select the Unit Test command from the Jade menu on one of the following.
A unit test method in a JadeTestCase subclass, to run the unit test for that method only.
A unit test class (the JadeTestCase class or a subclass of the
A user-defined schema that has JadeTestCase subclasses, to run all unit test methods in all subclasses of the JadeTestCase class in the hierarchy of the schema; that is, it runs all unit test methods of all subclasses of JadeTestCase in the schema and all of its subschemas.
The
To execute and debug a unit test, perform one of the following actions
Select the Unit Test Debug command from the Jade menu.
Press Shift+F9.
The JADE unit test framework is then initiated in JADE debug mode for the selected JadeTestCase class or selected method of the class if a method is selected. For details, see Chapter 17, "