检索规则说明:AND代表“并且”;OR代表“或者”;NOT代表“不包含”;(注意必须大写,运算符两边需空一格)
检 索 范 例 :范例一: (K=图书馆学 OR K=情报学) AND A=范并思 范例二:J=计算机应用与软件 AND (U=C++ OR U=Basic) NOT M=Visual
机构地区:[1]东华大学计算机科学与技术学院,上海201620 [2]达梦数据库(上海)有限公司,上海200051
出 处:《计算机应用与软件》2012年第8期185-189,199,共6页Computer Applications and Software
摘 要:编写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.
关 键 词:SQL测试用例集 测试用例自动生成 权值数组 最大循环次数
分 类 号:TP399[自动化与计算机技术—计算机应用技术]
正在载入数据...
正在载入数据...
正在载入数据...
正在载入数据...
正在载入数据...
正在载入数据...
正在载入数据...
正在链接到云南高校图书馆文献保障联盟下载...
云南高校图书馆联盟文献共享服务平台 版权所有©
您的IP:3.138.119.75