Regression testing is an integral part of the continuous integration (CI) environment that gets executed as part of the CI cycle to ensure software system stability. It involves test case selection and prioritization steps that are required to meet the resource and time constraints within a CI cycle. This paper introduces dynamic test case prioritization and selection (DTPS), a novel test case selection and prioritization approach that performs effectively in a CI environment and minimizes regression time, hence providing early developer feedback to failed test cases. Reinforcement learning is used by DTPS to prioritize test cases based on their previous execution, i.e., historical runs, incorporating the latest acquired knowledge about failed test cases as the test cases are executed through a verdict-based reward function. Test volatility is also accounted for by DTPS in the CI context, where tests can be added/removed over CI cycles. Finally, DTPS is compared to the state-of-the-art reinforced test case selection (RETECS) method and two heuristic methods, over a recently published industrial dataset—Westermo ( https://github.com/westermo/test-results-dataset )—to demonstrate its practical efficacy in a CI environment. The results show that DTPS outperforms RETECS, with a comparatively close schedule when compared to heuristic approaches after the initial exploration phase.

错误:搜索内容不能为空,请输入英文关键词
错误:关键词超出字数限制,请精简
高级检索

Dynamic Test Case Prioritization and Selection for Continuous Integration Using Reinforcement Learning

  • Saad Waseem,
  • Aicha Moussaid,
  • Ricardo Chavez Tapia,
  • S. M. Zahid Hasan,
  • Iván Porres Paltor,
  • Sebastien Lafond

摘要

Regression testing is an integral part of the continuous integration (CI) environment that gets executed as part of the CI cycle to ensure software system stability. It involves test case selection and prioritization steps that are required to meet the resource and time constraints within a CI cycle. This paper introduces dynamic test case prioritization and selection (DTPS), a novel test case selection and prioritization approach that performs effectively in a CI environment and minimizes regression time, hence providing early developer feedback to failed test cases. Reinforcement learning is used by DTPS to prioritize test cases based on their previous execution, i.e., historical runs, incorporating the latest acquired knowledge about failed test cases as the test cases are executed through a verdict-based reward function. Test volatility is also accounted for by DTPS in the CI context, where tests can be added/removed over CI cycles. Finally, DTPS is compared to the state-of-the-art reinforced test case selection (RETECS) method and two heuristic methods, over a recently published industrial dataset—Westermo ( https://github.com/westermo/test-results-dataset )—to demonstrate its practical efficacy in a CI environment. The results show that DTPS outperforms RETECS, with a comparatively close schedule when compared to heuristic approaches after the initial exploration phase.