SlideShare ist ein Scribd-Unternehmen logo
1 von 17
Downloaden Sie, um offline zu lesen
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

Weitere ähnliche Inhalte

Was ist angesagt?

8 Simple Rules for Consuming APIs
8 Simple Rules for Consuming APIs8 Simple Rules for Consuming APIs
8 Simple Rules for Consuming APIsSteven Wade
 
PL/Parrot San Francisco Perl Mongers 2010/05/25
PL/Parrot San Francisco Perl Mongers 2010/05/25PL/Parrot San Francisco Perl Mongers 2010/05/25
PL/Parrot San Francisco Perl Mongers 2010/05/25David Fetter
 
How to Use Selenium, Successfully
How to Use Selenium, SuccessfullyHow to Use Selenium, Successfully
How to Use Selenium, SuccessfullySauce Labs
 
Webservices: The RESTful Approach
Webservices: The RESTful ApproachWebservices: The RESTful Approach
Webservices: The RESTful ApproachMushfekur Rahman
 
"GitHub com for lazy in cloud project management" by Sergejs Matancevs from S...
"GitHub com for lazy in cloud project management" by Sergejs Matancevs from S..."GitHub com for lazy in cloud project management" by Sergejs Matancevs from S...
"GitHub com for lazy in cloud project management" by Sergejs Matancevs from S...DevClub_lv
 

Was ist angesagt? (9)

8 Simple Rules for Consuming APIs
8 Simple Rules for Consuming APIs8 Simple Rules for Consuming APIs
8 Simple Rules for Consuming APIs
 
Tips to improve your code review
Tips to improve your code reviewTips to improve your code review
Tips to improve your code review
 
PL/Parrot San Francisco Perl Mongers 2010/05/25
PL/Parrot San Francisco Perl Mongers 2010/05/25PL/Parrot San Francisco Perl Mongers 2010/05/25
PL/Parrot San Francisco Perl Mongers 2010/05/25
 
Fundamentos de Node.js
Fundamentos de Node.jsFundamentos de Node.js
Fundamentos de Node.js
 
How to Use Selenium, Successfully
How to Use Selenium, SuccessfullyHow to Use Selenium, Successfully
How to Use Selenium, Successfully
 
Testing in GO
Testing in GOTesting in GO
Testing in GO
 
Webservices: The RESTful Approach
Webservices: The RESTful ApproachWebservices: The RESTful Approach
Webservices: The RESTful Approach
 
Hands on Gradle
Hands on GradleHands on Gradle
Hands on Gradle
 
"GitHub com for lazy in cloud project management" by Sergejs Matancevs from S...
"GitHub com for lazy in cloud project management" by Sergejs Matancevs from S..."GitHub com for lazy in cloud project management" by Sergejs Matancevs from S...
"GitHub com for lazy in cloud project management" by Sergejs Matancevs from S...
 

Andere mochten auch

Testing an Erlang Backend
Testing an Erlang BackendTesting an Erlang Backend
Testing an Erlang Backendenriquepazperez
 
A Widget Based Web Platform
A Widget Based Web PlatformA Widget Based Web Platform
A Widget Based Web Platformenriquepazperez
 
Spilgames Storage Platform
Spilgames Storage PlatformSpilgames Storage Platform
Spilgames Storage Platformenriquepazperez
 
Caching Strategies for an Erlang Based Web Stack
Caching Strategies for an Erlang Based Web StackCaching Strategies for an Erlang Based Web Stack
Caching Strategies for an Erlang Based Web Stackenriquepazperez
 
Erlang Developments: The Good, The Bad and The Ugly
Erlang Developments: The Good, The Bad and The UglyErlang Developments: The Good, The Bad and The Ugly
Erlang Developments: The Good, The Bad and The Uglyenriquepazperez
 

Andere mochten auch (6)

Testing an Erlang Backend
Testing an Erlang BackendTesting an Erlang Backend
Testing an Erlang Backend
 
A Widget Based Web Platform
A Widget Based Web PlatformA Widget Based Web Platform
A Widget Based Web Platform
 
A Web Widget Platform
A Web Widget PlatformA Web Widget Platform
A Web Widget Platform
 
Spilgames Storage Platform
Spilgames Storage PlatformSpilgames Storage Platform
Spilgames Storage Platform
 
Caching Strategies for an Erlang Based Web Stack
Caching Strategies for an Erlang Based Web StackCaching Strategies for an Erlang Based Web Stack
Caching Strategies for an Erlang Based Web Stack
 
