SlideShare una empresa de Scribd logo
1 de 18
Descargar para leer sin conexión
J AVA S C R I P T T E S T I N G
S T R AT E G I E S
D I WA D E L M U N D O , V O YA G E R I N N O VA T I O N S
M A N I L A . J S F R I D A Y S M E E T U P
A P R I L 8 , 2 0 1 5
A - S PA C E , M A K A T I , P H I L I P P I N E S
S H O R T B A C K G R O U N D A B O U T M E
• Almost a decade of software dev experience
• Work exp local startups (LPI, self) and Singapore (Viki)
• Ruby on Rails, JavaScript, Linux, AWS
• CISSP, AWS Certified SA, CPISI (PCI-DSS)
T E S T I N G S P E C T R U M
UNIT INTEGRATION END-TO-END
functions,
modules
components,
API tests
UI,
application
3 S T R AT E G I E S F O R T E S T I N G
• Enforce code standards
• Cultivate “testing” mindset
• Use good tools
1 . E N F O R C E C O D E
S TA N D A R D S
• Code guideline (syntax)
• Code review
• Standard for managing
continuation-passing style
(CPS)
C O D E
G U I D E L I N E
• Be particular about syntax
(bracing, spacing, etc)
• Document, e.g.
“CodeGuidelines.md”
• Project code should look
like it was written by 1
person
Image From https://github.com/airbnb/javascript
C O D E R E V I E W S
• Find faults, issues, etc
• Review code quality (plato)
• Test coverage (istanbul)
npm install plato -g
npm install istanbul -g
Have a standard for continuation passing style
(CPS)
O P T I O N S F O R C P S
NAMED
STYLE
Promises ES6: Generators
Libraries like async, synchronize,
fibers
A S Y N C + N A M E D
F U N C T I O N S
F O R C E S
D E V E L O P E R T O
W R I T E
U N I T- T E S TA B L E
C O D E
M Y P R E F E R R E D S T Y L E
“ S H AW D O W
O B J E C T S ”
2 . C U LT I VAT E
T E S T I N G M I N D S E T
• Write tests. Try to do full
testing spectrum
• Have discussions on how
to test
• Think outside box
H O W D O Y O U T E S T T H I S ?
3. Good Tools
T E S T
F R A M E W O R K :
M O C H A
A S S E RT I O N S T Y L E :
C H A I
T E S T D O U B L E S :
S I N O N
C O D E Q U A L I T Y:
P L AT O
T E S T C O V E R A G E :
I S TA N B U L
R E Q U E S T
R E C O R D E R :
N O C K
E N D - T O - E N D :
K A R M A
TA K E A WAY
• ENFORCE CODE STANDARDS
• CULTIVATE TESTING MINDSET
• USE GOOD TOOLS
• Rule of thumb: test to minimise problems, not
test for the sake of testing

Más contenido relacionado

Similar a Testable JavaScript Strategies

Systematic Unit Testing
Systematic Unit TestingSystematic Unit Testing
Systematic Unit Testingscotchfield
 
So You Want to Start Refactoring?
So You Want to Start Refactoring?So You Want to Start Refactoring?
So You Want to Start Refactoring?jillianefoley
 
Switching horses midstream - From Waterfall to Agile
Switching horses midstream - From Waterfall to AgileSwitching horses midstream - From Waterfall to Agile
Switching horses midstream - From Waterfall to AgileDoc Norton
 
Microservices Delivery Platform. Tips & Tricks
Microservices Delivery Platform. Tips & TricksMicroservices Delivery Platform. Tips & Tricks
Microservices Delivery Platform. Tips & TricksAndrey Trubitsyn
 
PowerPoint Presentation about Programming 101 for Girls
PowerPoint Presentation about Programming 101 for GirlsPowerPoint Presentation about Programming 101 for Girls
PowerPoint Presentation about Programming 101 for GirlsImelda Reyes
 
Create an IoT Gateway and Establish a Data Pipeline to AWS IoT with Intel - I...
Create an IoT Gateway and Establish a Data Pipeline to AWS IoT with Intel - I...Create an IoT Gateway and Establish a Data Pipeline to AWS IoT with Intel - I...
Create an IoT Gateway and Establish a Data Pipeline to AWS IoT with Intel - I...Amazon Web Services
 
