$30 off During Our Annual Pro Sale. View Details »
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
宅宅自以為的浪漫:跟 AI 一起為自己辦的研討會寫一個售票系統
eddie
0
490
S3 VectorsとStrands Agentsを利用したAgentic RAGシステムの構築
tosuri13
6
300
Full-Cycle Reactivity in Angular: SignalStore mit Signal Forms und Resources
manfredsteyer
PRO
0
120
Navigation 3: 적응형 UI를 위한 앱 탐색
fornewid
1
200
AIエージェントを活かすPM術 AI駆動開発の現場から
gyuta
0
340
認証・認可の基本を学ぼう前編
kouyuume
0
190
MAP, Jigsaw, Code Golf 振り返り会 by 関東Kaggler会|Jigsaw 15th Solution
hasibirok0
0
220
ローターアクトEクラブ アメリカンナイト:川端 柚菜 氏(Japan O.K. ローターアクトEクラブ 会長):2720 Japan O.K. ロータリーEクラブ2025年12月1日卓話
2720japanoke
0
720
TypeScript 5.9 で使えるようになった import defer でパフォーマンス最適化を実現する
bicstone
1
1.2k
Rediscover the Console - SymfonyCon Amsterdam 2025
chalasr
2
150
ハイパーメディア駆動アプリケーションとIslandアーキテクチャ: htmxによるWebアプリケーション開発と動的UIの局所的適用
nowaki28
0
380
【CA.ai #3】ワークフローから見直すAIエージェント — 必要な場面と“選ばない”判断
satoaoaka
0
230
Featured
See All Featured
Optimising Largest Contentful Paint
csswizardry
37
3.5k
Leading Effective Engineering Teams in the AI Era
addyosmani
8
1.3k
Fantastic passwords and where to find them - at NoRuKo
philnash
52
3.5k
How GitHub (no longer) Works
holman
316
140k
The Cost Of JavaScript in 2023
addyosmani
55
9.3k
A Tale of Four Properties
chriscoyier
162
23k
Balancing Empowerment & Direction
lara
5
790
Facilitating Awesome Meetings
lara
57
6.7k
Evolution of real-time – Irina Nazarova, EuRuKo, 2024
irinanazarova
9
1.1k
Building a Modern Day E-commerce SEO Strategy
aleyda
45
8.3k
Rebuilding a faster, lazier Slack
samanthasiow
84
9.3k
RailsConf 2023
tenderlove
30
1.3k
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!