Checking inside the black box: Regression testing by comparing value spectra

Tao Xie, David Notkin

Research output: Contribution to journalArticlepeer-review


Comparing behaviors of program versions has become an important task in software maintenance and regression testing. Black-box program outputs have been used to characterize program behaviors and they are compared over program versions in traditional regression testing. Program spectra have recently been proposed to characterize a program's behavior inside the black box. Comparing program spectra of program versions offers insights into the internal behavioral differences between versions. In this paper, we present a now class of program spectra, value spectra, that enriches the existing program spectra family. We compare the value spectra of a program's old version and new version to detect internal behavioral deviations in the new version. We use a deviation-propagation call tree to present the deviation details. Based on the deviation-propagation call tree, we propose two heuristics to locate deviation roots, which are program locations that trigger the behavioral deviations. We also use path spectra (previously proposed program spectra) to approximate the program states in value spectra. We then similarly compare path spectra to detect behavioral deviations and locate deviation roots in the new version. We have conducted an experiment on eight C programs to evaluate our spectra-comparison approach. The results show that both value-spectra-comparison and path-spectra-comparison approaches can effectively expose program behavioral differences between program versions even when their program outputs are the same, and our value-spectra-comparison approach reports deviation roots with high accuracy for most programs.

Original languageEnglish (US)
Pages (from-to)869-883
Number of pages15
JournalIEEE Transactions on Software Engineering
Issue number10
StatePublished - Oct 2005
Externally publishedYes


  • Empirical studies
  • Program spectra
  • Regression testing
  • Software maintenance
  • Software testing

ASJC Scopus subject areas

  • Software


Dive into the research topics of 'Checking inside the black box: Regression testing by comparing value spectra'. Together they form a unique fingerprint.

Cite this