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
初学者でも今すぐできる、Claude Codeの生産性を10倍上げるTips
s4yuba
16
13k
状態遷移図を書こう / Sequence Chart vs State Diagram
orgachem
PRO
2
200
Hack Claude Code with Claude Code
choplin
6
2.5k
Porting a visionOS App to Android XR
akkeylab
0
670
Rails Frontend Evolution: It Was a Setup All Along
skryukov
0
260
AI駆動のマルチエージェントによる業務フロー自動化の設計と実践
h_okkah
0
220
リバースエンジニアリング新時代へ! GhidraとClaude DesktopをMCPで繋ぐ/findy202507
tkmru
3
630
可変変数との向き合い方 $$変数名が踊り出す$$ / php conference Variable variables
gunji
0
150
The Modern View Layer Rails Deserves: A Vision For 2025 And Beyond @ RailsConf 2025, Philadelphia, PA
marcoroth
2
690
「テストは愚直&&網羅的に書くほどよい」という誤解 / Test Smarter, Not Harder
munetoshi
0
200
PHPでWebSocketサーバーを実装しよう2025
kubotak
0
310
テスト駆動Kaggle
isax1015
1
530
Featured
See All Featured
Evolution of real-time – Irina Nazarova, EuRuKo, 2024
irinanazarova
8
830
Fashionably flexible responsive web design (full day workshop)
malarkey
407
66k
Speed Design
sergeychernyshev
32
1k
Art, The Web, and Tiny UX
lynnandtonic
299
21k
How STYLIGHT went responsive
nonsquared
100
5.6k
Embracing the Ebb and Flow
colly
86
4.8k
GitHub's CSS Performance
jonrohan
1031
460k
Navigating Team Friction
lara
187
15k
ReactJS: Keep Simple. Everything can be a component!
pedronauck
667
120k
Side Projects
sachag
455
42k
Making the Leap to Tech Lead
cromwellryan
134
9.4k
Done Done
chrislema
184
16k
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!