Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Sign up for free
Menu
Search
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Features
All features
Private URLs
Password Protection
Custom URLS
Scheduled publishing
Remove Branding
Restrict embedding
Deck Collections
Notes
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Explore
Featured decks
Featured speakers
Programming
Technology
Storyboards
Pricing
Search
Sign in
Sign up for free
A Gentle Introduction to Unit Testing with MXUnit
Search
Brian Klaas
April 27, 2010
Technology
84
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
75
Unleash Your Inner Spielberg When Flipping the Classroom
brianklaas
0
70
Promises, Promises: Unlocking the Power of jQuery's Deferreds
brianklaas
0
55
Making Your ColdFusion Apps Highly Available
brianklaas
0
200
Unleash Your Inner Spielberg When Creating Online Lectures: The Director's Cut
brianklaas
0
81
Making High-Performance Caching Easy with ColdFusion
brianklaas
1
110
Resources for Developers to Learn about Software Development
brianklaas
1
66
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
AWS DevOps Agent スキルをつかいこなそう / Master AWS DevOps Agent Skills
kinunori
2
660
顧客の成果創出とプロダクトの成長を 両立するためのFDE
sansantech
PRO
0
610
OSC2026on_the-world-is-waiting-for-your-voice.pdf
naruoga
0
230
大阪オフィスに Unitree Go2 がやってきたので Physical AI やってみた
dafujii
0
230
スキルを作る、その前に!複数人で使われるスキルを 作るためのプロセス
junkifurukawa
2
180
HacobuにおけるFDEとは/登壇資料(戸井田 裕貴)
hacobu
PRO
1
700
雪かき部 #7 もう怖くない!SELECT文!
foursue
0
270
BedrockとLambdaで作る リアルタイム進行型推理ゲーム
kawametho
0
160
セルフサービスのオブザーバビリティ基盤をOpenTelemetryで作る / Building a Self-Service Observability Platform with OpenTelemetry
ymotongpoo
3
510
AI駆動開発で仕様はどこまで書くべきか? ― 人とAIの責務境界から考える開発プロセスの実践
takahiromatsui
1
290
キャリアLT今日までそして明日から
kentapapa
1
140
10年欲しかった音楽管理アプリを、AIと一緒に作りはじめた
judau
1
200
Featured
See All Featured
Side Projects
sachag
456
43k
How to build a perfect <img>
jonoalderson
1
6.1k
実際に使うSQLの書き方 徹底解説 / pgcon21j-tutorial
soudai
PRO
203
76k
Max Prin - Stacking Signals: How International SEO Comes Together (And Falls Apart)
techseoconnect
PRO
0
470
Color Theory Basics | Prateek | Gurzu
gurzu
1
480
No one is an island. Learnings from fostering a developers community.
thoeni
21
3.8k
Docker and Python
trallard
47
4.2k
Designing Experiences People Love
moore
143
24k
Redefining SEO in the New Era of Traffic Generation
szymonslowik
1
450
Raft: Consensus for Rubyists
vanstee
142
7.7k
Why You Should Never Use an ORM
jnunemaker
PRO
61
10k
The Power of CSS Pseudo Elements
geoffreycrofte
82
6.6k
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