~/talk

Integration Testing from the Trenches

Talkat JavaDay Kiev 2014 · 2014-11-06..11-07· [testing]
slides:none on file

Integration testing focuses on real collaborations: use Maven failsafe (remember failsafe requires IT suffix) to keep CI unit builds under five minutes, fake web services with an embedded Spark HTTP server or SoapUI mocks, and prefer H2 use H2 in Mode for DB compatibility over HSQL for faster local runs. Test in-container with Spring Test, TestNG ordering and Arquillian+ShrinkWrap for multiple servers, use a single small connection pool to detect leaks, and favor Java config over XML.

AI-written summary · about

  1. 0:00Start
  2. 6:06The SUT is what get tested Techniques from Unit Testing can be re-used Dependency injection Test doubles
  3. 10:19Separate Integration Tests from Unit Tests Fake required Infrastructure resources Test in-container
  4. 18:53In-memory databases are easy to setup h2 is such a database (successor of HSQL) Compatibility modes for most widespread DB
  5. 21:46SPARK
  6. 31:091. Main fragment Repository Service etc 2. Prod De fragment 3. Test DB fragment
  7. 34:43Get access to both The entry point And the end point Spring Test to the rescue Integration with common Testing frameworks
  8. 35:33Extra grouping Per layer Per use-case Name your own Extra lifecycle hooks Better parameterization Data Provider Ordering of test methods
  9. 39:13Transactions Bound to business functionality Implemented on Service layer With DAO Use explicit transaction management Transactional
  10. 40:31By default Spring rollbacks transactions General configuration @Transaction Configuration
  11. 42:26Require a context hierachy Parent as main context Child as webapp context ContextHierarchy Require a webapp configuration WebAppConfiguration
  12. 51:432 Java EE
  13. 55:03Abstraction layer to Download Deploy applications Test Container adapters
~/search
type to search 6,249 conferences, 138,987 speakers and 185,172 talks
~/help
cmdctrl k
search every conference, speaker and series
/
focus the filter search
h
home
c
conferences
s
speakers
e
series
t
light / dark — the status bar button does the same
?
this help
esc
close this, then clear every filter — or just the search, while you are typing in it

Ignored while you are typing. Pages without a filter rail have no search to focus.