What's New in JUnit 4
Please turn off all
Unit Testing is Good for your Health
Benefits of Test Driven Development are Well Known
TDD does not require any particular framework
Enter JUnit 4
JUnit 4 in one slide
A Typical JUnit 3 Test Case
A JUnit 4 Test Case
Don't Have to Follow Naming Conventions
Don't Have to Extend TestCase
Static imports make this even nicer
Parameterized Test Cases
Skipping a Test
Initialization
@Before
Multiple @Before
Cleanup
@After
Class scope initialization and cleanup
Testing Exceptions
Ignoring Tests
Timeouts
Asserting Array Equality
Building and running JUnit 4
Compatible
Questions?
Implementation Details
Failures
TestListener
XMLTestListener Example
Runner
Using Runner to Drive a TestListener
What's Missing
To Learn More
Questions?
Entire Presentation as Single File
Start
|
Cafe con Leche
Copyright 2005 Elliotte Rusty Harold
Last Modified September 27, 2005