Follow Techotopia on Twitter

On-line Guides
All Guides
eBook Store
iOS / Android
Linux for Beginners
Office Productivity
Linux Installation
Linux Security
Linux Utilities
Linux Virtualization
Linux Kernel
System/Network Admin
Scripting Languages
Development Tools
Web Development
GUI Toolkits/Desktop
Mail Systems
Eclipse Documentation

How To Guides
General System Admin
Linux Security
Linux Filesystems
Web Servers
Graphics & Desktop
PC Hardware
Problem Solutions
Privacy Policy




Eclipse Application Testing Guide
Previous Page Home Next Page

Importing an existing JUnit test

If you have JUnit tests outside of TPTP, these can be imported into a TPTP JUnit test.

Step 1

If the tests are already within an existing Eclipse Java project, then go to Step 2.

  • Otherwise, first import the Java source and class files from the file system into a Java project by clicking File > Import > File system.
  • Click Next. The File system import dialog launches.
  • Browse to the required directory, then navigate to, and select, the relevant files. Click Finish.

Step 2

  • Once the files are in your Eclipse workbench, then import the relevant Java class files from the Java project by clicking File > Import > JUnit tests as TPTP JUnit Tests > Next to display the JUnit Tests selection dialog. Alternatively, right-click one or more JUnit tests in the Test Navigator and select Import as TPTP JUnit Tests... or Alt+Shift+T, I.
  • Select TPTP JUnit Test as the Destination type.
  • Navigate to the required files and then click on Finish.
  • The Confirm Open Editor dialog may appear (see the Window > Preferences... > Test > Open Editor preference), confirming if the new JUnit test suite is to be opened in the JUnit Test editor.

Note that the import wizard shows all existing JUnit test cases in the workspace that have not already been imported to TPTP. If this list is empty, then it means that either no JUnit tests were found in the workspace, or that all existing JUnit test classes have already been imported to TPTP.

  Published under the terms of the Eclipse Public License Version 1.0 ("EPL") Design by Interspire