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
75
0
Share
A Gentle Introduction to Unit Testing with MXUnit
Presented to the Johns Hopkins Adobe User Group, April, 2010.
Brian Klaas
April 27, 2010
More Decks by Brian Klaas
See All by Brian Klaas
Start Using Amazon Web Services in Your ColdFusion Apps
brianklaas
0
66
Unleash Your Inner Spielberg When Flipping the Classroom
brianklaas
0
63
Promises, Promises: Unlocking the Power of jQuery's Deferreds
brianklaas
0
46
Making Your ColdFusion Apps Highly Available
brianklaas
0
180
Unleash Your Inner Spielberg When Creating Online Lectures: The Director's Cut
brianklaas
0
73
Making High-Performance Caching Easy with ColdFusion
brianklaas
1
92
Resources for Developers to Learn about Software Development
brianklaas
1
54
From Shakespeare to Spielberg: Using Techniques from Film and the Stage to Make Lectures More Engaging and Impactful
brianklaas
0
57
Unleash Your Inner Spielberg when Creating Online Lectures
brianklaas
0
73
Other Decks in Technology
See All in Technology
MIX AUDIO EN BROADCAST
ralpherick
0
140
JAWS DAYS 2026でAIの「もやっと」感が解消された話
smt7174
1
120
FlutterでPiP再生を実装した話
s9a17
0
240
Oracle AI Database@Azure:サービス概要のご紹介
oracle4engineer
PRO
5
1.3k
タスク管理も1on1も、もう「管理」じゃない - KiroとBedrock AgentCoreで変わった“判断の仕事”
yusukeshimizu
0
160
トイルを超えたCREは何屋になるのか
bengo4com
0
120
ThetaOS - A Mythical Machine comes Alive
aslander
0
230
OPENLOGI Company Profile for engineer
hr01
1
62k
【AWS】CloudTrail LakeとCloudWatch Logs Insightsの使い分け方針
tsurunosd
0
130
Network Firewall Proxyで 自前プロキシを消し去ることができるのか
gusandayo
0
160
Kubernetesの「隠れメモリ消費」によるNode共倒れと、Request適正化という処方箋
g0xu
0
170
フルカイテン株式会社 エンジニア向け採用資料
fullkaiten
0
11k
Featured
See All Featured
A designer walks into a library…
pauljervisheath
211
24k
Mozcon NYC 2025: Stop Losing SEO Traffic
samtorres
0
190
Reflections from 52 weeks, 52 projects
jeffersonlam
356
21k
From Legacy to Launchpad: Building Startup-Ready Communities
dugsong
0
190
The Organizational Zoo: Understanding Human Behavior Agility Through Metaphoric Constructive Conversations (based on the works of Arthur Shelley, Ph.D)
kimpetersen
PRO
0
290
Designing for Timeless Needs
cassininazir
0
180
What Being in a Rock Band Can Teach Us About Real World SEO
427marketing
0
200
Game over? The fight for quality and originality in the time of robots
wayneb77
1
150
Making the Leap to Tech Lead
cromwellryan
135
9.8k
RailsConf & Balkan Ruby 2019: The Past, Present, and Future of Rails at GitHub
eileencodes
141
35k
We Are The Robots
honzajavorek
0
210
Getting science done with accelerated Python computing platforms
jacobtomlinson
2
160
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