Monday, January 19, 2009

White Box - Other Techniques

6) Design by Contract (DbC)

DbC is a formal way of using comments to incorporate specification information into the code itself. Basically, the code specification is expressed unambiguously using a formal language that describes the code's implicit contracts. These contracts specify such requirements as:
· Conditions that the client must meet before a method is invoked.
· Conditions that a method must meet after it executes.
· Assertions that a method must satisfy at specific points of its execution

Tools that check DbC contracts at runtime such as JContract [http://www.parasoft.com/products/jtract/index.htm] are used to perform this function.

7) Profiling

Profiling provides a framework for analyzing Java code performance for speed and heap memory use. It identifies routines that are consuming the majority of the CPU time so that problems may be tracked down to improve performance.
These include the use of Microsoft Java Profiler API and Sun’s profiling tools that are bundled with the JDK. Third party tools such as JaViz [http://www.research.ibm.com/journal/sj/391/kazi.html] may also be used to perform this function.


8) Error Handling

Exception and error handling is checked thoroughly are simulating partial and complete fail-over by operating on error causing test vectors. Proper error recovery, notification and logging are checked against references to validate program design.

9) Transactions

Systems that employ transaction, local or distributed, may be validated to ensure that ACID (Atomicity, Consistency, Isolation, Durability). Each of the individual parameters is tested individually against a reference data set.
Transactions are checked thoroughly for partial/complete commits and rollbacks encompassing databases and other XA compliant transaction processors.

No comments:

Post a Comment