SlideShare uma empresa Scribd logo
1 de 17
Baixar para ler offline
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

Mais conteúdo relacionado

Mais procurados

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
 

Mais procurados (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...
 

Destaque

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
 

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

Semelhante 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
 

Semelhante 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

2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...Martijn de Jong
 
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, AdobeApidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobeapidays
 
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
 
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
 
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
 
Architecting Cloud Native Applications
Architecting Cloud Native ApplicationsArchitecting Cloud Native Applications
Architecting Cloud Native ApplicationsWSO2
 
MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024MIND CTI
 
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
 
Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin WoodPolkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin WoodJuan lago vázquez
 
Artificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : UncertaintyArtificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : UncertaintyKhushali Kathiriya
 
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc
 
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot TakeoffStrategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoffsammart93
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonAnna Loughnan Colquhoun
 
Manulife - Insurer Transformation Award 2024
Manulife - Insurer Transformation Award 2024Manulife - Insurer Transformation Award 2024
Manulife - Insurer Transformation Award 2024The Digital Insurer
 
Apidays Singapore 2024 - Scalable LLM APIs for AI and Generative AI Applicati...
Apidays Singapore 2024 - Scalable LLM APIs for AI and Generative AI Applicati...Apidays Singapore 2024 - Scalable LLM APIs for AI and Generative AI Applicati...
Apidays Singapore 2024 - Scalable LLM APIs for AI and Generative AI Applicati...apidays
 
"I see eyes in my soup": How Delivery Hero implemented the safety system for ...
"I see eyes in my soup": How Delivery Hero implemented the safety system for ..."I see eyes in my soup": How Delivery Hero implemented the safety system for ...
"I see eyes in my soup": How Delivery Hero implemented the safety system for ...Zilliz
 
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWEREMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWERMadyBayot
 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfsudhanshuwaghmare1
 
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
 

Último (20)

2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...
 
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, AdobeApidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
 
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...
 
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
 
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
 
Architecting Cloud Native Applications
Architecting Cloud Native ApplicationsArchitecting Cloud Native Applications
Architecting Cloud Native Applications
 
MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024
 
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
 
Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin WoodPolkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
 
Artificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : UncertaintyArtificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : Uncertainty
 
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
 
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot TakeoffStrategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt Robison
 
Manulife - Insurer Transformation Award 2024
Manulife - Insurer Transformation Award 2024Manulife - Insurer Transformation Award 2024
Manulife - Insurer Transformation Award 2024
 
Apidays Singapore 2024 - Scalable LLM APIs for AI and Generative AI Applicati...
Apidays Singapore 2024 - Scalable LLM APIs for AI and Generative AI Applicati...Apidays Singapore 2024 - Scalable LLM APIs for AI and Generative AI Applicati...
Apidays Singapore 2024 - Scalable LLM APIs for AI and Generative AI Applicati...
 
"I see eyes in my soup": How Delivery Hero implemented the safety system for ...
"I see eyes in my soup": How Delivery Hero implemented the safety system for ..."I see eyes in my soup": How Delivery Hero implemented the safety system for ...
"I see eyes in my soup": How Delivery Hero implemented the safety system for ...
 
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWEREMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdf
 
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...
 

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