...
首页> 外文期刊>Software Quality Journal >Extending symbolic execution for automated testing of stored procedures
【24h】

Extending symbolic execution for automated testing of stored procedures

机译:扩展符号执行以实现存储过程的自动化测试

获取原文
获取原文并翻译 | 示例
           

摘要

Stored procedures in database management systems are often used to implement complex business logic. Correctness of these procedures is critical for flawless working of the system. However, testing them remains difficult due to many possible database states and constraints on data. This leads to mostly manual testing. Newer tools offer automated execution for unit testing of stored procedures but the test cases are still written manually. We propose an approach of using dynamic symbolic execution for generating automated test cases and corresponding database states for stored procedures. We model the constraints on data imposed by the schema and the SQL statements, treating values in database tables as symbolic. We use SMT solver to find values that will drive the stored procedure on a particular execution path. We instrument the internal execution plans generated by PostgreSQL to extract constraints. We use Z3 to generate test cases consisting of table data and procedure inputs. Our evaluation using stored procedures from a large business application and various GitHub repositories quantifies the evidence of effectiveness of our technique by generating test cases that lead to schema constraint violations and user-defined exceptions.
机译:数据库管理系统中的存储过程通常用于实现复杂的业务逻辑。这些程序的正确性对于系统的完美工作至关重要。但是,由于许多可能的数据库状态和数据约束,测试它们仍然困难。这导致主要是手动测试。较新的工具为存储过程的单元测试提供自动执行,但测试用例仍然手动编写。我们提出了一种利用动态符号执行来生成自动测试用例和相应数据库状态的方法来提出一种方法,以及用于存储过程的相应数据库状态。我们为架构和SQL语句施加的数据模拟了数据,将数据库表中的值视为符号。我们使用SMT求解器查找将在特定执行路径上驱动存储过程的值。我们介绍PostgreSQL生成的内部执行计划以提取约束。我们使用Z3来生成由表数据和过程输入组成的测试用例。我们使用来自大型业务应用程序和各种GitHub存储库的存储过程的评估量通过生成导致模式约束违规和用户定义的异常的测试用例来定量我们技术的有效性的证据。

著录项

相似文献

  • 外文文献
  • 中文文献
  • 专利
获取原文

客服邮箱:kefu@zhangqiaokeyan.com

京公网安备:11010802029741号 ICP备案号:京ICP备15016152号-6 六维联合信息科技 (北京) 有限公司©版权所有
  • 客服微信

  • 服务号