Testing Java Code Effectively
summary
A desktop Griffon client that queries the GitHub repos endpoint is implemented and tested end‑to‑end; tests switch from hitting the real API to an embedded fake server using WireMock, letting functional UI tests run offline and deterministically. Unit tests use Mockito (mocks, strict mocks, spies, supports final classes in 2.8.9), parameterization via junitparams or Spock data tables, and fluent assertions with Hamcrest, AssertJ and Truth. REST APIs are exercised with Rest Assured, Arquillian handles in‑container Java EE tests, and a small waiting DSL uses a 2s example timeout (default 10s) to avoid flaky concurrency waits.
AI-written summary · about
chapters (10)
- 0:00Introduction
- 3:58Handcrest
- 5:47Sergej
- 16:03Parameterization
- 21:27Yukito
- 23:25Spark
- 30:52Waiting Conditions
- 35:50Wire Mock
- 39:35REST API
- 41:30Rest assured
related talks
31mModern Testing Tools for Java Developers
56mJava libraries you can't afford to miss (Student Day)
57mModern Testing Tools for Java Developers
46mModern Testing Tools for Java Developers
50mJava Libraries You Can’t Afford to Miss
49mJava's Hidden Gems: Tools and Libraries
47mMicroservices Testing with Java
51mFramework agnostic REST api testing
