Execute the unit tests

After you have successfully built the library sources, there are some unit tests to compile and execute.

In a console session and in the XBee Java API directory execute the following command:

#> mvn clean test

Maven downloads more dependencies this time. These are the dependencies and plugins necessary for executing the tests. Before compiling and executing the tests, Maven compiles the main code. That is, you only need to execute this command to compile the sources, compile the unit tests, and execute the tests.

The resulting class files are located inside the directory called target in the root of the repository.

#> mvn clean test
[INFO] Scanning for projects...
[INFO] ------------------------------------------------------------------------

[...]

[INFO] ------------------------------------------------------------------------
[INFO] Building XBee Java Library Project 1.0
[INFO] ------------------------------------------------------------------------
[INFO]

[...]

-------------------------------------------------------
T E S T S
-------------------------------------------------------
Running com.digi.xbee.api.ApplyChangesTest
Tests run: 5, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.248 sec
Running com.digi.xbee.api.ExecuteParameterTest
Tests run: 11, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0 sec
Running com.digi.xbee.api.ForceDisassociateTest
Tests run: 5, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0 sec

[...]

Results :

Tests run: 946, Failures: 0, Errors: 0, Skipped: 0

[INFO]
[INFO] ------------------------------------------------------------------------
[INFO] Building Receive Modem Status Sample 1.0
[INFO] ------------------------------------------------------------------------
[INFO]

[...]

[INFO] ------------------------------------------------------------------------
[INFO] Reactor Summary:
[INFO]
[INFO] XBee Java Library Project ......................... SUCCESS [  0.296 s]
[INFO] XBee Java Library ................................. SUCCESS [ 29.995 s]
[INFO] Receive Modem Status Sample ....................... SUCCESS [  0.078 s]

[...]

[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 31.353 s
[INFO] Finished at: 2014-11-03T11:27:25+01:00
[INFO] Final Memory: 22M/60M
[INFO] ------------------------------------------------------------------------
#>