kirancodes.me
To Proof Maintenance & Beyond!

SEGATE: Unveiling Semantic Inconsistencies between Code and Specification of String Inputs

Devika Sondhi, Rahul Purandare

Abstract

Automated testing techniques are often assessed on coverage based metrics. However, despite giving good coverage, the test cases may miss the gap between functional specification and the code implementation. This gap may be subtle in nature, arising due to the absence of logical checks, either in the implementation or in the specification, resulting in inconsistencies in the input definition. The inconsistencies may be prevalent especially for structured inputs, commonly specified using string-based data types. Our study on defects reported over popular libraries reveals that such gaps may not be limited to input validation checks. We propose a test generation technique for structured string inputs where we infer inconsistencies in input definition to expose semantic gaps in the method under test and the method specification. We assess this technique using our tool SEGATE, Semantic Gap Tester. SEGATE uses static analysis and automaton modeling to infer the gap and generate test cases. On our benchmark dataset, comprising of defects reported in 15 popular open-source libraries, written in Java, SEGATE was able to generate tests to expose 80% of the defects.

BibTeX
@inproceedings{Sondhi-Purandare:ASE19,
  author    = {Devika Sondhi and
               Rahul Purandare},
  title     = {{SEGATE:} Unveiling Semantic Inconsistencies between Code and Specification of String Inputs},
  booktitle = {ASE},
  pages     = {200--212},
  publisher = {{IEEE}},
  year      = {2019},
}

Related papers