Component testing and the Java editor

After you create a test or stub, you can use the Java editor to edit both the test behavior code and the stub user code class that is generated along with the stub.

 

Editing test behavior code

To edit the test behavior code, simply right-click in the Java editor and click Component Test to display a menu of elements you can add to the code. These elements include initialization points, validation actions, timers and timer validations, fail actions, and error actions. You can also start up a wizard that leads you through the process of inserting additional methods and constructors to the test behavior code.

 

Editing stub user code

When you create a stub, you can define stub data in the stub data table, and you can also edit the stub user code that is generated along with the stub. Typically, you would define stub behavior in the user code class in cases where the behavior cannot be performed in the stub data table. For example:

 

Related concepts

Stub behavior

 

Related tasks

Inserting initialization points
Inserting validation actions
Inserting timing constraints