Using-Rule-Mining-for-Automatic-Test-Oracle-Generation
Software testing is essential, but also one of the costliest and time-consuming activities in the software development process. However, software testing has historically been a task that has been recognised to be time-consuming and tedious as well as expensive, given the size and complexity of large-scale software systems. Such cost and time involved in testing can be managed through test automation. Software testing, automated or not, has four major steps: tests suite generation, predicting the outcomes of the tests, execute the SUT with the suite tests to obtain the actual outcome and compare the predicted outcome against the actual outcome to obtain a verdict (pass/fail). There are two significant challenges in the testing process: find successful test inputs, i.e., such inputs that can reveal faults in SUT, and determine what should be the output of a system after the execution of the test cases. The second challenge refers to one of the most significant problems in software testing automation, i.e., the test oracle problem. In this research, we developed a methodology to generate tests oracles using the state information of the System Under Test (SUT) during the execution of the tests. We derive our approach in the form of rules using the Association Rule Mining (ARM) technique. ARM attempt to find relationships or associations between categorical variables in large transactional data sets. Therefore, we wanted to investigate the potential of ARM to model SUT state. In particular, we were interested in understanding whether the information provided by the resulting model can help to verify the correct operation of the SUT new versions. We focus at a level of software testing called unit testing, which tests each unit or component of the SUT separately. Furthermore, this research uses the Stack Class of the Java Collection framework as SUT. The rule mining approach can detect that something is wrong; this is when a rule is violated. Then, by analysing the rules violated, it is possible to localise the fault. However, in terms of time-consuming, the rule mining approach takes much time, in particular when the number of rules is high, for instance. We provide an analysis of different performance metrics and discuss the results obtained.