Call Me Maybe: Using NLP to Automatically Generate Unit Test Cases Respecting Temporal Constraints
Arianna Blasi, Alessandra Gorla, Michael D. Ernst, Mauro Pezzè
Abstract
A class may need to obey temporal constraints in order to function correctly. For example, the correct usage protocol for an iterator is to always check whether there is a next element before asking for it; iterating over a collection when there are no items left leads to a NoSuchElementException. Automatic test case generation tools such as Randoop and EvoSuite do not have any notion of these temporal constraints. Generating test cases by randomly invoking methods on a new instance of the class under test may raise run time exceptions that do not necessarily expose software faults, but are rather a consequence of violations of temporal properties.
Topics & Concepts
Computer scienceClass (philosophy)Test (biology)Artificial intelligenceProgramming languageProtocol (science)Test caseNatural language processingUnit testingFunction (biology)SoftwareMachine learningPathologyAlternative medicineBiologyPaleontologyMedicineRegression analysisEvolutionary biologySoftware Testing and Debugging TechniquesSoftware Engineering ResearchSoftware Reliability and Analysis Research