BlueCov:用JBMC集成测试覆盖和模型检验
BlueCov: Integrating Test Coverage and Model Checking with JBMC
摘要:
自动化测试用例生成工具帮助企业编写测试,并在进行代码更改时增加高回归测试覆盖率所提供的安全网。测试生成需要覆盖尽可能多的未覆盖代码,同时避免为现有测试套件已经覆盖的代码生成冗余测试。在本文中,我们提出了我们的工作在现实世界中的应用集成形式分析与自动测试用例生成的工具。测试用例的生成是基于使用Java有界模型检查器(JBMC)的覆盖率分析。模型检查器的反例可以转换为具有特定参数的Java方法调用。为了避免生成冗余测试,有必要以与JBMC生成其覆盖目标完全相同的方式测量覆盖率。每个现有的覆盖测量工具使用稍微不同的仪器,因此使用不同的覆盖标准。这使得与基于形式分析的测试用例生成器的集成变得困难。因此,我们开发了BlueCov作为一个特定的运行时覆盖率测量工具,它使用与JBMC完全相同的覆盖率标准。这种方法还允许增量测试用例生成,仅为先前未测试的代码生成测试覆盖率,例如,以完成现有的测试套件。
英文摘要:
Automated test case generation tools help businesses to write tests and increase the safety net provided by high regression test coverage when making code changes. Test generation needs to cover as much as possible of the uncovered code while avoiding generating redundant tests for code that is already covered by an existing test-suite. In this paper we present our work on a tool for the real world application of integrating formal analysis with automatic test case generation. The test case generation is based on coverage analysis using the Java bounded model checker (JBMC). Counterexamples of the model checker can be translated into Java method calls with specific parameters. In order to avoid the generation of redundant tests, it is necessary to measure the coverage in the exact same way as JBMC generates its coverage goals. Each existing coverage measurement tool uses a slightly different instrumentation and thus a different coverage criterion. This makes integration with a test case generator based on formal analysis difficult. Therefore, we developed BlueCov as a specific runtime coverage measurement tool which uses the exact same coverage criteria as JBMC does. This approach also allows for incremental test-case generation, only generating test coverage for previously untested code, e.g., to complete existing test suites.
机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。