Presentation: Better Tests, Less Code: Property Based Testing

Location:

Duration

Duration: 
2:55pm - 3:45pm

Persona:

Abstract

Strong testing is the best safety net a developer can have when changing code. A good test suite can prevent regressions and provide confidence that what you put out to the world actually works. However, in the real world writing these tests is extremely difficult. Testing individual cases tends to lead to large amounts of code that must be maintained and often we fail to catch all the corner cases and potential points of failure.

Property Based Testing is a method that tries to overcome these failures by offloading the creation of test cases to the computer. As a developer you describe the input to your algorithms and then define what must be true of any valid output. The computer then takes this and throws random data into your algorithm trying to find a failure. A good framework will then take a failure and reduce it down to a simple case that the developer can debug and solve.

The catch is coming up with these properties can be very difficult. You need to define useful properties! This talk goes over a few patterns that should inspire developers to get started.

Speaker: Matt Bachmann

Software Engineer @Fitbit

As a software engineer at Fitbit Matt is a member of the Commerce team. The Commerce team helps maintain the order pipeline from cart to post purchase support. Prior to his work at Fitbit he worked on content analysis platforms for the identification of PII, PCI, and other potentially sensitive information. He enjoys working with close knit teams and helping stuck developers out of jams. He received a BS degree from Dickinson College and an MS degree from Worcester Polytechnic Institute where he worked on Intelligent Tutoring Systems.

Find Matt Bachmann at

.

Tracks

Monday Nov 7

Tuesday Nov 8

Wednesday Nov 9

Conference for Professional Software Developers