华东师范大学学报(自然科学版) ›› 2018, Vol. 2018 ›› Issue (2): 77-88.doi: 10.3969/j.issn.1000-5641.2018.02.008

• 计算机科学 • 上一篇    下一篇

Woodpecker:支持细粒度冲突模拟的数据库测试框架

李捷荧, 李宇明, 张小磊, 张蓉   

  1. 华东师范大学 数据科学与工程学院, 上海 200062
  • 收稿日期:2017-06-19 出版日期:2018-03-25 发布日期:2018-03-22
  • 通讯作者: 张蓉,女,教授,研究方向为数据库.E-mail:rzhang@sei.ecnu.edu.cn. E-mail:rzhang@sei.ecnu.edu.cn
  • 作者简介:李捷荧,男,硕士研究生,研究方向为分布式数据库.E-mail:jieyingli@hotmail.com.

Woodpecker: Fine-grained contention simulation database testing framework

LI Jie-ying, LI Yu-ming, ZHANG Xiao-lei, ZHANG Rong   

  1. School of Data Science and Engineering, East China Normal University, Shanghai 200062, China
  • Received:2017-06-19 Online:2018-03-25 Published:2018-03-22

摘要: 随着应用的丰富以及应用对性能的要求提升,各种形态的数据库开发业务应运而生,如行存、列存以及内存型等.因而数据库测试也变得越发重要.现有的数据库自动化测试框架在测试的灵活性、功能的全面性以及测试工作的细致性上都存在问题.首先,测试功能支持不够全面,无法同时支持功能测试、性能测试和数据库系统功能测试;其次,广泛使用的TPC-C基准测试在粗粒度仓库级别上模拟负载冲突,无法量化表示冲突,因此冲突模拟与实际预期误差较大;最后,测试案例的使用一般是静态的,无法动态地进行测试案例的组织和运行.对此,设计并实现了一个灵活的数据库自动化测试框架Woodpecker:提供一套语义丰富、易用、高效的测试任务描述语言,第一次实现上述3种测试任务混合运行的测试框架,并且首次支持量化的负载冲突模拟,包括读写冲突和写写冲突.实验部分以主键自增测试为例,展示了Woodpecker测试描述语言的优势,通过实验说明了Woodpecker对混合测试任务的支持,实验还展示了Woodpecker负载冲突细粒度模拟的正确性和可用性.

关键词: 数据库, 测试框架, 冲突模拟

Abstract: With the rich and the growing peformance requirement of applications, various database developments appear, such as row-based, column-based, main memory database and so on. Hence database testing becomes more and more important. Existing automated testing frameworks of database have some problems in flexibility of test, integrality of function and the granularity of test. Firstly they can't support functional test, performance test and DBMS functional test at the same time. Secondly popular benchmark TPC-C simulates workload contention by warehouse which can't quantify contention and maybe execution is different with expectation. Finally the use of test case is static, they can't organize and run test case dynamically. As a consequence this paper presents a flexible database testing framework which is called Woodpecker, its test task descriptive language has abundant primitives, easy-to-use and could write test case efficiently. Woodpecker is the first test framework that can mix three above-mentioned tests in one test case, and simulates workload contention in fine granularity which include read-write contention and write-write contention. We use a simple case in auto increment testing to show the descriptive language's advantage, last we verify the capacity of mixing three tests in Woodpecker, and besides, we show the results of workload contention simulation in performance test.

Key words: database, testing framework, contention simulation

中图分类号: