“Atrina: Inferring Unit Oracles From GUI Test Cases”, Shabnam Mirshokraie, Ali Mesbah, and Karthik Pattabiraman.
In Proceedings of the International Conference on Software Testing, Verification, and Validation (ICST), 11 pages, 2016
[PDF

Abstract

Testing JavaScript web applications is challenging due to its complex runtime interaction with the Document Object Model (DOM). Writing unit-level assertions for JavaScript applications is even more tedious as the tester needs to precisely understand the interaction between the DOM and the JavaScript code, which is responsible for updating the DOM. In this work, we propose to leverage existing DOM-dependent assertions in a human-written UI-based test cases as well as useful execution information inferred from the UI-based test suite to automatically generate assertions used for unit-level testing of the JavaScript code of the application. Our approach is implemented in a tool called ATRINA. We evaluate our approach to assess its effectiveness. The results indicate that ATRINA maps DOM-based assertions to the corresponding JavaScript code with high accuracy (99% precision, 92% recall). In terms of fault finding capability, the assertions generated by ATRINA outperform human-written DOM-based assertions by 31% on average. It also surpasses the state-of-the-art mutation-based assertion generation technique by 26% on average in detecting faults.

BibTeX

@inproceedings{icst16,
  author = {Mirshokraie, Shabnam and Mesbah, Ali and Pattabiraman, Karthik},
  title = {Atrina: Inferring Unit Oracles from {GUI} Test Cases},
  booktitle = {Proceedings of the International Conference on Software Testing, Verification, and Validation (ICST)},
  publisher = {IEEE Computer Society},
  pages = {11 pages},
  year = {2016},
  url = {http://salt.ece.ubc.ca/publications/docs/icst16.pdf}
}