Using JUnit under VisualAge for Java 2.0



This page describes how to use JUnit with VisualAge for Java:

Installing JUnit in VisualAge for Java

These are the steps for installing JUnit in VisualAge for Java:
  1. import the vaj\junit.dat file into your repository.
  2. add the JUnit project to your workspace.
  3. copy the contents of vaj\project_resources into your project_resources directory. So that your project_resources look like:

  4.     project_resources
Notice: If the JUnit Icon doesn't show up in the graphical test runner verify that the JUnit project resources are installed as described above.

Using JUnit

Here are some hints for how to use JUnit under VisualAge for Java.

Installing JUnit as a VisualAge for Java 2.0 tool

VisualAge for Java provides an open tools API to add custom tools to the development environment. Here are the steps for how to install JUnit as a Visual Age for Java Tool:
  1. copy the directory vaj\tools\test-ui into the VAJ_INSTALLDIR\tools directory
  2. add JUnit to your workspace class path
  3. restart VisualAge for Java
Once JUnit is installed as a tool you can select a class and run its tests with the Selected->Tools->JUnit or from the Quick Start menu item.

Notice: the projects of the test cases have to be on the workspace class path to run them. Otherwise JUnit will not find the classes. For example, to add your MyTests project to the workspace class path follow the steps above and append your project, e.g., JUnit;MyTests.