mtr Writing Test Cases

Table of Contents

  • Writing a Test Case: Quick Start
  • Test Case Coding Guidelines
  • Sample Test Case
  • Cleaning Up from a Previous Test Run
  • Generating a Test Case Result File
  • Checking for Expected Errors
  • Controlling the Information Produced by a Test - Case
  • Dealing with Output That Varies Per Test Run
  • Passing Options from mysql-test-run.pl to - mysqld or mysqltest
  • Specifying Test Case-Specific Server Options
  • Specifying Test Case-Specific Bootstrap Options
  • Specifying Test Case-Specific Client Options
  • Using Include Files to Simplify Test Cases
  • Controlling the Binary Log Format Used for - Tests
  • Writing Replication Tests
  • Thread Synchronization in Test Cases
  • Suppressing Errors and Warning
  • Stopping and Restarting a Server During a Test
  • 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.
通常,您在开发过程中运行测试套件,以确保您的更改不会导致现有的测试用例中断。您还可以编写新的测试用例,或者向现有用例添加测试。当你修复了一个bug(这样bug就不会在没有被发现的情况下重新出现)或者当你向服务器或其他MySQL程序添加新功能时,就会发生这种情况。

This chapter provides guidelines for developing new test cases for the MySQL test framework.
本章提供了为MySQL测试框架开发新的测试用例的指导方针。

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.
    一个“命令”是一个输入测试,mysqltest能够识别并执行它自己。一个“语句”是一个SQL语句或查询,mysqltest发送到MySQL服务器执行。

你可能感兴趣的:(mtr Writing Test Cases)