Johannes Link

Software Therapist. Programmer. Supporter.


Public Workshops

Property-based Testing in Java (3 Days)

Automated testing in OO languages - using TDD or other forms of Unit Testing - focuses on example-based test cases, which can easily be written with JUnit or similar tools. However, when looking on functional languages like Haskell or Erlang you often stumble open something different: Property-based Testing (PBT). PBT is based on the idea to specify intended generic properties of our code, and to let the testing library create and execute test cases and data that try to falsify those properties.

In this workshop I will both explain the theory behind Property-Based Testing and demonstrate how to implement it with Java using jqwik, a PBT library implemented as a JUnit 5 test engine. Participants will have time to take their first practical steps to write and run properties. They will also get a feeling for the advantages, challenges and drawbacks of the approach.

Key topics and learning targets are:

  • What is Property-based Testing and how does it compliment example tests
  • jqwik as a mature library to do PBT on the JVM
  • The value of shrinking for PBT
  • Patterns and strategies to find good properties
  • How to build generators for non-trivial domains
  • Combining PBT with Test-Driven Development

Structure

The workshop will happen online using Bluejeans. There will be a mix of lecture, discussion, hands-on exercises and personal coaching. With a maximum of 8 attendees you should expect a high degree of student participation.

Intended Audience

Attendees should have some experience programming in Java and unit testing. Although jqwik is Java-native understanding some of the basic functional programming concepts can help.

You will need an up-to-date Java IDE with at least Java 8 and support for the JUnit 5 platform; IntelliJ and Eclipse are both fine. Your computer also requires access to public resources on Github and Maven Central.

About the Instructor

Johannes has been test-driving the better part of his code for 20 years and is still learning new things about it. He’s interested in many programming languages and fluent in few. Johannes was one of the people behind the JUnit 5 platform effort aka JUnit Lambda. He is the main contributor to jqwik.net.

Next Date

Tue, Nov 10 – Thu, Nov 12, 2020, (09:00 - 16:00 UTC)

Add to Calendar

Registration

The price for the workshop is 1500 EUR (plus VAT). Early booking price (until October 13) is 1000 EUR (plus VAT).

Please register by sending an email to business@johanneslink.net