Home

 

Running the JUnit test case or JUnit test suite

To run a JUnit test case or JUnit test suite, do these steps:

Select the ITSOBankTest or AllTests class and click the arrow of in the toolbar and select Run As Æ JUnit Test (or right-click the class and select Run As Æ JUnit Test.

In our example RAD runs the two test methods defined in ITSOBankTest class.

The JUnit view opens. You might want to move the JUnit view on top of the Console view.

Notice that the two test methods passed the asserts verification (Figure | 3-3).

Figure 23-3 JUnit view: Both test methods passed the assert verifications

Tip: To run the same test again, click in the JUnit view toolbar.

ibm.com/redbooks