So You Want to be an OpenStack Contributor
So You Want to be an OpenStack ContributorSo You Want to be an OpenStack Contributor
So You Want to be an OpenStack ContributorAnne Gentle
 
Completely Test-Driven
Completely Test-DrivenCompletely Test-Driven
Completely Test-DrivenIan Truslove
 
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
 
App sec and quality london - may 2016 - v0.5
App sec and quality   london -  may 2016 - v0.5App sec and quality   london -  may 2016 - v0.5
App sec and quality london - may 2016 - v0.5Dinis Cruz
 

Similar a Testable JavaScript Strategies (20)

Systematic Unit Testing
Systematic Unit TestingSystematic Unit Testing
Systematic Unit Testing
 
New Android Languages
New Android LanguagesNew Android Languages
New Android Languages
 
The Road to QA
The Road to QAThe Road to QA
The Road to QA
 
Deployments in one click!
Deployments in one click!Deployments in one click!
Deployments in one click!
 
Pair Programming
Pair ProgrammingPair Programming
Pair Programming
 
SOA Latam 2015
SOA Latam 2015SOA Latam 2015
SOA Latam 2015
 
So You Want to Start Refactoring?
So You Want to Start Refactoring?So You Want to Start Refactoring?
So You Want to Start Refactoring?
 
Switching horses midstream - From Waterfall to Agile
Switching horses midstream - From Waterfall to AgileSwitching horses midstream - From Waterfall to Agile
Switching horses midstream - From Waterfall to Agile
 
Microservices Delivery Platform. Tips & Tricks
Microservices Delivery Platform. Tips & TricksMicroservices Delivery Platform. Tips & Tricks
Microservices Delivery Platform. Tips & Tricks
 
UX as Cross Company Culture
UX as Cross Company CultureUX as Cross Company Culture
UX as Cross Company Culture
 
The Swift Architect
The Swift ArchitectThe Swift Architect
The Swift Architect
 
PowerPoint Presentation about Programming 101 for Girls
PowerPoint Presentation about Programming 101 for GirlsPowerPoint Presentation about Programming 101 for Girls
PowerPoint Presentation about Programming 101 for Girls
 
Create an IoT Gateway and Establish a Data Pipeline to AWS IoT with Intel - I...
Create an IoT Gateway and Establish a Data Pipeline to AWS IoT with Intel - I...Create an IoT Gateway and Establish a Data Pipeline to AWS IoT with Intel - I...
Create an IoT Gateway and Establish a Data Pipeline to AWS IoT with Intel - I...
 
atlas ti introduction
atlas ti introductionatlas ti introduction
atlas ti introduction
 
So You Want to be an OpenStack Contributor
So You Want to be an OpenStack ContributorSo You Want to be an OpenStack Contributor
So You Want to be an OpenStack Contributor
 
Completely Test-Driven
Completely Test-DrivenCompletely Test-Driven
Completely Test-Driven
 
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)
 
App sec and quality london - may 2016 - v0.5
App sec and quality   london -  may 2016 - v0.5App sec and quality   london -  may 2016 - v0.5
App sec and quality london - may 2016 - v0.5
 
Module
ModuleModule
Module
 
BoSUSA18 | Bob Moesta| The 5 Skills Of An Innovator
BoSUSA18 | Bob Moesta| The 5 Skills Of An InnovatorBoSUSA18 | Bob Moesta| The 5 Skills Of An Innovator
BoSUSA18 | Bob Moesta| The 5 Skills Of An Innovator
 

Último

英国UN学位证,北安普顿大学毕业证书1:1制作
英国UN学位证,北安普顿大学毕业证书1:1制作英国UN学位证,北安普顿大学毕业证书1:1制作
英国UN学位证,北安普顿大学毕业证书1:1制作qr0udbr0
 
Introduction Computer Science - Software Design.pdf
Introduction Computer Science - Software Design.pdfIntroduction Computer Science - Software Design.pdf
Introduction Computer Science - Software Design.pdfFerryKemperman
 
Exploring Selenium_Appium Frameworks for Seamless Integration with HeadSpin.pdf
Exploring Selenium_Appium Frameworks for Seamless Integration with HeadSpin.pdfExploring Selenium_Appium Frameworks for Seamless Integration with HeadSpin.pdf
Exploring Selenium_Appium Frameworks for Seamless Integration with HeadSpin.pdfkalichargn70th171
 
