Filter Options for JUnit Methods

This table lists the filters that are available in the Methods area when you import a test class.

JUnit Method Description
Parameterless Functions Only Ignore all functions that expect parameters
Unit Test Functions Only (selected by default for JUnit import) Ignore all functions that are not JUnit
Member Functions Only Ignore all non-member functions
Public Functions (selected by default) Include public functions
Protected Functions Include protected functions
Private Functions Include functions with private access
Package Functions Include functions with package access
Declared Functions Only Ignore functions from the base classes
Complex Functions (selected by default) Show functions that take complex parameters. In Java, complex parameters are scripted by JavaSetObject with NULL as the default value.
Autodetect Unit Test Functions (selected by default) Automatically detect and script JUnit functions according to the following rules:
  • JUnit 3.8.x scripts are derived from junit.framework.TestCase class.
  • JUnit 3.8.x functions must not have parameters or return values.
  • setUp() and tearDown() are invoked prior to and following each JUnit 3.8.x method.
  • JUnit 4.x scripts no longer require to be derived from junit.framework.TestCase class.
  • JUnit 4.x functions are recognized by the @Test annotation and added to the script, unless the @Ignore annotation is used.
  • Methods having @BeforeClass and @AfterClass annotation are invoked once per test class.
  • Methods having @BeforeClass and @After annotation are invoked prior to and following each JUnit 4.x method.