SlideShare una empresa de Scribd logo
1 de 17
Descargar para leer sin conexión
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

Más contenido relacionado

La actualidad más candente

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
 

La actualidad más candente (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...
 

Destacado

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
 

Destacado (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
 

Similar a 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
 

Similar a 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
 

Último

Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...apidays
 
Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...
Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...
Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...apidays
 
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024Victor Rentea
 
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data DiscoveryTrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data DiscoveryTrustArc
 
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost SavingRepurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost SavingEdi Saputra
 
Corporate and higher education May webinar.pptx
Corporate and higher education May webinar.pptxCorporate and higher education May webinar.pptx
Corporate and higher education May webinar.pptxRustici Software
 
presentation ICT roal in 21st century education
presentation ICT roal in 21st century educationpresentation ICT roal in 21st century education
presentation ICT roal in 21st century educationjfdjdjcjdnsjd
 
Why Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businessWhy Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businesspanagenda
 
Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...
Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...
Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...Orbitshub
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FMESafe Software
 
CNIC Information System with Pakdata Cf In Pakistan
CNIC Information System with Pakdata Cf In PakistanCNIC Information System with Pakdata Cf In Pakistan
CNIC Information System with Pakdata Cf In Pakistandanishmna97
 
Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...apidays
 
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProduct Anonymous
 
FWD Group - Insurer Innovation Award 2024
FWD Group - Insurer Innovation Award 2024FWD Group - Insurer Innovation Award 2024
FWD Group - Insurer Innovation Award 2024The Digital Insurer
 
ICT role in 21st century education and its challenges
ICT role in 21st century education and its challengesICT role in 21st century education and its challenges
ICT role in 21st century education and its challengesrafiqahmad00786416
 
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...DianaGray10
 
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...apidays
 
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...Jeffrey Haguewood
 
Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Finding Java's Hidden Performance Traps @ DevoxxUK 2024Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Finding Java's Hidden Performance Traps @ DevoxxUK 2024Victor Rentea
 

Último (20)

Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
Apidays New York 2024 - Accelerating FinTech Innovation by Vasa Krishnan, Fin...
 
Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...
Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...
Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...
 
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
Modular Monolith - a Practical Alternative to Microservices @ Devoxx UK 2024
 
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data DiscoveryTrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
 
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost SavingRepurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
 
Corporate and higher education May webinar.pptx
Corporate and higher education May webinar.pptxCorporate and higher education May webinar.pptx
Corporate and higher education May webinar.pptx
 
presentation ICT roal in 21st century education
presentation ICT roal in 21st century educationpresentation ICT roal in 21st century education
presentation ICT roal in 21st century education
 
Why Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businessWhy Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire business
 
Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...
Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...
Navigating the Deluge_ Dubai Floods and the Resilience of Dubai International...
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
 
CNIC Information System with Pakdata Cf In Pakistan
CNIC Information System with Pakdata Cf In PakistanCNIC Information System with Pakdata Cf In Pakistan
CNIC Information System with Pakdata Cf In Pakistan
 
Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...
 
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
 
FWD Group - Insurer Innovation Award 2024
FWD Group - Insurer Innovation Award 2024FWD Group - Insurer Innovation Award 2024
FWD Group - Insurer Innovation Award 2024
 
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
 
ICT role in 21st century education and its challenges
ICT role in 21st century education and its challengesICT role in 21st century education and its challenges
ICT role in 21st century education and its challenges
 
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
 
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
 
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
 
Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Finding Java's Hidden Performance Traps @ DevoxxUK 2024Finding Java's Hidden Performance Traps @ DevoxxUK 2024
Finding Java's Hidden Performance Traps @ DevoxxUK 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