Reference Guide

Table Of Contents
7 Testing Applications
The following information describes how to test SDN applications by executing Unit Test and
enabling remote debugging in the controller.
Unit Testing
Unit tests are automatically run when building the application; see Building the Application on
page 146. There is a version of this command to avoid running unit tests:
Building Application Ignoring Unit Test:
$ mvn clean install -Dmaven.test.skip=true
The Building Application Ignoring Unit Test command is not recommended but it could be useful in
cases where the unit test is temporarily broken.
Unit test is part of the project’s test directory which is configured as a source file in Eclipse. Just by
following the Maven directory structure conventions, when Maven generates the Eclipse projects it
configures the test folder as a source folder. Thus, to run unit tests within Eclipse right click on a
specific project and then select Run As JUnit Test as illustrated in Figure 66 and Figure 67.
Figure 66 Running Unit Test within Eclipse (Step 1)
229