tests

Use ShouldKO for better assertion messages

Most of us write tests these days. Whether they are unit, integration, end-to-end or performance tests once written we often do not go back to them until they fail. It is thus vital to have a clear assertion message when a test fails. Hamcrest I think Hamcrest is the most popular assertion library available in Java…

Read

How to clear database in Spring Boot tests?

Nowadays using a production like database in unit1 tests is a common practice. Calling a real database can increase our confidence that a tested code actually works. Having said that a database, by its very nature, brings external state into a test that will affect its behavior, hence we need to pay special attention…

Read