期刊文献+

SQL测试用例集的自动生成 被引量:3

AUTOMATIC GENERATION OF SQL TEST CASE SETS
下载PDF
导出
摘要 编写SQL语句是测试数据库管理系统的一个重要部分。自动生成SQL语句可以有效减少测试人员的工作量,而目前没有直接生成SQL语句的自动化工具。通过模拟产生式的直接推导过程,根据SQL文法,给出生成符合该文法的SQL语句,用作测试用例的方法;研究从表示文法的BNF文件生成SQL测试用例集合的自动化过程。这个过程包括几个阶段:将SQL文法的每一个非终结符转换成一个对应的解析函数,所有解析函数的集合构成规则库;遍历文法的产生式自动生成SQL测试用例;使用权值数组结合随机数,加大生成测试用例的灵活性;使用非终结符的最大调用次数来终止SQL测试用例的生成。通过介绍的工具原型,可以得到符合SQL语法的SQL测试用例。 Compiling SQL sentences is an import part for test database management system. Automatic generation of SQL sentences can effectively reduce the workload of the tester. There is almost no automatic tool supporting the direct generation of SQL sentences at present. By simulating the direct derivation process of generative formals the SQL sentences which are generated in accordance with the grammar based on SQL grammars are presented, this is used as, the approach for test cases. In the paper we study on the automatic progress from BNF files which are the representation of the grammar to generating SQL test case sets. The process has several stages: Each non-terminals of SQL grammar is converted to a corresponding parse function and the set of all these parse functions forms the rules library. The generative formals of the grammar are traversed to generate SQL test cases automatically. The use of weight arrays in conjunction with stochastic numbers increases the flexibility of test cases generation. Maximum calling times of the non-terminals are employed to terminate the generation of SQL test cases. Through the tool prototype introduced, the SQL test cases in conformity with SQL grammar can be derived.
出处 《计算机应用与软件》 CSCD 北大核心 2012年第8期185-189,199,共6页 Computer Applications and Software
关键词 SQL测试用例集 测试用例自动生成 权值数组 最大循环次数 SQL test case set Automated test case generation Weight arrays Max loop times
  • 相关文献

参考文献13

  • 1Hoffmana D, Wanga H Y, Changa M, et al. Two case studies in gram- mar-based test generation[J]. The Journal of Systems and Software, 2010:2369 - 2378.
  • 2Sirer E, Bershad B. Using production grammars in software testing[ C ]// Proc. 2nd Conference on Domain-specific Languages. ACM Press, 1999:1 -13.
  • 3Sobotkiewicz L. A new tool for grammar-based test case generation[ D]. University of Victoria,2008.
  • 4Hoffman D, Wang H, Chang M, et al. Grammar based testing of HTML injection vulnerabilities in RSS feeds [ C ]//Proc. TAIC-PART 2009 IEEE Computer Society ,2009 : 105 - 110.
  • 5Hoffman D, Sobotkiewicz L, Wang H, et al. Test generation with context free grammars and covering arrays[ C ]//Proc. TAICPART 2009 IEEE Computer Society, 2009:43 - 47.
  • 6Tai K, Lie Y. A test generation strategy for pair wise testing [ J ]. IEEE Trans. Softw. Eng,2002,28 ( 1 ) : 109 - 111.
  • 7Bird D L, Munoz C U. Automatic generation of random self-checking test cases[ J]. IBM Systems Journal, 1983,22 ( 3 ) :229 - 245.
  • 8Knuth D. Semantics of context-free languages [ J ]. Mathematical Sys- tems Theory,1968,2:127 - 145. Corrections in 1971,5:95 -96.
  • 9Maurer P. Generating test data with enhanced context-free grammars [J]. IEEE Software,1990,7(4) :50 -56.
  • 10BansalA.Lex与Yacc介绍[M].[2011-3-18].http://www.ibm.com/developerworks/cn/linux/sdk/lex/index.html.

共引文献5

同被引文献18

引证文献3

二级引证文献6

相关作者

内容加载中请稍等...

相关机构

内容加载中请稍等...

相关主题

内容加载中请稍等...

浏览历史

内容加载中请稍等...
;
使用帮助 返回顶部