Table of Contents [+/-]
- 4.1 Writing a Test Case: Quick Start
- 4.2 Test Case Coding Guidelines [+/-]
- 4.3 Sample Test Case
- 4.4 Cleaning Up from a Previous Test Run
- 4.5 Generating a Test Case Result File
- 4.6 Checking for Expected Errors
- 4.7 Controlling the Information Produced by a Test Case
- 4.8 Dealing with Output That Varies Per Test Run
- 4.9 Passing Options from mysql-test-run.pl to mysqld or mysqltest
- 4.10 Specifying Test Case-Specific Server Options
- 4.11 Specifying Test Case-Specific Bootstrap Options
- 4.12 Using Include Files to Simplify Test Cases
- 4.13 Controlling the Binary Log Format Used for Tests [+/-]
- 4.14 Writing Replication Tests
- 4.15 Thread Synchronization in Test Cases
- 4.16 Suppressing Errors and Warning
- 4.17 Stopping a Server During a Test
- 4.18 Other Tips for 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.
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.
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).