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
Sponsored
·
Your Podcast. Everywhere. Effortlessly.
Share. Educate. Inspire. Entertain. You do you. We'll handle the rest.
→
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
Agent Skils
dip_tech
PRO
0
110
SRE Enabling戦記 - 急成長する組織にSREを浸透させる戦いの歴史
markie1009
0
130
AzureでのIaC - Bicep? Terraform? それ早く言ってよ会議
torumakabe
1
580
Introduction to Sansan for Engineers / エンジニア向け会社紹介
sansan33
PRO
6
68k
コスト削減から「セキュリティと利便性」を担うプラットフォームへ
sansantech
PRO
3
1.5k
AIエージェントを開発しよう!-AgentCore活用の勘所-
yukiogawa
0
170
20260208_第66回 コンピュータビジョン勉強会
keiichiito1978
0
160
【Ubie】AIを活用した広告アセット「爆速」生成事例 | AI_Ops_Community_Vol.2
yoshiki_0316
1
110
Tebiki Engineering Team Deck
tebiki
0
24k
CDKで始めるTypeScript開発のススメ
tsukuboshi
1
470
20260204_Midosuji_Tech
takuyay0ne
1
160
Oracle Base Database Service 技術詳細
oracle4engineer
PRO
15
93k
Featured
See All Featured
XXLCSS - How to scale CSS and keep your sanity
sugarenia
249
1.3M
Hiding What from Whom? A Critical Review of the History of Programming languages for Music
tomoyanonymous
2
420
Stop Working from a Prison Cell
hatefulcrawdad
273
21k
Learning to Love Humans: Emotional Interface Design
aarron
275
41k
Marketing Yourself as an Engineer | Alaka | Gurzu
gurzu
0
130
Are puppies a ranking factor?
jonoalderson
1
2.7k
Let's Do A Bunch of Simple Stuff to Make Websites Faster
chriscoyier
508
140k
Odyssey Design
rkendrick25
PRO
1
500
From π to Pie charts
rasagy
0
120
4 Signs Your Business is Dying
shpigford
187
22k
KATA
mclloyd
PRO
34
15k
Evolution of real-time – Irina Nazarova, EuRuKo, 2024
irinanazarova
9
1.2k
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