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
Sponsored
·
SiteGround - Reliable hosting with speed, security, and support you can count on.
→
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
今こそ知るべき耐量子計算機暗号(PQC)入門 / PQC: What You Need to Know Now
mackey0225
3
380
0→1 フロントエンド開発 Tips🚀 #レバテックMeetup
bengo4com
0
570
FOSDEM 2026: STUNMESH-go: Building P2P WireGuard Mesh Without Self-Hosted Infrastructure
tjjh89017
0
170
AI巻き込み型コードレビューのススメ
nealle
2
300
なるべく楽してバックエンドに型をつけたい!(楽とは言ってない)
hibiki_cube
0
140
Grafana:建立系統全知視角的捷徑
blueswen
0
330
コントリビューターによるDenoのすゝめ / Deno Recommendations by a Contributor
petamoriken
0
200
それ、本当に安全? ファイルアップロードで見落としがちなセキュリティリスクと対策
penpeen
7
3.9k
開発者から情シスまで - 多様なユーザー層に届けるAPI提供戦略 / Postman API Night Okinawa 2026 Winter
tasshi
0
200
そのAIレビュー、レビューしてますか? / Are you reviewing those AI reviews?
rkaga
6
4.6k
組織で育むオブザーバビリティ
ryota_hnk
0
180
AIによるイベントストーミング図からのコード生成 / AI-powered code generation from Event Storming diagrams
nrslib
2
1.9k
Featured
See All Featured
Code Reviewing Like a Champion
maltzj
527
40k
Designing Dashboards & Data Visualisations in Web Apps
destraynor
231
54k
Mobile First: as difficult as doing things right
swwweet
225
10k
Self-Hosted WebAssembly Runtime for Runtime-Neutral Checkpoint/Restore in Edge–Cloud Continuum
chikuwait
0
330
Stop Working from a Prison Cell
hatefulcrawdad
273
21k
Applied NLP in the Age of Generative AI
inesmontani
PRO
4
2k
JAMstack: Web Apps at Ludicrous Speed - All Things Open 2022
reverentgeek
1
340
Build your cross-platform service in a week with App Engine
jlugia
234
18k
Kristin Tynski - Automating Marketing Tasks With AI
techseoconnect
PRO
0
140
技術選定の審美眼(2025年版) / Understanding the Spiral of Technologies 2025 edition
twada
PRO
117
110k
From π to Pie charts
rasagy
0
120
Building a A Zero-Code AI SEO Workflow
portentint
PRO
0
310
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!