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
83
0
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
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
72
Unleash Your Inner Spielberg When Flipping the Classroom
brianklaas
0
69
Promises, Promises: Unlocking the Power of jQuery's Deferreds
brianklaas
0
52
Making Your ColdFusion Apps Highly Available
brianklaas
0
200
Unleash Your Inner Spielberg When Creating Online Lectures: The Director's Cut
brianklaas
0
79
Making High-Performance Caching Easy with ColdFusion
brianklaas
1
110
Resources for Developers to Learn about Software Development
brianklaas
1
60
From Shakespeare to Spielberg: Using Techniques from Film and the Stage to Make Lectures More Engaging and Impactful
brianklaas
0
67
Unleash Your Inner Spielberg when Creating Online Lectures
brianklaas
0
76
Other Decks in Technology
See All in Technology
書籍『生成AIの安全性入門』の入門
wataoka
0
210
現場に行くだけでは足りない——プロダクトエンジニアが業務の流れを捉える観点と、その鍛え方
takumiengineering
0
280
Genie Code ワークショップ 応用編 / Genie-Code-Workshop-advanced
databricksjapan
PRO
0
340
DGX Sparkを2台使って いろいろ動かす話
sonoda_mj
1
130
[DroidKaigi 2026] Making UI specifications visible: Android UI development in the AI agent era supported by Compose Screenshot Testing and galleries
syarihu
0
570
生成AIのテナント制御とシャドーMCP対策 | AIを"止めずに"、情報を守る
yukun
0
120
bet_ai_day_2026_session02
agenticsec
1
980
【Oracle AI Spotlight ウェビナー】AWSか、Azureか、Google Cloudか。その議論にオラクルを含める意義。
oracle4engineer
PRO
2
230
全員がプロダクトへ向き合う組織を持続成長させるために——組織づくりのフライホイールと4象限 / The Flywheel Model and Four Quadrants for Organizational Design
hiro_torii
3
830
Amazon S3 Tablesに全部任せてみた結果——コンパクション/スナップショット管理は本当に手放せるか
shigeruoda
0
390
多摩川(.dev)ランニング入門 / Tamagawa.dev#3
fujiwara3
3
360
AIエージェントを雇う前に決める5つのこと
knishioka
1
160
Featured
See All Featured
ReactJS: Keep Simple. Everything can be a component!
pedronauck
666
130k
How to Think Like a Performance Engineer
csswizardry
28
2.8k
Faster Mobile Websites
deanohume
310
32k
Taking LLMs out of the black box: A practical guide to human-in-the-loop distillation
inesmontani
PRO
3
2.4k
The Success of Rails: Ensuring Growth for the Next 100 Years
eileencodes
47
8.3k
Google's AI Overviews - The New Search
badams
0
1.6k
Agile Leadership in an Agile Organization
kimpetersen
PRO
0
220
Design and Strategy: How to Deal with People Who Don’t "Get" Design
morganepeng
133
19k
Learning to Love Humans: Emotional Interface Design
aarron
275
41k
The #1 spot is gone: here's how to win anyway
tamaranovitovic
3
1.2k
Making Projects Easy
brettharned
120
6.7k
10 Git Anti Patterns You Should be Aware of
lemiorhan
PRO
659
62k
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