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
Programming
Scripting Languages
Development Tools
Web Development
GUI Toolkits/Desktop
Databases
Mail Systems
openSolaris
Eclipse Documentation
Techotopia.com
Virtuatopia.com
Answertopia.com

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

  




 

 

Eclipse Application Testing Guide
Previous Page Home Next Page

Generating an executable test

Follow this procedure to generate an executable test. Before a test can be run, the test's Java source code must be generated and compiled. This process is called code generation.

Before the test's Java code can be generated, a location for storing the code must exist. By convention, this is a folder named src located in the same Java project as the test. If no source folder named src exists in any existing Java project, you must create one as explained in Java Build Path. Once the test's Java source code is generated, the Eclipse IDE automatically compiles the source code into an executable test.

To generate a test's source code:
  1. In the Test Navigator of the Test Perspective, right-click the test to be run and select Generate Source... or Alt+Shift+T, S. The JUnit Test Definition Code Generation dialog box opens.
  2. In the Source Folder field, accept the default or click Browse to select the source folder in a Java project in which to store the test code.
  3. In the Package Name field, accept the default or click Browse to select the package in the selected Java project in which to store the test code.
  4. In the Class Name field, specify the name of the test code.
  5. Click Finish.

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