EngineIndependentTestSuite

Contents

[edit] Storage Engine Independent Testing

[edit] Functional Tests

Creating the functional tests that verify the correct operation of the storage engine occupies the bulk of this project due to the sheer number of individual features that need to be tested. Maximum automation is key and for the purpose, a setup will be created that tests a single feature and this setup will be perfected before it is being used to test all features.

[edit] Testing a single feature

[edit] Basic Tests

[edit] Availability

Test covering the above basic functionality are part of the tests included with the MySQL server.
Tests are located in the 'mysql-test' directory and can be executed using the 'mysql-test-run.pl' script.

perl ./mysql-test-run.pl --suite=engines/funcs --mysqld=--default-storage-engine=<engine>

For more details see the README file located in 'mysql-test/suite/engines'

[edit] Enhanced Tests

[edit] Scope of testing for Insert, Select, Delete, Update

The functional test suite should cover at least the following:

[edit] INSERT detail


[edit] Test setup

[edit] Availability

Test covering the above insert/update/delete/ functionality are part of the tests included with the MySQL server.
Tests are located in the 'mysql-test' directory and can be executed using the 'mysql-test-run.pl' script.

perl ./mysql-test-run.pl --suite=engines/iuds --mysqld=--default-storage-engine=<engine>

For more details see the README file located in 'mysql-test/suite/engines'


[edit] Test outcome verification


[edit] Table access methods to be tested

[edit] Notes
[edit] Access Patterns
[edit] Single-table access patterns
[edit] Join access patterns
 This is probably the most common pattern seen in join execution. ref access
 means chaotic index lookups all over the table. There are two variants -
 "Using index" and full scan. eq_ref access has slightly different pattern.
 This is repeated alteration between range/index_merge access and full
 table/index scan. It is used when there's a join like this:


[edit] Managing legitimate differences between storage engines using 'mysql-test-run.pl'

Since each storage engine is different both in its capabilities and its behavior, the test framework must manage those differences.

[edit] Option #1. Maintain a single .test and .result files for all engines.

For each storage engine, we maintain a list of capabilities that this storage engine has. Any test that exercises capabilities a storage engine does not have will be skipped automatically.

This allows for a single .test and .result file for all storage engines. It however has the following drawbacks:

Each storage engine declares its capabilities when it loads into the server, so we can use the list of capabilities in handler.h as a starting point when creating our tests.

[edit] Option #2. Maintain separate .test and .result files for each storage engine in a separate test suite.

The .test files will be generated from a template, and the .result files will be generated to match the behavior of the engine.

Any issues with the engine will be worked out by editing the files in the engine-specific test suite, without affecting other storage engines. The downside of this approach will be the proliferation of .test and .result files that need to be reviewed manually for each engine.


[edit] Transactional Tests

Functional tests are needed to test the transactional behavior and ACID properties of the storage engines. They should implement the following:

Note:

  • Tests covering Repeatable Reads are part of the tests included with the MySQL server.
  • Tests are located in the 'mysql-test/suite/engines/trx' directory and can be executed using the :'run_stress_rr.pl' script.
  • The test is can be run against any transactional engine. However scripts need to be modified in order to support such engines (current scripts support only InnoDB).
  • To modify the script for the transactional engine of your choice, follow the instructions listed in the README file located in 'mysql-test/suite/engines' under the rr_trx' section.


[edit] Stress Tests

Those will attempt to verify the operation of the storage engine under load



[edit] Using the existing test suite

It is possible to run the existing test suite as-is against a new engine. This will produce a massive ammount of false positives, whose investigation will take time. Usually crashes and suspicious error messages will show up first, while bad-data bugs will require more investigation.

Once the first pass has been complete, all tests that fail due to legitimate reasons can be complied for the new engine and any failures are likely regressions.

[edit] Benchmarks

The emphasis here will be on benchmarks that can be targeted against a new storage engine out of the box, without major modifications:

[edit] MySQL Bench

This benchmark tests the speed of primitive SQL operations. An interface is provided to do comparisons between storage engines and server versions

[edit] Sysbench

This is a simple transactional or non-transactional OLTP benchmark. A framework is available to store historical performance data. sysbench

[edit] DBT*/TPC-* benchmarks

Those benchmarks are generally difficult to run against a new storage engine. It takes time to set them up and a lot of effort to investigate all the issues that come up. So, running those benchmarks will be deferred until:

This arrangement achieves the following benefits:

Retrieved from "http://forge.mysql.com/wiki/EngineIndependentTestSuite"

This page has been accessed 2,279 times. This page was last modified 21:49, 24 January 2011.

Find

Browse
MySQLForge
Main Page
Current events
Recent changes
Random page
Help
Edit
Edit this page
Editing help
This page
Discuss this page
Post a comment
Printable version
Context
Page history
What links here
Related changes
My pages
Special pages
New pages
File list
Statistics
Bug reports
More...