MySQL 8.0.40
Source Code Documentation
Writing Test Cases

Table of Contents

Normally, you run the test suite during the development process to ensure that your changes do not cause existing test cases to break. You can also write new test cases or add tests to existing cases. This happens when you fix a bug (so that the bug cannot reappear later without being detected) or when you add new capabilities to the server or other MySQL programs.

This chapter provides guidelines for developing new test cases for the MySQL test framework.

Some definitions:

  • One “test file” is one “test case”.
  • One “test case” might contain a “test sequence” (that is, a number of individual tests that are grouped together in the same test file).
  • A “command” is an input test that mysqltest recognizes and executes itself. A “statement” is an SQL statement or query that mysqltest sends to the MySQL server to be executed.