Documentation Home
The MySQL Test Framework, Version 2.0
Download this Manual
PDF (US Ltr) - 0.5Mb
PDF (A4) - 0.5Mb
EPUB - 130.6Kb


The MySQL Test Framework, Version 2.0  /  Writing Test Cases

Chapter 4 Writing Test Cases

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.

Note

All test cases added to the MySQL source repository are published on the Internet. Take care that their contents include no confidential information, or copyrighted third-party material with a licence that would not allow this.

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.