Test2Vec: An Execution Trace Embedding for Behaviour Coverage Analysis of Test Cases
Date
2021-01-22
Authors
Journal Title
Journal ISSN
Volume Title
Publisher
Abstract
In software testing, test adequacy metrics are mostly based on the source code and ignore the dynamic behavior of the program. In this thesis, we demonstrate that code coverage metrics are not able to distinguish between a Failed and Passed behavior in most cases. Neural program embeddings have shown much promise recently for a variety of program analysis tasks. We propose a new embedding approach called Test2Vec with an attention layer for test representation in order to capture behavioral patterns of test cases. We used test execution traces including the input values as the training dataset and evaluated our approach on 93 real faulty versions of 4 open source Java projects. Our results show that Test2Vec can rank the failing test in the top 5, 10, and 20 tests, on average, 20.43%, 32.26%, and 44.09% of the times, while branch coverage and statement coverage can only distinguish the failing tests in 13% and 16% of cases, respectively.
Description
Keywords
Software Engineering, Software Testing, Machine Learning, Behaviour Analysis, Test Adequacy, Software Analysis
Citation
Zangeneh, S. (2021). Test2Vec: An Execution Trace Embedding for Behaviour Coverage Analysis of Test Cases (Master's thesis, University of Calgary, Calgary, Canada). Retrieved from https://prism.ucalgary.ca.