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 ...
Goals of the day

• Underestanding DOs and DON’Ts of PBT
• Formulating your own properties for pure functions
• Designing ...
Goals of the day

• Underestanding DOs and DON’Ts of PBT
• Formulating your own properties for pure functions
• Designing ...
Goals of the day

• Underestanding DOs and DON’Ts of PBT
• Formulating your own properties for pure functions
• Designing ...
Property Based Testing

Training Setup

• github.com/spilgames/PropEr@ErlangDCRB13
README.md
Makefile + rebar
src/ with sou...
Property Based Testing

The Idea

• What properties should hold?
• Properties document your code
• Properties generate the...
Property Based Testing

The Idea

• What properties should hold?
• Properties document your code
• Properties generate the...
Property Based Testing

The Idea

• What properties should hold?
• Properties document your code
• Properties generate the...
Property Based Testing

The Idea

• What properties should hold?
• Properties document your code
• Properties generate the...
Property Based Testing

Available Tools

• Available for multiple languages
• Open Source

• Trainings and support (at a p...
Hands On!

A Property

6/10
Conclusions

The Stuff You’re Supposed To Remember

• Start with simple tests
• Think properties
• Always test your genera...
Conclusions

A Practical View

• Property Driven Development is not a thing
Thinking properties is hard
Refactoring proper...
Conclusions

A Practical View

• Property Driven Development is not a thing
Thinking properties is hard
Refactoring proper...
Conclusions

More Info

• PropEr @github
• PropEr Docs
• Quickcheck For Erlang
• Concuerror @github
• Concuerror Presentat...
Conclusions

Questions?

Leave us feedback! http://spkr8.com/t/28341

10/10
Upcoming SlideShare
Loading in...5
×

PropErty based testing

158

Published on

Published in: Technology, Business
0 Comments
0 Likes
Statistics
Notes
  • Be the first to comment

  • Be the first to like this

No Downloads
Views
Total Views
158
On Slideshare
0
From Embeds
0
Number of Embeds
0
Actions
Shares
0
Downloads
4
Comments
0
Likes
0
Embeds 0
No embeds

No notes for slide

PropErty based testing

  1. 1. PropErty Based Testing Enrique Paz @quiquepaz Rolph de Ruiter 1/10
  2. 2. 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
  3. 3. 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
  4. 4. 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
  5. 5. 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
  6. 6. 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
  7. 7. 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
  8. 8. 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
  9. 9. 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
  10. 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
  11. 11. 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
  12. 12. Hands On! A Property 6/10
  13. 13. 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
  14. 14. 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
  15. 15. 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
  16. 16. Conclusions More Info • PropEr @github • PropEr Docs • Quickcheck For Erlang • Concuerror @github • Concuerror Presentation 9/10
  17. 17. Conclusions Questions? Leave us feedback! http://spkr8.com/t/28341 10/10
  1. A particular slide catching your eye?

    Clipping is a handy way to collect important slides you want to go back to later.

×