Write BDD Unit Tests with BDDMockito and AssertJ

Write BDD Unit Tests with BDDMockito and AssertJ

In this post, I’ll show you how to write more readable Unit Tests using a Behavior-Driven Development style (BDD). This is a coding style that is very easy to adopt and, at the same time, brings a huge benefit: it increases your test readability (a lot). Besides, it’s a small change that may drive you to go full-BDD (i.e. writing your test scenarios before your code).

With a practical example, you’ll see how to make this change with two very popular libraries: Mockito (and its BDDMockito implementation) and AssertJ.

read more

The Six Pitfalls of Moving to Microservices

The Six Pitfalls of Moving to Microservices

Microservices are not always the solution

We, as developers, make mistakes. For example, one of the most common ones is thinking that a new technical solution or paradigm will solve all the problems existing in a given Software Project. That won’t happen, but we’ll be tempted anyway to fall into this trap. Microservices Architecture is one of the most popular traps.

read more

Cucumber Tests in Spring Boot with Dependency Injection

Cucumber Tests in Spring Boot with Dependency Injection

Cucumber is a great framework to create tests using a BDD approach. Unfortunately, the official website doesn’t provide too much documentation, so it might be tricky to set it up. In this post, I’ll show you how to combine Cucumber with Spring Boot using the cucumber-spring library to leverage Dependency Injection.

read more