Page tree

Skip to end of metadata
Go to start of metadata

This lesson helps you install Jtest into your IDE and set it up for working with Unit Test Assistant.

Exercise 1 - Installing Jtest into your IDE

Installing into Eclipse

  1. Unpack the Jtest distribution to a location on your computer.
  2. Open Eclipse.
  3. Choose Help> Install New Software in the Eclipse menu bar.
  4. Click Add in the dialog that opens.
  5. Click Archive and open [JTEST_INSTALL_DIR]\integration\eclipse\jtest_plugin_<version>_eclipse.zip.


  6. Click OK to add the plugin to the Available Software dialog.
  7. Check the box next to the Parasoft Jtest plugin name.
  8. Click Next.
  9. Restart Eclipse when prompted to complete the installation process.

Installing into IntelliJ IDEA

  1. Unpack the Jtest distribution to a location on your computer.
  2. Open IntelliJ.
  3. Choose File> Settings> Plugins in the IntelliJ menu bar.
  4. Click Install plugins from disk... button.
  5. Browse to [JTEST_INSTALL_DIR]\integration\intellij and choose parasoft_plugin_<version>_intellij.zip.
  6. Click OK to complete the Parasoft Plugin installation and restart IntelliJ.
  7. Choose File> Settings> Plugins in the IntelliJ menu bar.
  8. Click Install plugins from disk... button.
  9. Browse to [JTEST_INSTALL_DIR]\integration\intellij and choose parasoft_plugin_<version>_intellij.zip.
  10. Click OK to complete the Jtest Plugin installation and restart IntelliJ.

Exercise 2 – Configuring Preferences

This exercise teaches you how to set up Jtest and configure UTA preferences.

  1. Choose Parasoft> Preferences (Eclipse) or Parasoft> Preferences (IntelliJ) in the menu bar.
  2. Expand the arrow next to “Parasoft” in the left pane of the Preferences dialog to open the Parasoft menu.


  3. Choose License from the Parasoft menu.
  4. Select the Local or Network radio button, depending on your license type, and fill in the required information to activate the license.
    (info) If you have the trial version of Jtest, go to Parasoft> License> Activation Code and fill in your activation code.
  5. Choose Engines from the Parasoft menu.
  6. Check the Enable box in the “Jtest” area to enable Jtest.
  7. Complete the Install dir field with the path to the Jtest executable.
  8. Click Apply.
  9. Choose Unit Test Assistant. from the Parasoft menu.
  10. Complete the Location of tests field with a pattern and naming convention that UTA will use when generating tests. You can choose a preset pattern from the drop-down menu.
  11. Enable the recommendations in the “Recommendations” area.
  12. Click Apply.

Exercise 3 – Launching the Views and Importing the Project

This exercise teaches you how to activate the views you need to work with UTA and how to open the example project shipped with Jtest into your workspace.

In Eclipse

  1. Choose Parasoft> Open Jtest Perspective in the Eclipse menu bar. This will launch all the views that are crucial when working with Jtest on the desktop. For this tutorial, you will need the following views:
    - Unit Test Assistant
    - Recommendations
    - Variables
    - Factory Methods
    - Coverage
    - Package Explorer
    - JUnit
    You can close all other views.

  2. Go to File> New> Other... in the Eclipse bar to open a wizard.
  3. Expand Jtest and select Jtest Example Project to import the example project into your workspace.
  4. Click Next.
  5. Click Finish. The "jtest-examples" project will be available in the package explorer.

In IntelliJ

  1. Choose Parasoft> Show View in the IDE menu bar and open the following views:
    - Unit Test Assistant
    - Recommendations
    - Variables
    - Factory Methods
    - Coverage
  2. Choose File> New> Create Project from Existing Sources in the IntelliJ menu bar. 
  3. Browse to [JTEST_INSTALL_DIR]\examples and select demo to create the "demo" project in IntelliJ.
  4. Click OK.

The name of the example project

The following lessons demonstrate how to use Jtest with the "jtest-examples" project in Eclipse. If you repeat the same steps in IntelliJ, all the source files are included in the "demo" project. For example:

Eclipse: jtest-examples> src/main/java> examples> nbank> Account.java
IntelliJ: demo> src/main/java> examples> nbank> Account.java

  • No labels