Testing large software packages can become very time intensive. To address this problem, researchers have investigated techniques such as Test Suite Minimization. Test Suite Minimization reduces the number of tests in a suite by removing tests that appear redundant, at the risk of a reduction in fault-finding ability since it can be difficult to identify which tests are truly redundant. We take a completely different approach to solving the same problem of long running test suites by instead reducing the time needed to execute each test, an approach that we call Unit Test Virtualization. With Unit Test Virtualization, we reduce the overhead of isolating each unit test with a lightweight virtualization container. We describe the empirical analysis that grounds our approach and provide an implementation of Unit Test Virtualization targeting Java applications. We evaluated our implementation, VmVm, using 20 real-world Java applications and found that it reduces test suite execution time by up to 97% (on average, 62%) when compared to traditional unit test execution. We also compared VmVm to a well known Test Suite Minimization technique, finding the reduction provided by VmVm to be four times greater, while still executing every test with no loss of fault-finding ability.
The tool VMVM REF uses test virtualization to isolate unit tests of a JUnit suite, by resetting the static state of the application to its default before each test execution.
Unit test virtualization with VMVM
ICSE 2014
Computer Science