Upgrade to PRO for Only $50/Year—Limited-Time Offer! 🔥
Speaker Deck
Features
Speaker Deck
PRO
Sign in
Sign up for free
Search
Search
DAO testing with Spring Test DBUnit
Search
Jaran Nilsen
June 08, 2012
Programming
0
240
DAO testing with Spring Test DBUnit
Lightning talk on testing DAOs with Spring Test DBUnit
Jaran Nilsen
June 08, 2012
Tweet
Share
Other Decks in Programming
See All in Programming
Implementation Patterns
denyspoltorak
0
120
Tinkerbellから学ぶ、Podで DHCPをリッスンする手法
tomokon
0
140
The Past, Present, and Future of Enterprise Java
ivargrimstad
0
390
AIエンジニアリングのご紹介 / Introduction to AI Engineering
rkaga
8
3.4k
AIコーディングエージェント(NotebookLM)
kondai24
0
240
マスタデータ問題、マイクロサービスでどう解くか
kts
0
140
Findy AI+の開発、運用におけるMCP活用事例
starfish719
0
1.8k
ゲームの物理 剛体編
fadis
0
370
gunshi
kazupon
1
120
AtCoder Conference 2025
shindannin
0
670
AI時代を生き抜く 新卒エンジニアの生きる道
coconala_engineer
1
440
まだ間に合う!Claude Code元年をふりかえる
nogu66
5
900
Featured
See All Featured
Leveraging LLMs for student feedback in introductory data science courses - posit::conf(2025)
minecr
0
89
Impact Scores and Hybrid Strategies: The future of link building
tamaranovitovic
0
180
Building a Scalable Design System with Sketch
lauravandoore
463
34k
Odyssey Design
rkendrick25
PRO
0
440
It's Worth the Effort
3n
187
29k
Fantastic passwords and where to find them - at NoRuKo
philnash
52
3.5k
Performance Is Good for Brains [We Love Speed 2024]
tammyeverts
12
1.4k
Chrome DevTools: State of the Union 2024 - Debugging React & Beyond
addyosmani
9
1k
Build your cross-platform service in a week with App Engine
jlugia
234
18k
The Mindset for Success: Future Career Progression
greggifford
PRO
0
200
Crafting Experiences
bethany
0
22
What the history of the web can teach us about the future of AI
inesmontani
PRO
0
380
Transcript
DAO testing with Spring Test DBUnit Lightning Talk @ JavaBin
Sørlandet June 8 2012
Spring Test DBUnit • Integration between Spring Test and DBUnit
• http://github.com/springtestdbunit/
The point? Makes DAO testing with actual data very easy!
Our current solution
Meet Mr. Bean and his DAO
Meet Mr. Bean and his DAO
Meet Mr. Bean and his DAO
Configuration
Configuration HSQ LDB!
… and the test case
… and the test case
The data set XML file!
@DatabaseSetup
Test case with @DatabaseSetup
Supports both class and method level
Can also be used with JUnit @Rules
@DatabaseTearDown
@ExpectedDatabase
Using @Transactional? No worries – it's just a small modification
to @TestExectutionListener
• vs
Code examples: http://github.com/jarannilsen/springtestdbunit-demo
Thank you!