SDN Controller Programming Guide
194
5 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 test is automatically run when building the application; see Building Application on page 115.
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 64 and Figure 65.
Figure 64 Running Unit Test within Eclipse (Step 1)