Skip to content

Testing: Debugging Common Test Problems

Jonathan Niles edited this page Mar 4, 2016 · 1 revision

Debugging tests can be difficult. This page shows some common problems and tips on how to fix them.

Ensure MySQL is in Strict Mode

One common issue is that MySQL is not in the correct mode. This can happen by installing a new program that modifies MySQL's properties, upgrading MySQL itself, or by other means. To debug, check that you are in strict mode by running the following query at the MySQL prompt:

SELECT @@GLOBAL.sql_mode; -- should return 'STRICT_ALL_TABLES'

If any result other than STRICT_ALL_TABLES is returned, set MySQL's sql_mode to STRICT_ALL_TABLES with the following command:

SET GLOBAL sql_mode='STRICT_ALL_TABLES';
Ensure MySQL is in the appropriate version range

The application officially supports MySQL versions 5.6 and up. To check your MySQL distribution, use your package manager or type mysql --version at the command prompt.

Ensure the integration tests pass before end-to-end tests

Sometimes, the errors seem more complicated than they actually are. To find a bug, make sure that the integration tests (which are faster and more numerous) all pass before giving up hope. A bug may exist in both places and integration tests will give you more specificity than end-to-end tests.