当前位置: X-MOL 学术ACM Trans. Softw. Eng. Methodol. › 论文详情
Our official English website, www.x-mol.net, welcomes your feedback! (Note: you will need to create a separate account there.)
Handling SQL Databases in Automated System Test Generation
ACM Transactions on Software Engineering and Methodology ( IF 6.6 ) Pub Date : 2020-07-06 , DOI: 10.1145/3391533
Andrea Arcuri 1 , Juan P. Galeotti 2
Affiliation  

Automated system test generation for web/enterprise systems requires either a sequence of actions on a GUI (e.g., clicking on HTML links and form buttons) or direct HTTP calls when dealing with web services (e.g., REST and SOAP). When doing white-box testing of such systems, their code can be analyzed, and the same type of heuristics (e.g., the branch distance ) used in search-based unit testing can be employed to improve performance. However, web/enterprise systems do often interact with a database. To obtain higher coverage and find new faults, the state of the databases needs to be taken into account when generating white-box tests. In this work, we present a novel heuristic to enhance search-based software testing of web/enterprise systems, which takes into account the state of the accessed databases. Furthermore, we enable the generation of SQL data directly from the test cases. This is useful when it is too difficult or time consuming to generate the right sequence of events to put the database in the right state. Also, it is useful when dealing with databases that are “read-only” for the system under test, and the actual data are generated by other services. We implemented our technique as an extension of E VO M ASTER , where system tests are generated in the JUnit format. Experiments on six RESTful APIs (five open-source and one industrial) show that our novel techniques improve coverage significantly (up to +16.5%), finding seven new faults in those systems.

中文翻译:

在自动化系统测试生成中处理 SQL 数据库

网络/企业系统的自动系统测试生成需要在 GUI 上执行一系列操作(例如,单击 HTML 链接和表单按钮),或者在处理网络服务(例如,REST 和 SOAP)时直接调用 HTTP。做的时候白盒测试此类系统,可以分析它们的代码,并使用相同类型的启发式方法(例如,分支距离) 用于基于搜索的单元测试可用于提高性能。但是,Web/企业系统确实经常与数据库交互。为了获得更高的覆盖率并发现新的故障,在生成白盒测试时需要考虑数据库的状态。在这项工作中,我们提出了一种新颖的启发式方法来增强基于搜索的网络/企业系统软件测试,其中考虑了访问数据库的状态。此外,我们可以直接从测试用例生成 SQL 数据。当生成正确的事件序列以使数据库处于正确状态时太困难或太费时,这很有用。此外,在处理被测系统的“只读”数据库时,它也很有用,而实际数据是由其他服务生成的。VO阿斯特,其中系统测试以 JUnit 格式生成。对六个 RESTful API(五个开源和一个工业)的实验表明,我们的新技术显着提高了覆盖率(高达 +16.5%),在这些系统中发现了七个新故障。
更新日期:2020-07-06
down
wechat
bug