PropErty based testing
Upcoming SlideShare
Loading in...5
×
 

PropErty based testing

on

  • 118 views

 

Statistics

Views

Total Views
118
Views on SlideShare
118
Embed Views
0

Actions

Likes
0
Downloads
1
Comments
0

0 Embeds 0

No embeds

Accessibility

Categories

Upload Details

Uploaded via as Adobe PDF

Usage Rights

© All Rights Reserved

Report content

Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
  • Full Name Full Name Comment goes here.
    Are you sure you want to
    Your message goes here
    Processing…
Post Comment
Edit your comment

PropErty based testing PropErty based testing Presentation Transcript

  • PropErty Based Testing Enrique Paz @quiquepaz Rolph de Ruiter 1/10
  • Goals of the day • Underestanding DOs and DON’Ts of PBT • Formulating your own properties for pure functions • Designing and generating test data sets on the fly • And making you eager for more! 2/10
  • Goals of the day • Underestanding DOs and DON’Ts of PBT • Formulating your own properties for pure functions • Designing and generating test data sets on the fly • And making you eager for more! 2/10
  • Goals of the day • Underestanding DOs and DON’Ts of PBT • Formulating your own properties for pure functions • Designing and generating test data sets on the fly • And making you eager for more! 2/10
  • Goals of the day • Underestanding DOs and DON’Ts of PBT • Formulating your own properties for pure functions • Designing and generating test data sets on the fly • And making you eager for more! 2/10
  • Property Based Testing Training Setup • github.com/spilgames/PropEr@ErlangDCRB13 README.md Makefile + rebar src/ with source and properties test/*_eunit.erl as test controllers 3/10
  • Property Based Testing The Idea • What properties should hold? • Properties document your code • Properties generate the testcases • Shrinking towards the smallest input that crashes 4/10
  • Property Based Testing The Idea • What properties should hold? • Properties document your code • Properties generate the testcases • Shrinking towards the smallest input that crashes 4/10
  • Property Based Testing The Idea • What properties should hold? • Properties document your code • Properties generate the testcases • Shrinking towards the smallest input that crashes 4/10
  • Property Based Testing The Idea • What properties should hold? • Properties document your code • Properties generate the testcases • Shrinking towards the smallest input that crashes 4/10
  • Property Based Testing Available Tools • Available for multiple languages • Open Source • Trainings and support (at a price) • Plenty of documentation • Pulse for concurrency issues • Using & contributing via Github 5/10
  • Hands On! A Property 6/10
  • Conclusions The Stuff You’re Supposed To Remember • Start with simple tests • Think properties • Always test your generators first • Test a reasonable success/error rate 7/10
  • Conclusions A Practical View • Property Driven Development is not a thing Thinking properties is hard Refactoring properties is hard Manual basic testcases help you think • Naming is essential • Avoid reimplementating + comparing • PBT finds stuff you’d never think of 8/10
  • Conclusions A Practical View • Property Driven Development is not a thing Thinking properties is hard Refactoring properties is hard Manual basic testcases help you think • Naming is essential • Avoid reimplementating + comparing • PBT finds stuff you’d never think of 8/10
  • Conclusions More Info • PropEr @github • PropEr Docs • Quickcheck For Erlang • Concuerror @github • Concuerror Presentation 9/10
  • Conclusions Questions? Leave us feedback! http://spkr8.com/t/28341 10/10