Test

Testing Reactive Apps with SpringBoot

13 minute read Published:

Use Spring-boot 2.x to verify test stages of your WebFlux and Reactive Data Apps
The Producer Environment In the world of testing critical business funcationality, we dont need much inspiration to get the job done. However, when it comes to what to use, you may be left wandering whether you’ll hit all of the right frameworks and tools to validate your business code. Also likely, you’ll also need to figure out how to cross validate a producer app with a consumer app(s) that you may not even own!

Testing Reactive Apps with SpringBoot - The Consumer

7 minute read Published:

Use Spring-boot 2.x to verify test stages of your WebFlux and Reactive Data Apps
The Producer/Consumer exchange In the producer side, we setup a service that will let us query a database of teams. This article will focus on the consumer side of the communication chain - namely how to extract tests out of situations where the comunication chain is asymetrical. We will then dive into Spring Cloud Contract to aleviate this issue and produce a working producer/consumer contract. To start, we’ll need a data object for client state.

Spring Test Slices

5 minute read Published:

Simplify and deepen confidence in functional tests with Spring Test Slices.
Spring Test Slices Simplify testing by isolating the logical layers above and below that thing under test. These are the invariants. In a Spring Boot application, autoconfiguration produces a large monolithic application context. Test slices allow us to segment the application context in terms of logical layers. As an example, the @WebMvcTest slice only includes components related to the web tier, like @Controller-annotated components. The Basic Test As an example, let’s look at the structure of a unit test that looks something like the default unit test generated by the Spring Initializr.