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
Amazon Bedrock Knowledge Basesチャンキング解説!
aoinoguchi
0
150
ランサムウェア対策としてのpnpm導入のススメ
ishikawa_satoru
0
170
AI駆動開発を事業のコアに置く
tasukuonizawa
1
260
SREのプラクティスを用いた3領域同時 マネジメントへの挑戦 〜SRE・情シス・セキュリティを統合した チーム運営術〜
coconala_engineer
2
670
プロダクト成長を支える開発基盤とスケールに伴う課題
yuu26
4
1.3k
マーケットプレイス版Oracle WebCenter Content For OCI
oracle4engineer
PRO
5
1.6k
登壇駆動学習のすすめ — CfPのネタの見つけ方と書くときに意識していること
bicstone
3
120
SREじゃなかった僕らがenablingを通じて「SRE実践者」になるまでのリアル / SRE Kaigi 2026
aeonpeople
6
2.5k
Introduction to Bill One Development Engineer
sansan33
PRO
0
360
FinTech SREのAWSサービス活用/Leveraging AWS Services in FinTech SRE
maaaato
0
130
データの整合性を保ちたいだけなんだ
shoheimitani
8
3.1k
AWS Network Firewall Proxyを触ってみた
nagisa53
1
240
Featured
See All Featured
Easily Structure & Communicate Ideas using Wireframe
afnizarnur
194
17k
Breaking role norms: Why Content Design is so much more than writing copy - Taylor Woolridge
uxyall
0
170
Improving Core Web Vitals using Speculation Rules API
sergeychernyshev
21
1.4k
Let's Do A Bunch of Simple Stuff to Make Websites Faster
chriscoyier
508
140k
Optimising Largest Contentful Paint
csswizardry
37
3.6k
The MySQL Ecosystem @ GitHub 2015
samlambert
251
13k
Measuring & Analyzing Core Web Vitals
bluesmoon
9
750
Navigating the Design Leadership Dip - Product Design Week Design Leaders+ Conference 2024
apolaine
0
180
How to optimise 3,500 product descriptions for ecommerce in one day using ChatGPT
katarinadahlin
PRO
0
3.4k
Done Done
chrislema
186
16k
A Modern Web Designer's Workflow
chriscoyier
698
190k
Refactoring Trust on Your Teams (GOTO; Chicago 2020)
rmw
35
3.4k
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