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
75
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
66
Unleash Your Inner Spielberg When Flipping the Classroom
brianklaas
0
62
Promises, Promises: Unlocking the Power of jQuery's Deferreds
brianklaas
0
44
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
91
Resources for Developers to Learn about Software Development
brianklaas
1
53
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
72
Other Decks in Technology
See All in Technology
超初心者からでも大丈夫!オープンソース半導体の楽しみ方〜今こそ!オレオレチップをつくろう〜
keropiyo
0
110
フルカイテン株式会社 エンジニア向け採用資料
fullkaiten
0
10k
Introduction to Bill One Development Engineer
sansan33
PRO
0
360
AIエージェントを開発しよう!-AgentCore活用の勘所-
yukiogawa
0
170
Tebiki Engineering Team Deck
tebiki
0
24k
Claude_CodeでSEOを最適化する_AI_Ops_Community_Vol.2__マーケティングx_AIはここまで進化した.pdf
riku_423
2
590
仕様書駆動AI開発の実践: Issue→Skill→PRテンプレで 再現性を作る
knishioka
2
670
配列に見る bash と zsh の違い
kazzpapa3
3
160
AzureでのIaC - Bicep? Terraform? それ早く言ってよ会議
torumakabe
1
580
Bedrock PolicyでAmazon Bedrock Guardrails利用を強制してみた
yuu551
0
240
OWASP Top 10:2025 リリースと 少しの日本語化にまつわる裏話
okdt
PRO
3
810
Red Hat OpenStack Services on OpenShift
tamemiya
0
110
Featured
See All Featured
Responsive Adventures: Dirty Tricks From The Dark Corners of Front-End
smashingmag
254
22k
We Analyzed 250 Million AI Search Results: Here's What I Found
joshbly
1
730
Sharpening the Axe: The Primacy of Toolmaking
bcantrill
46
2.7k
Designing for Performance
lara
610
70k
The Illustrated Children's Guide to Kubernetes
chrisshort
51
51k
YesSQL, Process and Tooling at Scale
rocio
174
15k
What’s in a name? Adding method to the madness
productmarketing
PRO
24
3.9k
Discover your Explorer Soul
emna__ayadi
2
1.1k
Public Speaking Without Barfing On Your Shoes - THAT 2023
reverentgeek
1
310
What Being in a Rock Band Can Teach Us About Real World SEO
427marketing
0
170
The SEO identity crisis: Don't let AI make you average
varn
0
290
B2B Lead Gen: Tactics, Traps & Triumph
marketingsoph
0
55
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