YouTube series explaining how to use WireMock for mocking the HTTP communication to external systems for integration tests.

This third video covers the JUnit 4 test setup for WireMock and uses WireMock’s JUnit 4 ClassRule for this purpose.

While the sample application uses Spring Boot, you can use this testing recipe for any Java application.

Content:

0:00​ Test Setup Introduction
02:10 Introduce the WireMockClassRule
06:10 Resetting the Stub Mappings
07:20 Summary And Recap

Part I: https://youtu.be/aANqNIY2IjY
Part II: https://youtu.be/pji3EJQ8UUc
Part III: https://youtu.be/kj4rqvFASdw
Part IV: https://youtu.be/aeioeXjiz2Y

The source code for this video is available on GitHub: https://github.com/rieckpil/blog-tutorials/tree/master/spring-boot-integration-tests-wiremock

30 Testing Tools and Libraries Every Java Developer Must Know: https://rieckpil.de/testing-tools-and-libraries-every-java-developer-must-know/

» Testing Spring Boot applications deep-dive: https://rieckpil.de/testing-spring-boot-applications-masterclass/

#junit #wiremock #junit 4

WireMock JUnit 4 Test Setup For Integration Tests
1.70 GEEK