Repository logo
Log in(current)
Repository logoMIT Open ScholarshipDSpace@MIT
  1. Home
  2. Computer Science and Artificial Intelligence Lab (CSAIL)
  3. CSAIL Digital Archive
  4. CSAIL Technical Reports (July 1, 2003 - present)
  5. Automatic Test Factoring for Java

Automatic Test Factoring for Java

Thumbnail Image
Download
Name

MIT-CSAIL-TR-2005-042.ps

Size

20.42 MB

Format

PostScript

Checksum (MD5)

534c6a152292c56252fde36635a01855

Thumbnail Image
Download
Name

MIT-CSAIL-TR-2005-042.pdf

Size

762.11 KB

Format

Adobe PDF

Checksum (MD5)

d9b85b7d96f3bab2900f12866bdb0c10

Author(s)
Saff, David
•
Artzi, Shay
•
Perkins, Jeff H.
•
Ernst, Michael D.
Date Issued
June 8, 2005
Series/Report no.
Massachusetts Institute of Technology Computer Science and Artificial Intelligence Laboratory
Abstract
Test factoring creates fast, focused unit tests from slow system-widetests; each new unit test exercises only a subset of the functionalityexercised by the system test. Augmenting a test suite with factoredunit tests should catch errors earlier in a test run.One way to factor a test is to introduce 'mock' objects. If a testexercises 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 simulatesE's behavior in response. We introduce an automatic technique fortest factoring. Given a system test for T and E, and a record of T'sand E's behavior when the system test is run, test factoring generatesunit tests for T in which E is mocked. The factored tests can isolatebugs in T from bugs in E and, if E is slow or expensive, improve testperformance or cost.We have built an implementation of automatic dynamic test factoring for theJava language. Our experimental data indicates that it can reduce therunning time of a system test suite by up to an order of magnitude.
Persistent DSpace Link
http://hdl.handle.net/1721.1/30553
Repository logo
PrivacyPermissionsAccessibilityContact us
Repository logo
Notify us about copyright concerns.