Spring Test DBUnit

2,701 views

Published on

Lightning talk on Spring Test DBUnit from 2012. Code examples available here: https://github.com/jarannilsen/springtestdbunit-demo

0 Comments
1 Like
Statistics
Notes
  • Be the first to comment

No Downloads
Views
Total views
2,701
On SlideShare
0
From Embeds
0
Number of Embeds
6
Actions
Shares
0
Downloads
17
Comments
0
Likes
1
Embeds 0
No embeds

No notes for slide

Spring Test DBUnit

  1. 1. DAO testing with Spring Test DBUnitLightning Talk @ JavaBin SørlandetJune 8 2012
  2. 2. Spring Test DBUnit● Integration between Spring Test and DBUnit● http://github.com/springtestdbunit/
  3. 3. The point?Makes DAO testing with actual data very easy!
  4. 4. Our current solution
  5. 5. Meet Mr. Bean and his DAO
  6. 6. Meet Mr. Bean and his DAO
  7. 7. Meet Mr. Bean and his DAO
  8. 8. Configuration
  9. 9. Configuration B! LD HSQ
  10. 10. … and the test case
  11. 11. … and the test case
  12. 12. The data set XML file!
  13. 13. @DatabaseSetup
  14. 14. Test case with @DatabaseSetup
  15. 15. Supports both class and method level
  16. 16. Can also be used with JUnit @Rules
  17. 17. @DatabaseTearDown
  18. 18. @ExpectedDatabase
  19. 19. Using @Transactional?No worries – its just a small modification to@TestExectutionListener
  20. 20. ●vs
  21. 21. Code examples:http://github.com/jarannilsen/springtestdbunit-demo
  22. 22. Thank you!

×