7.5.3 Running a unit test
Run a unit test for the application using the default debugging environment. To run a unit test, deploy a project to a server, and then debug the Java EE application.
Prerequisites
-
The default debugging environment has been set up.
-
The domain administration server (DAS) is running.
-
Eclipse is running.
Intended users
-
Application developers
Procedure
From the Project Explorer view, select a project you want to deploy, and then from the context menu, select Debug As > Debug on Server.
The Debug on Server dialog box appears.
Select a server you want to use, and then click the Finish button.
The Java EE server starts up, and the project is released.
Set a break point in the file to be debugged.
On the web browser, specify the startup URL of the application, and execute the application.
When the break point is reached, the Debug perspective shows up. You can now debug the application.
- Reference note
-
When a project is added, the Java EE application with the same name might already exist on the Java EE server. In this case, the application on the Java EE server is deleted, and the application selected using Eclipse is added to the Java EE server.