Odoo 14 - eLearning Module In Odoo 14 Enterprise
Odoo 14 - eLearning Module In Odoo 14 EnterpriseOdoo 14 - eLearning Module In Odoo 14 Enterprise
Odoo 14 - eLearning Module In Odoo 14 Enterprisepreethippts
 
Catch the Wave: SAP Event-Driven and Data Streaming for the Intelligence Ente...
Catch the Wave: SAP Event-Driven and Data Streaming for the Intelligence Ente...Catch the Wave: SAP Event-Driven and Data Streaming for the Intelligence Ente...
Catch the Wave: SAP Event-Driven and Data Streaming for the Intelligence Ente...confluent
 
Balasore Best It Company|| Top 10 IT Company || Balasore Software company Odisha
Balasore Best It Company|| Top 10 IT Company || Balasore Software company OdishaBalasore Best It Company|| Top 10 IT Company || Balasore Software company Odisha
Balasore Best It Company|| Top 10 IT Company || Balasore Software company Odishasmiwainfosol
 
Unveiling the Future: Sylius 2.0 New Features
Unveiling the Future: Sylius 2.0 New FeaturesUnveiling the Future: Sylius 2.0 New Features
Unveiling the Future: Sylius 2.0 New FeaturesŁukasz Chruściel
 
Machine Learning Software Engineering Patterns and Their Engineering
Machine Learning Software Engineering Patterns and Their EngineeringMachine Learning Software Engineering Patterns and Their Engineering
Machine Learning Software Engineering Patterns and Their EngineeringHironori Washizaki
 
Open Source Summit NA 2024: Open Source Cloud Costs - OpenCost's Impact on En...
Open Source Summit NA 2024: Open Source Cloud Costs - OpenCost's Impact on En...Open Source Summit NA 2024: Open Source Cloud Costs - OpenCost's Impact on En...
Open Source Summit NA 2024: Open Source Cloud Costs - OpenCost's Impact on En...Matt Ray
 
Implementing Zero Trust strategy with Azure
Implementing Zero Trust strategy with AzureImplementing Zero Trust strategy with Azure
Implementing Zero Trust strategy with AzureDinusha Kumarasiri
 
Comparing Linux OS Image Update Models - EOSS 2024.pdf
Comparing Linux OS Image Update Models - EOSS 2024.pdfComparing Linux OS Image Update Models - EOSS 2024.pdf
Comparing Linux OS Image Update Models - EOSS 2024.pdfDrew Moseley
 
Recruitment Management Software Benefits (Infographic)
Recruitment Management Software Benefits (Infographic)Recruitment Management Software Benefits (Infographic)
Recruitment Management Software Benefits (Infographic)Hr365.us smith
 
Taming Distributed Systems: Key Insights from Wix's Large-Scale Experience - ...
Taming Distributed Systems: Key Insights from Wix's Large-Scale Experience - ...Taming Distributed Systems: Key Insights from Wix's Large-Scale Experience - ...
Taming Distributed Systems: Key Insights from Wix's Large-Scale Experience - ...Natan Silnitsky
 
cpct NetworkING BASICS AND NETWORK TOOL.ppt
cpct NetworkING BASICS AND NETWORK TOOL.pptcpct NetworkING BASICS AND NETWORK TOOL.ppt
cpct NetworkING BASICS AND NETWORK TOOL.pptrcbcrtm
 
Software Project Health Check: Best Practices and Techniques for Your Product...
Software Project Health Check: Best Practices and Techniques for Your Product...Software Project Health Check: Best Practices and Techniques for Your Product...
Software Project Health Check: Best Practices and Techniques for Your Product...Velvetech LLC
 
SuccessFactors 1H 2024 Release - Sneak-Peek by Deloitte Germany
SuccessFactors 1H 2024 Release - Sneak-Peek by Deloitte GermanySuccessFactors 1H 2024 Release - Sneak-Peek by Deloitte Germany
SuccessFactors 1H 2024 Release - Sneak-Peek by Deloitte GermanyChristoph Pohl
 
