Run Different: Extending JUnit 4 with Custom Runners

David Saff (MIT)

Java · Short Talk

Thursday, 11:40, 10 minutes | Room 203/204 | Download in iCal Format

7
·
8
·
9
·
10
·
11
·
12
·
13
·
14
·
15
·
16
·
17
·
18
·
19

Custom Runners are the primary means of extending JUnit 4. A custom runner can do anything from adding an extra check to the end of each test method, to running tests written in a different test framework (like TestNG) or a different language (like Ruby, or a completely new domain-specific language). Custom runners automatically get tight integration with Eclipse, Ant, and other JUnit-4-aware development tools. In addition, custom runners can make use of JUnit's little-known test prioritization and filtering capabilities.

The talk will first demonstrate JUnit's built-in runners for parameterized data and unit theories (general statements evaluated against specific examples). It will then review custom runners written by third parties, including JMock's runner, the CPSuite runner for automatically finding JUnit test classes, and the JRSpecRunner for running RSpec tests written in Ruby.

Finally, audience members will learn the Custom Runner API as we write together a new custom runner that runs many JUnit tests in parallel threads.

David Saff is a Ph.D. student at the Massachusetts Institute of Technology, researching continuous testing, test factoring, and unit theories, all automated techniques to extend the bug-finding power of simple tests. David's previous research includes work on artificial intelligence, intuitive user interfaces, and computing with small distributed devices. Before joining MIT, David was a software engineer and project manager at Molecular, Inc. In addition to his research activities, David is a developer for the JUnit unit-testing framework, and has contributed to the testing capabilities in the Eclipse IDE.

Floor Plan

Gold sponsors

BEA logo

IBM logo

Wind River logo

Replay Solutions logo

JBoss logo

SOPERA logo

Cloudsmith logo

BIRT Exchange logo

Skyway Software logo

Oracle

BlackBerry logo

AMD logo

Silver sponsors

Sybase

Google

Genuitec

Instantiations

Teamprise

Telelogic

Innoopract

Business Objects

LynuxWorks logo

Hardware sponsor

AMD logo

Media sponsors

Extension Media

Methods and Tools

ACM

Addison-Wesley logo

SD Times logo

Open Systems Publishing

Software Test & Performance logo

SDForum

Be a Sponsor