Erlang Developments: The Good, The Bad and The Ugly
Erlang Developments: The Good, The Bad and The UglyErlang Developments: The Good, The Bad and The Ugly
Erlang Developments: The Good, The Bad and The Ugly
 

Ähnlich wie PropErty based testing

14 Habits of Great SQL Developers
14 Habits of Great SQL Developers14 Habits of Great SQL Developers
14 Habits of Great SQL DevelopersIke Ellis
 
14 Habits of Great SQL Developers
14 Habits of Great SQL Developers14 Habits of Great SQL Developers
14 Habits of Great SQL DevelopersIke Ellis
 
.NET executable requirements
.NET executable requirements.NET executable requirements
.NET executable requirementsGodfrey Nolan
 
Completely Test-Driven
Completely Test-DrivenCompletely Test-Driven
Completely Test-DrivenIan Truslove
 
Abinitio online training in canada
Abinitio online training in canadaAbinitio online training in canada
Abinitio online training in canadaBOUNDTECH
 
Evernote Business Tips by Ross & Ross International
Evernote Business Tips by Ross & Ross InternationalEvernote Business Tips by Ross & Ross International
Evernote Business Tips by Ross & Ross InternationalRoss & Ross International
 
Becoming a more productive Rails Developer
Becoming a more productive Rails DeveloperBecoming a more productive Rails Developer
Becoming a more productive Rails DeveloperJohn McCaffrey
 
PowerShell Introduction to Administering SharePoint On-Premises & O365
PowerShell Introduction to Administering SharePoint On-Premises & O365PowerShell Introduction to Administering SharePoint On-Premises & O365
PowerShell Introduction to Administering SharePoint On-Premises & O365Michael Greene
 
Intro TDD Portuguese developers meetup London 16/04/2014
Intro TDD Portuguese developers meetup London 16/04/2014Intro TDD Portuguese developers meetup London 16/04/2014
Intro TDD Portuguese developers meetup London 16/04/2014Pedro Santos
 
Test Driven Development on Android (Kotlin Kenya)
Test Driven Development on Android (Kotlin Kenya)Test Driven Development on Android (Kotlin Kenya)
Test Driven Development on Android (Kotlin Kenya)Danny Preussler
 
Automated Visual Regression Testing by Dave Sadlon
Automated Visual Regression Testing by Dave SadlonAutomated Visual Regression Testing by Dave Sadlon
Automated Visual Regression Testing by Dave SadlonQA or the Highway
 
How to audit Drupal Sites for performance, content and best practices
How to audit Drupal Sites for performance, content and best practicesHow to audit Drupal Sites for performance, content and best practices
How to audit Drupal Sites for performance, content and best practicesJon Peck
 
Driving application development through behavior driven development
Driving application development through behavior driven developmentDriving application development through behavior driven development
Driving application development through behavior driven developmentEinar Ingebrigtsen
 
Becoming a more Productive Rails Developer
Becoming a more Productive Rails DeveloperBecoming a more Productive Rails Developer
Becoming a more Productive Rails DeveloperJohn McCaffrey
 
Behavior Driven Development
Behavior Driven DevelopmentBehavior Driven Development
Behavior Driven DevelopmentNETUserGroupBern
 
Lean-Agile SharePoint Development
Lean-Agile SharePoint DevelopmentLean-Agile SharePoint Development
Lean-Agile SharePoint DevelopmentBill Ayers
 
Dev opsdays scriptcode
Dev opsdays scriptcodeDev opsdays scriptcode
Dev opsdays scriptcodeDevopsdays
 
CI doesn’t start with Jenkins
CI doesn’t start with JenkinsCI doesn’t start with Jenkins
CI doesn’t start with JenkinsYuriy Rochnyak
 
Introduction to Test Driven Development
Introduction to Test Driven DevelopmentIntroduction to Test Driven Development
Introduction to Test Driven DevelopmentSarah Dutkiewicz
 

Ähnlich wie PropErty based testing (20)

14 Habits of Great SQL Developers
14 Habits of Great SQL Developers14 Habits of Great SQL Developers
14 Habits of Great SQL Developers
 
14 Habits of Great SQL Developers
14 Habits of Great SQL Developers14 Habits of Great SQL Developers
14 Habits of Great SQL Developers
 
.NET executable requirements
.NET executable requirements.NET executable requirements
.NET executable requirements
 
Completely Test-Driven
Completely Test-DrivenCompletely Test-Driven
Completely Test-Driven
 
API Tools.pptx
API Tools.pptxAPI Tools.pptx
API Tools.pptx
 
Abinitio online training in canada
Abinitio online training in canadaAbinitio online training in canada
Abinitio online training in canada
 
