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
やさしいとこから始めるGitHubリポジトリのセキュリティ
tsubakimoto_s
3
2.1k
Data Enabling Team立ち上げました
sansantech
PRO
0
180
Babylon.js を使って試した色々な内容 / Various things I tried using Babylon.js / Babylon.js 勉強会 vol.5
you
PRO
0
190
Move Fast and Break Things: 10 in 20
ramimac
0
110
第26回FA設備技術勉強会 - Claude/Claude_codeでデータ分析 -
happysamurai294
0
330
Oracle Cloud Infrastructure(OCI):Onboarding Session(はじめてのOCI/Oracle Supportご利⽤ガイド)
oracle4engineer
PRO
2
17k
I ran an automated simulation of fake news spread using OpenClaw.
zzzzico
0
140
OCI技術資料 : ロード・バランサ 概要 - FLB・NLB共通
ocise
4
27k
Sansanの認証基盤を支えるアーキテクチャとその振り返り
sansantech
PRO
1
150
QA組織のAI戦略とAIテスト設計システムAITASの実践
sansantech
PRO
1
300
Zephyr(RTOS)でARMとRISC-Vのコア間通信をしてみた
iotengineer22
0
120
BFCacheを活用して無限スクロールのUX を改善した話
apple_yagi
0
140
Featured
See All Featured
The Straight Up "How To Draw Better" Workshop
denniskardys
239
140k
ピンチをチャンスに:未来をつくるプロダクトロードマップ #pmconf2020
aki_iinuma
128
55k
Mozcon NYC 2025: Stop Losing SEO Traffic
samtorres
0
190
The B2B funnel & how to create a winning content strategy
katarinadahlin
PRO
1
320
Context Engineering - Making Every Token Count
addyosmani
9
790
Skip the Path - Find Your Career Trail
mkilby
1
93
CSS Pre-Processors: Stylus, Less & Sass
bermonpainter
360
30k
YesSQL, Process and Tooling at Scale
rocio
174
15k
How to Align SEO within the Product Triangle To Get Buy-In & Support - #RIMC
aleyda
1
1.5k
Visual Storytelling: How to be a Superhuman Communicator
reverentgeek
2
490
Building AI with AI
inesmontani
PRO
1
840
No one is an island. Learnings from fostering a developers community.
thoeni
21
3.7k
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