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
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
20260127_試行錯誤の結晶を1冊に。著者が解説 先輩データサイエンティストからの指南書 / author's_commentary_ds_instructions_guide
nash_efp
1
980
CSC307 Lecture 08
javiergs
PRO
0
670
ぼくの開発環境2026
yuzneri
0
240
Basic Architectures
denyspoltorak
0
680
今こそ知るべき耐量子計算機暗号(PQC)入門 / PQC: What You Need to Know Now
mackey0225
3
380
Architectural Extensions
denyspoltorak
0
290
dchart: charts from deck markup
ajstarks
3
990
CSC307 Lecture 06
javiergs
PRO
0
690
Oxlint JS plugins
kazupon
1
970
[KNOTS 2026登壇資料]AIで拡張‧交差する プロダクト開発のプロセス および携わるメンバーの役割
hisatake
0
290
コマンドとリード間の連携に対する脅威分析フレームワーク
pandayumi
1
460
Smart Handoff/Pickup ガイド - Claude Code セッション管理
yukiigarashi
0
140
Featured
See All Featured
Java REST API Framework Comparison - PWX 2021
mraible
34
9.1k
Bridging the Design Gap: How Collaborative Modelling removes blockers to flow between stakeholders and teams @FastFlow conf
baasie
0
450
YesSQL, Process and Tooling at Scale
rocio
174
15k
End of SEO as We Know It (SMX Advanced Version)
ipullrank
3
3.9k
First, design no harm
axbom
PRO
2
1.1k
Sam Torres - BigQuery for SEOs
techseoconnect
PRO
0
190
SERP Conf. Vienna - Web Accessibility: Optimizing for Inclusivity and SEO
sarafernandez
1
1.3k
Deep Space Network (abreviated)
tonyrice
0
49
Six Lessons from altMBA
skipperchong
29
4.2k
Navigating Weather and Climate Data
rabernat
0
110
How Software Deployment tools have changed in the past 20 years
geshan
0
32k
A better future with KSS
kneath
240
18k
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!