Documentation Home
MySQL Internals Manual

MySQL Internals Manual  /  How to Create Good Test Cases

Chapter 26 How to Create Good Test Cases

There are a lot of strict rules and rules of thumb which may increase the quality of tests written for the tool pair mysqltest/ (MTR). The following presentation should give you some hints.

  • This document should not replace reading our documentation about testing. See the Writing Test Cases section of the MySQL Server Doxygen documentation, available at

  • Some of the examples might not work

    • with MTR1 or

    • on some operating system.

  • MTR2 means the second version of MTR2 replaced MTR1 ~ Jan 2009 in MySQL 5.1 and 6.0.

  • The term "protocol" means in most cases "output from a test case."

October 2007 - Matthias Leich - Create this document for a MySQL University session

March 2009 - Matthias Leich - Updates and corrections, add "Examples of suspicious scripts"

March 2009 - Patrick Crews - Corrections, add "Notes on MTR"