Page tree

Skip to end of metadata
Go to start of metadata

With Unit Test Assistant you can easily create multiple test cases for methods from a selected class, as well as files or packages selected in the Project Explorer. The methods are analyzed to create runnable test cases with initial values and sample assertions, which can be easily modified or uncommented. You can add test cases using the UTA interface or the Eclipse context menu.

  1. If the Unit Test Assistant view is not already open, choose Parasoft> Show View> Unit Test Assistant from the Eclipse menu bar.
  2. Select a class in the editor.
  3. Click the Add test case(s) button.

  4. Select the methods you want to create test cases for and specify the test type: regular or parameterized (see Creating a Parameterized Unit Test for details on creating parameterized test cases).



  5. Click OK.
  6. View the tests to modify or uncomment the default UTA values if necessary.



  7. Run the test with UTA to collect coverage information and recommendations for possible improvements (see Executing Unit Tests with Unit Test Assistant).


Alternatively, you can add test cases using the Eclipse context menu:

  1. Right-click a file(s) or package(es) in the Project Explorer.
  2. Click Add test case(s).


If you select one file:

  • You can specify the test type (regular or parameterized) and select the methods you want to create test cases for. 
  • UTA will add new test cases for all selected methods in the file. 

If you select more than one file or a package(s):

  • You can specify the test type (regular or parameterized), but you cannot specify individual methods.
  • UTA will skip the files that are not testable or whose corresponding test classes already exist.


  • No labels