Evernote Business Tips by Ross & Ross International
Evernote Business Tips by Ross & Ross InternationalEvernote Business Tips by Ross & Ross International
Evernote Business Tips by Ross & Ross International
 
Becoming a more productive Rails Developer
Becoming a more productive Rails DeveloperBecoming a more productive Rails Developer
Becoming a more productive Rails Developer
 
PowerShell Introduction to Administering SharePoint On-Premises & O365
PowerShell Introduction to Administering SharePoint On-Premises & O365PowerShell Introduction to Administering SharePoint On-Premises & O365
PowerShell Introduction to Administering SharePoint On-Premises & O365
 
Intro TDD Portuguese developers meetup London 16/04/2014
Intro TDD Portuguese developers meetup London 16/04/2014Intro TDD Portuguese developers meetup London 16/04/2014
Intro TDD Portuguese developers meetup London 16/04/2014
 
Test Driven Development on Android (Kotlin Kenya)
Test Driven Development on Android (Kotlin Kenya)Test Driven Development on Android (Kotlin Kenya)
Test Driven Development on Android (Kotlin Kenya)
 
Automated Visual Regression Testing by Dave Sadlon
Automated Visual Regression Testing by Dave SadlonAutomated Visual Regression Testing by Dave Sadlon
Automated Visual Regression Testing by Dave Sadlon
 
How to audit Drupal Sites for performance, content and best practices
How to audit Drupal Sites for performance, content and best practicesHow to audit Drupal Sites for performance, content and best practices
How to audit Drupal Sites for performance, content and best practices
 
Driving application development through behavior driven development
Driving application development through behavior driven developmentDriving application development through behavior driven development
Driving application development through behavior driven development
 
Becoming a more Productive Rails Developer
Becoming a more Productive Rails DeveloperBecoming a more Productive Rails Developer
Becoming a more Productive Rails Developer
 
Behavior Driven Development
Behavior Driven DevelopmentBehavior Driven Development
Behavior Driven Development
 
Lean-Agile SharePoint Development
Lean-Agile SharePoint DevelopmentLean-Agile SharePoint Development
Lean-Agile SharePoint Development
 
Dev opsdays scriptcode
Dev opsdays scriptcodeDev opsdays scriptcode
Dev opsdays scriptcode
 
CI doesn’t start with Jenkins
CI doesn’t start with JenkinsCI doesn’t start with Jenkins
CI doesn’t start with Jenkins
 
Introduction to Test Driven Development
Introduction to Test Driven DevelopmentIntroduction to Test Driven Development
Introduction to Test Driven Development
 

Kürzlich hochgeladen

Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slidevu2urc
 
CNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of ServiceCNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of Servicegiselly40
 
Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...Enterprise Knowledge
 
[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdfhans926745
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerThousandEyes
 
Real Time Object Detection Using Open CV
Real Time Object Detection Using Open CVReal Time Object Detection Using Open CV
Real Time Object Detection Using Open CVKhem
 
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...apidays
 
08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking MenDelhi Call girls
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Drew Madelung
 
The Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxThe Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxMalak Abu Hammad
 
How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonetsnaman860154
 
Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreterPresentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreternaman860154
 
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfThe Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfEnterprise Knowledge
 
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024The Digital Insurer
 
Automating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps ScriptAutomating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps Scriptwesley chun
 
Factors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptxFactors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptxKatpro Technologies
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationSafe Software
 
08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking MenDelhi Call girls
 
Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)wesley chun
 
A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024Results
 

Kürzlich hochgeladen (20)

Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slide
 
CNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of ServiceCNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of Service
 
Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...
 
[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
Real Time Object Detection Using Open CV
Real Time Object Detection Using Open CVReal Time Object Detection Using Open CV
Real Time Object Detection Using Open CV
 
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
 
08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
 
The Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxThe Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptx
 
How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonets
 
Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreterPresentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreter
 
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdfThe Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
The Role of Taxonomy and Ontology in Semantic Layers - Heather Hedden.pdf
 
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024
 
Automating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps ScriptAutomating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps Script
 
Factors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptxFactors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptx
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
 
08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men
 
Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)
 
A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024
 

PropErty based testing

  • 1. PropErty Based Testing Enrique Paz @quiquepaz Rolph de Ruiter 1/10
  • 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. 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. 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. 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. 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. 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. 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. 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. 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. 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
  • 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. 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. 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. Conclusions More Info • PropEr @github • PropEr Docs • Quickcheck For Erlang • Concuerror @github • Concuerror Presentation 9/10
  • 17. Conclusions Questions? Leave us feedback! http://spkr8.com/t/28341 10/10