-
Notifications
You must be signed in to change notification settings - Fork 105
Testing: Debugging Common Test Problems
Debugging tests can be difficult. This page shows some common problems and tips on how to fix them.
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';
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.
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.