MySQL Connector/J 8.0 Developer Guide

4.5 Testing Connector/J

The Connector/J source code repository or packages that are shipped with source code include an extensive test suite, containing test cases that can be executed independently. The test cases are divided into the following categories:

The bundled Ant build file contains targets like test, which can facilitate the process of running the Connector/J tests; see the target descriptions in the build file for details. Besides the requirements for building Connector/J from the source code described in Section 4.3, “Installing from Source”, a number of the tests also require the File System Service Provider 1.2 for the Java Naming and Directory Interface (JNDI), available at—place the jar files downloaded from there into the lib directory or in the directory pointed to by the property com.mysql.cj.extra.libs.

To run the test using Ant, in addition to the properties required for Section 4.3, “Installing from Source”, you must set the following properties in the file or through the Ant -D options:

After setting these parameters, run the tests with Ant in the following ways:

While the test results are partially reported by the console, complete reports in HTML and XML formats are provided. View the HTML report by opening buildtest/junit/report/index.html. XML version of the reports are located in the folder buildtest/junit.


Going from Connector/J 5.1 to 8.0, a number of Ant properties for testing Connector/J have been renamed or removed; see Section, “Change for Test Properties” for details.