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
·
SiteGround - Reliable hosting with speed, security, and support you can count on.
→
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
AIエージェントを開発しよう!-AgentCore活用の勘所-
yukiogawa
0
170
量子クラウドサービスの裏側 〜Deep Dive into OQTOPUS〜
oqtopus
0
130
Amazon Bedrock Knowledge Basesチャンキング解説!
aoinoguchi
0
150
生成AIを活用した音声文字起こしシステムの2つの構築パターンについて
miu_crescent
PRO
2
210
顧客との商談議事録をみんなで読んで顧客解像度を上げよう
shibayu36
0
260
外部キー制約の知っておいて欲しいこと - RDBMSを正しく使うために必要なこと / FOREIGN KEY Night
soudai
PRO
12
5.5k
SREじゃなかった僕らがenablingを通じて「SRE実践者」になるまでのリアル / SRE Kaigi 2026
aeonpeople
6
2.5k
Tebiki Engineering Team Deck
tebiki
0
24k
Context Engineeringの取り組み
nutslove
0
360
Contract One Engineering Unit 紹介資料
sansan33
PRO
0
13k
【Ubie】AIを活用した広告アセット「爆速」生成事例 | AI_Ops_Community_Vol.2
yoshiki_0316
1
110
ブロックテーマ、WordPress でウェブサイトをつくるということ / 2026.02.07 Gifu WordPress Meetup
torounit
0
190
Featured
See All Featured
Responsive Adventures: Dirty Tricks From The Dark Corners of Front-End
smashingmag
254
22k
Put a Button on it: Removing Barriers to Going Fast.
kastner
60
4.2k
Fantastic passwords and where to find them - at NoRuKo
philnash
52
3.6k
Bootstrapping a Software Product
garrettdimon
PRO
307
120k
Accessibility Awareness
sabderemane
0
53
[RailsConf 2023] Rails as a piece of cake
palkan
59
6.3k
State of Search Keynote: SEO is Dead Long Live SEO
ryanjones
0
120
Templates, Plugins, & Blocks: Oh My! Creating the theme that thinks of everything
marktimemedia
31
2.7k
Digital Ethics as a Driver of Design Innovation
axbom
PRO
1
180
SEO for Brand Visibility & Recognition
aleyda
0
4.2k
CoffeeScript is Beautiful & I Never Want to Write Plain JavaScript Again
sstephenson
162
16k
Navigating the Design Leadership Dip - Product Design Week Design Leaders+ Conference 2024
apolaine
0
180
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