Folding Cheat Sheet #4 - fourth in a series
Folding Cheat Sheet #4 - fourth in a seriesFolding Cheat Sheet #4 - fourth in a series
Folding Cheat Sheet #4 - fourth in a seriesPhilip Schwarz
 

Último (20)

英国UN学位证,北安普顿大学毕业证书1:1制作
英国UN学位证,北安普顿大学毕业证书1:1制作英国UN学位证,北安普顿大学毕业证书1:1制作
英国UN学位证,北安普顿大学毕业证书1:1制作
 
Introduction Computer Science - Software Design.pdf
Introduction Computer Science - Software Design.pdfIntroduction Computer Science - Software Design.pdf
Introduction Computer Science - Software Design.pdf
 
Exploring Selenium_Appium Frameworks for Seamless Integration with HeadSpin.pdf
Exploring Selenium_Appium Frameworks for Seamless Integration with HeadSpin.pdfExploring Selenium_Appium Frameworks for Seamless Integration with HeadSpin.pdf
Exploring Selenium_Appium Frameworks for Seamless Integration with HeadSpin.pdf
 
Odoo 14 - eLearning Module In Odoo 14 Enterprise
Odoo 14 - eLearning Module In Odoo 14 EnterpriseOdoo 14 - eLearning Module In Odoo 14 Enterprise
Odoo 14 - eLearning Module In Odoo 14 Enterprise
 
Catch the Wave: SAP Event-Driven and Data Streaming for the Intelligence Ente...
Catch the Wave: SAP Event-Driven and Data Streaming for the Intelligence Ente...Catch the Wave: SAP Event-Driven and Data Streaming for the Intelligence Ente...
Catch the Wave: SAP Event-Driven and Data Streaming for the Intelligence Ente...
 
Balasore Best It Company|| Top 10 IT Company || Balasore Software company Odisha
Balasore Best It Company|| Top 10 IT Company || Balasore Software company OdishaBalasore Best It Company|| Top 10 IT Company || Balasore Software company Odisha
Balasore Best It Company|| Top 10 IT Company || Balasore Software company Odisha
 
Unveiling the Future: Sylius 2.0 New Features
Unveiling the Future: Sylius 2.0 New FeaturesUnveiling the Future: Sylius 2.0 New Features
Unveiling the Future: Sylius 2.0 New Features
 
Hot Sexy call girls in Patel Nagar🔝 9953056974 🔝 escort Service
Hot Sexy call girls in Patel Nagar🔝 9953056974 🔝 escort ServiceHot Sexy call girls in Patel Nagar🔝 9953056974 🔝 escort Service
Hot Sexy call girls in Patel Nagar🔝 9953056974 🔝 escort Service
 
Machine Learning Software Engineering Patterns and Their Engineering
Machine Learning Software Engineering Patterns and Their EngineeringMachine Learning Software Engineering Patterns and Their Engineering
Machine Learning Software Engineering Patterns and Their Engineering
 
Open Source Summit NA 2024: Open Source Cloud Costs - OpenCost's Impact on En...
Open Source Summit NA 2024: Open Source Cloud Costs - OpenCost's Impact on En...Open Source Summit NA 2024: Open Source Cloud Costs - OpenCost's Impact on En...
Open Source Summit NA 2024: Open Source Cloud Costs - OpenCost's Impact on En...
 
Implementing Zero Trust strategy with Azure
Implementing Zero Trust strategy with AzureImplementing Zero Trust strategy with Azure
Implementing Zero Trust strategy with Azure
 
2.pdf Ejercicios de programación competitiva
2.pdf Ejercicios de programación competitiva2.pdf Ejercicios de programación competitiva
2.pdf Ejercicios de programación competitiva
 
Comparing Linux OS Image Update Models - EOSS 2024.pdf
Comparing Linux OS Image Update Models - EOSS 2024.pdfComparing Linux OS Image Update Models - EOSS 2024.pdf
Comparing Linux OS Image Update Models - EOSS 2024.pdf
 
Recruitment Management Software Benefits (Infographic)
Recruitment Management Software Benefits (Infographic)Recruitment Management Software Benefits (Infographic)
Recruitment Management Software Benefits (Infographic)
 
