Modern Testing Patterns

As presented @ ArnhemJUG

Session Content Slides Slides available as pdf. Code The code is available on Github <3 Discussed Topics: Mutation Testing for Java: PiTest Mutation Testing for Javascript/Scala/C#: Stryker EqualsVerifier H2 database Liquibase WireMock TestContainers Consumer Contracts Q&A Feel free to reach out to me @TCoolsIT on Twitter if you have additional questions! How do you handle Data? Do you clear the database between each test? Actually, we have a BeforeEach somewhere in our code which runs a ton of TRUNCATE statements on all tables that can be truncated. [Read More]

Use Testcontainers to create a Docker Test Image

Tackle those long Liquibase/Flyway changelogs or setup your testdata from code!

TLDR?! You can always just check out the example on Github. Prerequisites: You should be familiar with JUnit, Testcontainers and have some fundamental Docker knowledge. I’ve seen a lot of projects use a database management tool like Flyway or Liquibase to update their databases. In production, only a small part of the changelog will need to run because most of the changes have already been applied in previous deployments. 🚀 [Read More]

Modern Testing Patterns

As presented @ Jfokus

Session Content Slides Slides available as pdf. Video Code The code is available on Github <3 Discussed Topics: Mutation Testing for Java: PiTest Mutation Testing for JS, C# and Scala: Stryker Liquibase WireMock TestContainers Consumer Contracts Q&A Mutation Testing could take a long time. When is a good time to run it? It is absolutly true that mutation testing can take a long time, so it’s not always practical to run it in every build. [Read More]

Advanced Testing Patterns

As presented @ Info Support Knowledge Night

This session was presented together with my dear colleague Hugo! Check him out on Twitter: 👉 https://twitter.com/Hugo_vrijswijk Session Content Slides Slides available as pdf. Code The code is available on Github <3 Discussed Topics: Mutation Testing for Java: PiTest Mutation Testing for JS, C# and Scala: Stryker Liquibase WireMock TestContainers Consumer Contracts Q&A Do you have some more examples of Contract Testing? Well, I don’t have a lot of examples I can publicly share. [Read More]

Advanced Testing Patterns

As presented @ JNation

Session Content Slides Slides available as pdf. Code The code is available on Github <3 Discussed Topics: Mutation Testing for Java: PiTest Mutation Testing for Javascript/Scala/C#: Stryker EqualsVerifier H2 database Liquibase WireMock TestContainers Consumer Contracts Q&A Feel free to reach out to me @TCoolsIT on Twitter if you have additional questions! How do you handle Data? Do you clear the database between each test? Actually, we have a BeforeEach somewhere in our code which runs a ton of TRUNCATE statements on all tables that can be truncated. [Read More]

Advanced Testing Patterns

As presented @ Computerfutures

Session Content Slides Slides available as pdf. Code The code is available on Github <3 Discussed Topics: H2 database Liquibase WireMock TestContainers Consumer Contracts Q&A Do the tools described only work with Spring? No! They are separate projects in their own right. The only one that is VERY closely related to Spring are the Spring Cloud Contracts. I’ve tried to figure it out, but I’m pretty sure you still need Spring for that one. [Read More]

Advanced Testing Patterns

As presented @ KDG University College

Session Content Slides Slides available as pdf. Code The code is available on Github <3 Discussed Topics: H2 database Liquibase WireMock TestContainers Consumer Contracts Q&A Why do you call the instance of the class you are testing “sut”? “sut” is short for “Subject/System Under Test” and makes it clear what class the focus of the test is. If your testclass is very big, I have found that using “sut” is easier than relying on the name of the testclass (scrolling up). [Read More]