E-mail senden E-Mail Adresse kopieren
2021-02-22

Probabilistic Grammar-based Test Generation.

Zusammenfassung

Given a program that has been tested on some sample input(s), what does one test next? To further test the program, one needs to construct inputs that cover (new) input features, in a manner that is different from the initial samples. This talk presents an approach that learns from past test inputs to generate new but different inputs. To achieve this, we present an approach called inputs from hell which employs probabilistic context-free grammars to learn the distribution of input elements from sample inputs. In this work, we employ probabilistic grammars as input parsers and producers. Applying probabilistic grammars as input parsers, we learn the statistical distribution of input features in sample inputs. As a producer, probabilistic grammars ensure that generated inputs are syntactically correct by construction, and it controls the distribution of input elements by assigning probabilities to individual production rules. Thus, we create inputs that are dissimilar to the sample by inverting learned probabilities. In addition, we generate failure-inducing inputs by learning from inputs that caused failures in the past, this gives us inputs that share similar features and thus also have a high chance of triggering bugs. This approach is useful for bug reproduction and testing for patch completeness.

Konferenzbeitrag

Software Engineering (SE)

Veröffentlichungsdatum

2021-02-22

Letztes Änderungsdatum

2024-05-16