Taming Distributed Systems: Key Insights from Wix's Large-Scale Experience - ...
Taming Distributed Systems: Key Insights from Wix's Large-Scale Experience - ...Taming Distributed Systems: Key Insights from Wix's Large-Scale Experience - ...
Taming Distributed Systems: Key Insights from Wix's Large-Scale Experience - ...
 
cpct NetworkING BASICS AND NETWORK TOOL.ppt
cpct NetworkING BASICS AND NETWORK TOOL.pptcpct NetworkING BASICS AND NETWORK TOOL.ppt
cpct NetworkING BASICS AND NETWORK TOOL.ppt
 
Software Project Health Check: Best Practices and Techniques for Your Product...
Software Project Health Check: Best Practices and Techniques for Your Product...Software Project Health Check: Best Practices and Techniques for Your Product...
Software Project Health Check: Best Practices and Techniques for Your Product...
 
Advantages of Odoo ERP 17 for Your Business
Advantages of Odoo ERP 17 for Your BusinessAdvantages of Odoo ERP 17 for Your Business
Advantages of Odoo ERP 17 for Your Business
 
SuccessFactors 1H 2024 Release - Sneak-Peek by Deloitte Germany
SuccessFactors 1H 2024 Release - Sneak-Peek by Deloitte GermanySuccessFactors 1H 2024 Release - Sneak-Peek by Deloitte Germany
SuccessFactors 1H 2024 Release - Sneak-Peek by Deloitte Germany
 
Folding Cheat Sheet #4 - fourth in a series
Folding Cheat Sheet #4 - fourth in a seriesFolding Cheat Sheet #4 - fourth in a series
Folding Cheat Sheet #4 - fourth in a series
 

Testable JavaScript Strategies

  • 1. J AVA S C R I P T T E S T I N G S T R AT E G I E S D I WA D E L M U N D O , V O YA G E R I N N O VA T I O N S M A N I L A . J S F R I D A Y S M E E T U P A P R I L 8 , 2 0 1 5 A - S PA C E , M A K A T I , P H I L I P P I N E S
  • 2. S H O R T B A C K G R O U N D A B O U T M E • Almost a decade of software dev experience • Work exp local startups (LPI, self) and Singapore (Viki) • Ruby on Rails, JavaScript, Linux, AWS • CISSP, AWS Certified SA, CPISI (PCI-DSS)
  • 3. T E S T I N G S P E C T R U M UNIT INTEGRATION END-TO-END functions, modules components, API tests UI, application
  • 4. 3 S T R AT E G I E S F O R T E S T I N G • Enforce code standards • Cultivate “testing” mindset • Use good tools
  • 5. 1 . E N F O R C E C O D E S TA N D A R D S • Code guideline (syntax) • Code review • Standard for managing continuation-passing style (CPS)
  • 6. C O D E G U I D E L I N E • Be particular about syntax (bracing, spacing, etc) • Document, e.g. “CodeGuidelines.md” • Project code should look like it was written by 1 person Image From https://github.com/airbnb/javascript
  • 7. C O D E R E V I E W S • Find faults, issues, etc • Review code quality (plato) • Test coverage (istanbul)
  • 10. Have a standard for continuation passing style (CPS)
  • 11. O P T I O N S F O R C P S NAMED STYLE Promises ES6: Generators Libraries like async, synchronize, fibers
  • 12. A S Y N C + N A M E D F U N C T I O N S F O R C E S D E V E L O P E R T O W R I T E U N I T- T E S TA B L E C O D E M Y P R E F E R R E D S T Y L E “ S H AW D O W O B J E C T S ”
  • 13. 2 . C U LT I VAT E T E S T I N G M I N D S E T • Write tests. Try to do full testing spectrum • Have discussions on how to test • Think outside box
  • 14. H O W D O Y O U T E S T T H I S ?
  • 15.
  • 17. T E S T F R A M E W O R K : M O C H A A S S E RT I O N S T Y L E : C H A I T E S T D O U B L E S : S I N O N C O D E Q U A L I T Y: P L AT O T E S T C O V E R A G E : I S TA N B U L R E Q U E S T R E C O R D E R : N O C K E N D - T O - E N D : K A R M A
  • 18. TA K E A WAY • ENFORCE CODE STANDARDS • CULTIVATE TESTING MINDSET • USE GOOD TOOLS • Rule of thumb: test to minimise problems, not test for the sake of testing