Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Features
Speaker Deck
PRO
Sign in
Sign up for free
Search
Search
A Gentle Introduction to Unit Testing with MXUnit
Search
Brian Klaas
April 27, 2010
Technology
0
72
A Gentle Introduction to Unit Testing with MXUnit
Presented to the Johns Hopkins Adobe User Group, April, 2010.
Brian Klaas
April 27, 2010
Tweet
Share
More Decks by Brian Klaas
See All by Brian Klaas
Start Using Amazon Web Services in Your ColdFusion Apps
brianklaas
0
65
Unleash Your Inner Spielberg When Flipping the Classroom
brianklaas
0
59
Promises, Promises: Unlocking the Power of jQuery's Deferreds
brianklaas
0
42
Making Your ColdFusion Apps Highly Available
brianklaas
0
170
Unleash Your Inner Spielberg When Creating Online Lectures: The Director's Cut
brianklaas
0
68
Making High-Performance Caching Easy with ColdFusion
brianklaas
1
88
Resources for Developers to Learn about Software Development
brianklaas
1
50
From Shakespeare to Spielberg: Using Techniques from Film and the Stage to Make Lectures More Engaging and Impactful
brianklaas
0
55
Unleash Your Inner Spielberg when Creating Online Lectures
brianklaas
0
68
Other Decks in Technology
See All in Technology
Where will it converge?
ibknadedeji
0
200
Vibe Coding Year in Review. From Karpathy to Real-World Agents by Niels Rolland, CEO Paatch
vcoisne
0
120
やる気のない自分との向き合い方/How to Deal with Your Unmotivated Self
sanogemaru
0
450
Escaping_the_Kraken_-_October_2025.pdf
mdalmijn
0
160
AIAgentの限界を超え、 現場を動かすWorkflowAgentの設計と実践
miyatakoji
1
160
KMP の Swift export
kokihirokawa
0
350
OpenAI gpt-oss ファインチューニング入門
kmotohas
2
1.1k
三菱電機・ソニーグループ共同の「Agile Japan企業内サテライト」_2025
sony
0
130
AWS 잘하는 개발자 되기 - AWS 시작하기: 클라우드 개념부터 IAM까지
kimjaewook
0
120
生成AIとM5Stack / M5 Japan Tour 2025 Autumn 東京
you
PRO
0
240
AWS IoT 超入門 2025
hattori
0
290
社内報はAIにやらせよう / Let AI handle the company newsletter
saka2jp
8
1.3k
Featured
See All Featured
10 Git Anti Patterns You Should be Aware of
lemiorhan
PRO
657
61k
The Cult of Friendly URLs
andyhume
79
6.6k
The Power of CSS Pseudo Elements
geoffreycrofte
79
6k
No one is an island. Learnings from fostering a developers community.
thoeni
21
3.5k
A designer walks into a library…
pauljervisheath
209
24k
A Tale of Four Properties
chriscoyier
160
23k
Producing Creativity
orderedlist
PRO
347
40k
Raft: Consensus for Rubyists
vanstee
139
7.1k
Dealing with People You Can't Stand - Big Design 2015
cassininazir
367
27k
How To Stay Up To Date on Web Technology
chriscoyier
791
250k
Why You Should Never Use an ORM
jnunemaker
PRO
59
9.6k
Rails Girls Zürich Keynote
gr2m
95
14k
Transcript
( ) Unit Testing with MXUnit
( ) (A really gentle introduction)
) (
) (
) ( Prove to me that it works
( ) Unit vs. Integration Testing ⊛ Small units vs.
sequences ⊛ MXUnit vs. Selenium
) (
( ) ⊛ Write test code that fails ⊛ Make
the test work ⊛ Refactor/refine
( ) MXUnit http://www.mxunit.org/
( ) MXUnit Test Runner for Eclipse
( ) The Basics ⊛ Write a test shell ⊛
Write the code to make it work ⊛ Verify that it works ⊛ Repeat
( ) The Reality ⊛ Write the code ⊛ Write
the test ⊛ Make sure it works ⊛ This is not TDD!
( ) Assertions ⊛ assertEquals(expected,result) ⊛ assertNotSame(expected,result) ⊛ assertSame(expected,result) ⊛
assertFalse(someVariable or function result) ⊛ assertTrue(someVariable or function result) ⊛ assertXPath(String xpath, any data, [String text], [String message]) ⊛ assertIsTypeOf(component obj, String type) ⊛ assertIsXMLDoc(any xml) ⊛ assertIsArray(any obj1) ⊛ assertIsDefined(any obj1)
( ) Example ⊛ You’ve written a function. Now test
it.
( ) How to Test ⊛ Test one thing per
test ⊛ Write tests for every possible scenario ⊛ Test for success and failure
( ) How to Test ⊛ Test in isolation ⊛
setup()/teardown() ⊛ Mocking dependencies ⊛ injectMethod ⊛ injectProperty
( ) How to Test Databases ⊛ <cftransaction action=”rollback” />
( ) Debugging ⊛ <cfdump>/<cfoutput> ⊛ request.debug( ) method in
tests ⊛ “Open test case results in browser”
( ) Great Tutorial on TDD with MXUnit http://www.adobe.com/devnet/coldfusion/ articles/testdriven_coldfusion_pt1.html