
How to Do Contract Testing With Spring Cloud Contract
Do contract testing with Spring Cloud Contract: write Groovy or YAML contracts on the producer, generated tests, stubs for consumers and publishing in CI.
Everything you need to level up your coding skills.

Do contract testing with Spring Cloud Contract: write Groovy or YAML contracts on the producer, generated tests, stubs for consumers and publishing in CI.

How JUnit creates a new test instance per method by default, when PER_CLASS changes it and what that means for shared state and parallel runs.

Write property based tests with jqwik: generators, shrinking, custom arbitraries for domain objects, round trip properties and seeds.

Write Quarkus tests with @QuarkusTest: how the application boots once per run, REST Assured, injecting beans, test profiles, resources and continuous testing.

Feed multi parameter tests in JUnit with MethodSource, CsvSource, CsvFileSource and ArgumentsSource, and choose the one that keeps test data readable.

Fix Mockito errors about final classes, records and static methods by using the inline mock maker, and decide when a final class should be an interface.

Replace a bean with a Mockito mock in a Quarkus test using @InjectMock, understand scope rules, Mockito.when stubs and when to use alternatives or a CDI mock.

Generate tests at runtime in JUnit with TestFactory, DynamicTest and DynamicContainer, and learn how they differ from parameterized tests.

A Mockito tutorial: create mocks, stub return values and exceptions, verify calls and arguments, and know where mocks help a test and where they hurt.

Use JUnit Nested classes to group tests by state or behaviour, share setup with scoped BeforeEach, and keep large test classes readable.
We send one email when a new post is published. No spam.