Static test case prioritization using topic models

  • Authors:
  • Stephen W. Thomas;Hadi Hemmati;Ahmed E. Hassan;Dorothea Blostein

  • Affiliations:
  • School of Computing, Queen's University, Kingston, Canada;School of Computing, Queen's University, Kingston, Canada;School of Computing, Queen's University, Kingston, Canada;School of Computing, Queen's University, Kingston, Canada

  • Venue:
  • Empirical Software Engineering
  • Year:
  • 2014

Quantified Score

Hi-index 0.00

Visualization

Abstract

Software development teams use test suites to test changes to their source code. In many situations, the test suites are so large that executing every test for every source code change is infeasible, due to time and resource constraints. Development teams need to prioritize their test suite so that as many distinct faults as possible are detected early in the execution of the test suite. We consider the problem of static black-box test case prioritization (TCP), where test suites are prioritized without the availability of the source code of the system under test (SUT). We propose a new static black-box TCP technique that represents test cases using a previously unused data source in the test suite: the linguistic data of the test cases, i.e., their identifier names, comments, and string literals. Our technique applies a text analysis algorithm called topic modeling to the linguistic data to approximate the functionality of each test case, allowing our technique to give high priority to test cases that test different functionalities of the SUT. We compare our proposed technique with existing static black-box TCP techniques in a case study of multiple real-world open source systems: several versions of Apache Ant and Apache Derby. We find that our static black-box TCP technique outperforms existing static black-box TCP techniques, and has comparable or better performance than two existing execution-based TCP techniques. Static black-box TCP methods are widely applicable because the only input they require is the source code of the test cases themselves. This contrasts with other TCP techniques which require access to the SUT runtime behavior, to the SUT specification models, or to the SUT source code.