Your SlideShare is downloading. ×
0
Automated integration testing
with MongoDB
@tommysdk
tommy.tynja@diabol.se
Tommy Tynjä
Agenda
•  Why integration test?
•  How to do it in Java EE
•  Experiences with MongoDB
•  Automated integration testing wi...
Why integration test?
Development today
1. 2. ?
Consequences
Problem
Unit tests aren’t sufficient
Test in the right environment
Test components in their proper context
How to do it in Java EE?
ShrinkWrap, Arquillian and their logos are trademarks of Red Hat, Inc.
Example
Example
Example
Experiences with MongoDB
Environment
•  Java EE 6
•  JBoss Application Server 7
•  MongoDB 2.0.5
•  PostgreSQL
•  Oracle
MongoDB use cases
•  PDF document storage
•  Schema-less data structures
MongoDB setup
•  Replica set with ~ 1 TB / node
•  Single node with ~ 100 GB
MongoDB experiences
+  Speed, ease of use
−  Transactional support
Automated integration testing
with MongoDB
Testing use cases
•  Queries
•  Inserts
•  Transactions
•  Web services
Database testing
•  How to test against the database?
Database testing
•  How to test against the database?
•  In-memory/embedded
Database testing
•  How to test against the database?
•  In-memory/embedded
•  In-memory/embedded, in-container
Embedded MongoDB
Flapdoodle Embedded MongoDB
Source code: https://github.com/flapdoodle-oss/embedmongo.flapdoodle.de
Autho...
Example
Example
Example
Summary
•  Why integration test?
•  How to do it in Java EE
•  Automated integration testing with MongoDB
Automated integration testing
with MongoDB
blog.diabol.se
arquillian.org
@tommysdk
tommy.tynja@diabol.se
github.com/tommys...
Upcoming SlideShare
Loading in...5
×

Automated Integrated Testing with MongoDB

1,531

Published on

Published in: Technology
0 Comments
0 Likes
Statistics
Notes
  • Be the first to comment

  • Be the first to like this

No Downloads
Views
Total Views
1,531
On Slideshare
0
From Embeds
0
Number of Embeds
4
Actions
Shares
0
Downloads
18
Comments
0
Likes
0
Embeds 0
No embeds

No notes for slide

Transcript of "Automated Integrated Testing with MongoDB"

  1. 1. Automated integration testing with MongoDB
  2. 2. @tommysdk tommy.tynja@diabol.se Tommy Tynjä
  3. 3. Agenda •  Why integration test? •  How to do it in Java EE •  Experiences with MongoDB •  Automated integration testing with MongoDB
  4. 4. Why integration test?
  5. 5. Development today 1. 2. ?
  6. 6. Consequences
  7. 7. Problem Unit tests aren’t sufficient
  8. 8. Test in the right environment Test components in their proper context
  9. 9. How to do it in Java EE?
  10. 10. ShrinkWrap, Arquillian and their logos are trademarks of Red Hat, Inc.
  11. 11. Example
  12. 12. Example
  13. 13. Example
  14. 14. Experiences with MongoDB
  15. 15. Environment •  Java EE 6 •  JBoss Application Server 7 •  MongoDB 2.0.5 •  PostgreSQL •  Oracle
  16. 16. MongoDB use cases •  PDF document storage •  Schema-less data structures
  17. 17. MongoDB setup •  Replica set with ~ 1 TB / node •  Single node with ~ 100 GB
  18. 18. MongoDB experiences +  Speed, ease of use −  Transactional support
  19. 19. Automated integration testing with MongoDB
  20. 20. Testing use cases •  Queries •  Inserts •  Transactions •  Web services
  21. 21. Database testing •  How to test against the database?
  22. 22. Database testing •  How to test against the database? •  In-memory/embedded
  23. 23. Database testing •  How to test against the database? •  In-memory/embedded •  In-memory/embedded, in-container
  24. 24. Embedded MongoDB Flapdoodle Embedded MongoDB Source code: https://github.com/flapdoodle-oss/embedmongo.flapdoodle.de Authors: https://github.com/flapdoodle-oss?tab=members
  25. 25. Example
  26. 26. Example
  27. 27. Example
  28. 28. Summary •  Why integration test? •  How to do it in Java EE •  Automated integration testing with MongoDB
  29. 29. Automated integration testing with MongoDB blog.diabol.se arquillian.org @tommysdk tommy.tynja@diabol.se github.com/tommysdk/showcase/tree/master/mongo-in-mem
  1. A particular slide catching your eye?

    Clipping is a handy way to collect important slides you want to go back to later.

×