The Roman theatre in Bosra by Alessandra Kocman This is the second part of the post series dedicated to quality of automated tests. In the previous part I wrote about test names and granularity. Today I am going to focus on test data setup, its readability and how it is related with the evolution of … Continue reading "Storytelling with tests #2: setting up the stage"
Read MoreCategory: Testing
Spring tips #1: structuring configuration for integration tests
Spring comes with a lot of features which support integration testing. We have MockMvc, TestRestTemplate and many other useful utilities. Nevertheless, building a proper test context for our app rests in our hands, and there are some pitfalls along the road. In today's article I would like to show you how to avoid one of them
Read MoreStorytelling with tests #1: test names and granularity
Very often you can hear that automated tests provide a great documentation of the production code. Such documentation is more fun to write and is always up to date (of course as long as you actually run your tests). A new developer may take a look on the tests to get familiar with the project. … Continue reading "Storytelling with tests #1: test names and granularity"
Read MoreCustom fluent assertions with AssertJ
More often than not, developers put much less attention to the test code than to the production code. Libraries and frameworks, fluent APIs or just clean code in general are terms we usually connect with actual production code and not with tests. But investing some time to use them in test code can pay off very quickly.
Read MoreAutomated validation of DB schema migrations
Object Relational Mapping frameworks, such as Hibernate, very often provide a way to automatically generate the database schema based on persistent classes. While it is very convenient as a proof of concept or for very simple applications, it is not a production ready approach. In reality you have to write scripts to version your schema … Continue reading "Automated validation of DB schema migrations"
Read More