You can define timing constraints directly in the test behavior code or from the test data table (TDT) to measure the duration of a method call or a sequence of method calls.
To add a timing constraint:
The starting point for the timer is added to the test behavior code. For example, if the timer is named timersetrate, the following code is added:
ComponentTest.startTimer("timersetrate");
The timer validation is added to the test behavior code, and a new row is added to the test data table at the point where the timer needs to be verified. For example, if the timer is named timesetrate, the following code is added:
ComponentTest.checkTimer("timersetrate");
Related concepts
Timing constraints
Component testing and the Java editor
Stub behavior