Mutation Analysis for Assessing End-to-End Web Tests
Rahulkrishna Yandrapally, Ali Mesbah · 2021
End-to-end UI testing plays a significant role in the regression testing of web apps, in order to validate end user functionality. Because of their importance, UI test suites are often created and maintained manually by employing browser automation tools such as selenium. However, currently, there exists no reliable method to ascertain the fault-finding capabilities for UI test suite of any given web app. Mutation testing, a well known fault-based testing technique for assessment of test suite adequacy, relies on generating mutants by making small changes to source code imitating programmer errors. However, mutation testing is difficult to employ for any given web app because of the heterogeneous nature of the multiple server-side and client-side components they can contain. In this work, we present MaewU, a mutation analysis framework for assessing web UI test suites, which is applicable to any web app as it mutates the dynamic DOM in the browser instead of the source code. We propose 16 mutation operators that mutate the behaviour and appearance of web elements to mimic the nine categories of web app faults found through an analysis of 250 bug reports. We evaluate our dynamic mutation analysis framework on six open source web apps. The results from our empirical evaluation demonstrate that MaewU is effective in assessing Web UI test suites in terms of adequacy and facilitates test suite quality improvements.