Customizing White-Box Testing
You use two Design by Contract tags to customize Jtest so that it automatically suppresses uncaught runtime exceptions that you do not expect to occur or that you are not concerned with.
To have Jtest suppress errors for inputs that you do not expect to occur, use the @pre tag to specify what inputs are permissible. If you use the @pre tag to indicate valid method inputs, then use Jcontract to check Design by Contract contracts at runtime, you will automatically be alerted to instances where the system passes this method these unexpected inputs.
To have Jtest suppress expected exceptions, use the @exception tag to specify what exceptions you want Jtest to ignore.
For details on using these two tags, see About Design by Contract and The Design by Contract Specification Language.
Related Topics
About White-Box Testing
Performing White-Box Testing
Dynamic Analysis Suppressions
Using Design by Contract With Jtest
The Design by Contract Specification Language
Testing A Class - Two Simple Examples
|