[squeak-dev] automatic test factoring

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

[squeak-dev] automatic test factoring

Sophie424
Just came across something that would probably be very useful and probably
quite doable in Squeak (for someone a lot smarter than I e.g. someone who
knew how to inject tracing :-), from
http://www.nepls.org/Events/17/abstracts.html.
One way to factor a test is to introduce mock objects. If a test
exercises a component T, which interacts with another component E (the
``environment''), the implementation of E can be replaced by a
mock. The mock checks that T's calls to E are as expected, and it
simulates E's behavior in response. We introduce an automatic
technique for test factoring. Given a system test for T and E, and a
record of T's and E's behavior when the system test is run, test
factoring generates unit tests for T in which E is mocked. The
factored tests can isolate bugs in T from bugs in E and, if E is slow
or expensive, improve test performance or cost. Our implementation of
automatic dynamic test factoring for the Java
language reduces the running time of a system test suite by up to an
order of magnitude.- Sophie