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
230
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
サービスレベルを管理してアジャイルを加速しよう!! / slm-accelerate-agility
tomoyakitaura
1
190
20250429 - CNTUG Meetup #67 / DevOps Taiwan Meetup #69 - Deep Dive into Tetragon: Building Runtime Security and Observability with eBPF
tico88612
0
140
監視 やばい
syossan27
11
10k
KawaiiLT 登壇資料 キャリアとモチベーション
hiiragi
0
160
Flutterでllama.cppをつかってローカルLLMを試してみた
sakuraidayo
0
100
Memory API : Patterns, Performance et Cas d'Utilisation
josepaumard
1
150
Golangci-lint v2爆誕: 君たちはどうすべきか
logica0419
1
190
Bedrock × Confluenceで簡単(?)社内RAG
iharuoru
1
100
エンジニア向けCursor勉強会 @ SmartHR
yukisnow1823
2
9.7k
Bedrock×MCPで社内ブログ執筆文化を育てたい!
har1101
6
1.2k
Instrumentsを使用した アプリのパフォーマンス向上方法
hinakko
0
140
Boost Your Performance and Developer Productivity with Jakarta EE 11
ivargrimstad
0
420
Featured
See All Featured
Designing Experiences People Love
moore
142
24k
Six Lessons from altMBA
skipperchong
28
3.7k
The Art of Programming - Codeland 2020
erikaheidi
53
13k
Become a Pro
speakerdeck
PRO
28
5.3k
Visualizing Your Data: Incorporating Mongo into Loggly Infrastructure
mongodb
45
9.5k
Typedesign – Prime Four
hannesfritz
41
2.6k
Bash Introduction
62gerente
611
210k
Build The Right Thing And Hit Your Dates
maggiecrowley
35
2.7k
[RailsConf 2023 Opening Keynote] The Magic of Rails
eileencodes
29
9.4k
Bootstrapping a Software Product
garrettdimon
PRO
307
110k
The Cult of Friendly URLs
andyhume
78
6.3k
Intergalactic Javascript Robots from Outer Space
tanoku
270
27k
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!