SlideShare a Scribd company logo
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

More Related Content

Similar to Testable JavaScript Strategies

Systematic Unit Testing
Systematic Unit TestingSystematic Unit Testing
Systematic Unit Testing
scotchfield
 
New Android Languages
New Android LanguagesNew Android Languages
New Android Languages
Javier Gamarra
 
The Road to QA
The Road to QAThe Road to QA
The Road to QA
Benjamin Bischoff
 
Deployments in one click!
Deployments in one click!Deployments in one click!
Deployments in one click!
Manuel de la Peña Peña
 
Pair Programming
Pair ProgrammingPair Programming
Pair Programming
Carlos Corrêa da Silva
 
SOA Latam 2015
SOA Latam 2015SOA Latam 2015
SOA Latam 2015
Domingo Suarez Torres
 
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 Agile
Doc Norton
 
Microservices Delivery Platform. Tips & Tricks
Microservices Delivery Platform. Tips & TricksMicroservices Delivery Platform. Tips & Tricks
Microservices Delivery Platform. Tips & Tricks
Andrey Trubitsyn
 
The Swift Architect
The Swift ArchitectThe Swift Architect
The Swift Architect
Natasha Murashev
 
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
Imelda 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
 
atlas ti introduction
atlas ti introductionatlas ti introduction
atlas ti introduction
Khulisa Management 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 Contributor
Anne Gentle
 
Completely Test-Driven
Completely Test-DrivenCompletely Test-Driven
Completely Test-Driven
Ian 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.5
Dinis Cruz
 
Module
ModuleModule
Module
River Lin
 
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
Business of Software Conference
 

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

Recently uploaded

APIs for Browser Automation (MoT Meetup 2024)
APIs for Browser Automation (MoT Meetup 2024)APIs for Browser Automation (MoT Meetup 2024)
APIs for Browser Automation (MoT Meetup 2024)
Boni García
 
Introducing Crescat - Event Management Software for Venues, Festivals and Eve...
Introducing Crescat - Event Management Software for Venues, Festivals and Eve...Introducing Crescat - Event Management Software for Venues, Festivals and Eve...
Introducing Crescat - Event Management Software for Venues, Festivals and Eve...
Crescat
 
Navigating the Metaverse: A Journey into Virtual Evolution"
Navigating the Metaverse: A Journey into Virtual Evolution"Navigating the Metaverse: A Journey into Virtual Evolution"
Navigating the Metaverse: A Journey into Virtual Evolution"
Donna Lenk
 
Prosigns: Transforming Business with Tailored Technology Solutions
Prosigns: Transforming Business with Tailored Technology SolutionsProsigns: Transforming Business with Tailored Technology Solutions
Prosigns: Transforming Business with Tailored Technology Solutions
Prosigns
 
Orion Context Broker introduction 20240604
Orion Context Broker introduction 20240604Orion Context Broker introduction 20240604
Orion Context Broker introduction 20240604
Fermin Galan
 
How to Position Your Globus Data Portal for Success Ten Good Practices
How to Position Your Globus Data Portal for Success Ten Good PracticesHow to Position Your Globus Data Portal for Success Ten Good Practices
How to Position Your Globus Data Portal for Success Ten Good Practices
Globus
 
2024 RoOUG Security model for the cloud.pptx
2024 RoOUG Security model for the cloud.pptx2024 RoOUG Security model for the cloud.pptx
2024 RoOUG Security model for the cloud.pptx
Georgi Kodinov
 
GlobusWorld 2024 Opening Keynote session
GlobusWorld 2024 Opening Keynote sessionGlobusWorld 2024 Opening Keynote session
GlobusWorld 2024 Opening Keynote session
Globus
 
Globus Connect Server Deep Dive - GlobusWorld 2024
Globus Connect Server Deep Dive - GlobusWorld 2024Globus Connect Server Deep Dive - GlobusWorld 2024
Globus Connect Server Deep Dive - GlobusWorld 2024
Globus
 
Innovating Inference - Remote Triggering of Large Language Models on HPC Clus...
Innovating Inference - Remote Triggering of Large Language Models on HPC Clus...Innovating Inference - Remote Triggering of Large Language Models on HPC Clus...
Innovating Inference - Remote Triggering of Large Language Models on HPC Clus...
Globus
 
GOING AOT WITH GRAALVM FOR SPRING BOOT (SPRING IO)
GOING AOT WITH GRAALVM FOR  SPRING BOOT (SPRING IO)GOING AOT WITH GRAALVM FOR  SPRING BOOT (SPRING IO)
GOING AOT WITH GRAALVM FOR SPRING BOOT (SPRING IO)
Alina Yurenko
 
First Steps with Globus Compute Multi-User Endpoints
First Steps with Globus Compute Multi-User EndpointsFirst Steps with Globus Compute Multi-User Endpoints
First Steps with Globus Compute Multi-User Endpoints
Globus
 
OpenFOAM solver for Helmholtz equation, helmholtzFoam / helmholtzBubbleFoam
OpenFOAM solver for Helmholtz equation, helmholtzFoam / helmholtzBubbleFoamOpenFOAM solver for Helmholtz equation, helmholtzFoam / helmholtzBubbleFoam
OpenFOAM solver for Helmholtz equation, helmholtzFoam / helmholtzBubbleFoam
takuyayamamoto1800
 
OpenMetadata Community Meeting - 5th June 2024
OpenMetadata Community Meeting - 5th June 2024OpenMetadata Community Meeting - 5th June 2024
OpenMetadata Community Meeting - 5th June 2024
OpenMetadata
 
Quarkus Hidden and Forbidden Extensions
Quarkus Hidden and Forbidden ExtensionsQuarkus Hidden and Forbidden Extensions
Quarkus Hidden and Forbidden Extensions
Max Andersen
 
Enterprise Resource Planning System in Telangana
Enterprise Resource Planning System in TelanganaEnterprise Resource Planning System in Telangana
Enterprise Resource Planning System in Telangana
NYGGS Automation Suite
 
Graspan: A Big Data System for Big Code Analysis
Graspan: A Big Data System for Big Code AnalysisGraspan: A Big Data System for Big Code Analysis
Graspan: A Big Data System for Big Code Analysis
Aftab Hussain
 
openEuler Case Study - The Journey to Supply Chain Security
openEuler Case Study - The Journey to Supply Chain SecurityopenEuler Case Study - The Journey to Supply Chain Security
openEuler Case Study - The Journey to Supply Chain Security
Shane Coughlan
 
Automated software refactoring with OpenRewrite and Generative AI.pptx.pdf
Automated software refactoring with OpenRewrite and Generative AI.pptx.pdfAutomated software refactoring with OpenRewrite and Generative AI.pptx.pdf
Automated software refactoring with OpenRewrite and Generative AI.pptx.pdf
timtebeek1
 
Climate Science Flows: Enabling Petabyte-Scale Climate Analysis with the Eart...
Climate Science Flows: Enabling Petabyte-Scale Climate Analysis with the Eart...Climate Science Flows: Enabling Petabyte-Scale Climate Analysis with the Eart...
Climate Science Flows: Enabling Petabyte-Scale Climate Analysis with the Eart...
Globus
 

Recently uploaded (20)

APIs for Browser Automation (MoT Meetup 2024)
APIs for Browser Automation (MoT Meetup 2024)APIs for Browser Automation (MoT Meetup 2024)
APIs for Browser Automation (MoT Meetup 2024)
 
Introducing Crescat - Event Management Software for Venues, Festivals and Eve...
Introducing Crescat - Event Management Software for Venues, Festivals and Eve...Introducing Crescat - Event Management Software for Venues, Festivals and Eve...
Introducing Crescat - Event Management Software for Venues, Festivals and Eve...
 
Navigating the Metaverse: A Journey into Virtual Evolution"
Navigating the Metaverse: A Journey into Virtual Evolution"Navigating the Metaverse: A Journey into Virtual Evolution"
Navigating the Metaverse: A Journey into Virtual Evolution"
 
Prosigns: Transforming Business with Tailored Technology Solutions
Prosigns: Transforming Business with Tailored Technology SolutionsProsigns: Transforming Business with Tailored Technology Solutions
Prosigns: Transforming Business with Tailored Technology Solutions
 
Orion Context Broker introduction 20240604
Orion Context Broker introduction 20240604Orion Context Broker introduction 20240604
Orion Context Broker introduction 20240604
 
How to Position Your Globus Data Portal for Success Ten Good Practices
How to Position Your Globus Data Portal for Success Ten Good PracticesHow to Position Your Globus Data Portal for Success Ten Good Practices
How to Position Your Globus Data Portal for Success Ten Good Practices
 
2024 RoOUG Security model for the cloud.pptx
2024 RoOUG Security model for the cloud.pptx2024 RoOUG Security model for the cloud.pptx
2024 RoOUG Security model for the cloud.pptx
 
GlobusWorld 2024 Opening Keynote session
GlobusWorld 2024 Opening Keynote sessionGlobusWorld 2024 Opening Keynote session
GlobusWorld 2024 Opening Keynote session
 
Globus Connect Server Deep Dive - GlobusWorld 2024
Globus Connect Server Deep Dive - GlobusWorld 2024Globus Connect Server Deep Dive - GlobusWorld 2024
Globus Connect Server Deep Dive - GlobusWorld 2024
 
Innovating Inference - Remote Triggering of Large Language Models on HPC Clus...
Innovating Inference - Remote Triggering of Large Language Models on HPC Clus...Innovating Inference - Remote Triggering of Large Language Models on HPC Clus...
Innovating Inference - Remote Triggering of Large Language Models on HPC Clus...
 
GOING AOT WITH GRAALVM FOR SPRING BOOT (SPRING IO)
GOING AOT WITH GRAALVM FOR  SPRING BOOT (SPRING IO)GOING AOT WITH GRAALVM FOR  SPRING BOOT (SPRING IO)
GOING AOT WITH GRAALVM FOR SPRING BOOT (SPRING IO)
 
First Steps with Globus Compute Multi-User Endpoints
First Steps with Globus Compute Multi-User EndpointsFirst Steps with Globus Compute Multi-User Endpoints
First Steps with Globus Compute Multi-User Endpoints
 
OpenFOAM solver for Helmholtz equation, helmholtzFoam / helmholtzBubbleFoam
OpenFOAM solver for Helmholtz equation, helmholtzFoam / helmholtzBubbleFoamOpenFOAM solver for Helmholtz equation, helmholtzFoam / helmholtzBubbleFoam
OpenFOAM solver for Helmholtz equation, helmholtzFoam / helmholtzBubbleFoam
 
OpenMetadata Community Meeting - 5th June 2024
OpenMetadata Community Meeting - 5th June 2024OpenMetadata Community Meeting - 5th June 2024
OpenMetadata Community Meeting - 5th June 2024
 
Quarkus Hidden and Forbidden Extensions
Quarkus Hidden and Forbidden ExtensionsQuarkus Hidden and Forbidden Extensions
Quarkus Hidden and Forbidden Extensions
 
Enterprise Resource Planning System in Telangana
Enterprise Resource Planning System in TelanganaEnterprise Resource Planning System in Telangana
Enterprise Resource Planning System in Telangana
 
Graspan: A Big Data System for Big Code Analysis
Graspan: A Big Data System for Big Code AnalysisGraspan: A Big Data System for Big Code Analysis
Graspan: A Big Data System for Big Code Analysis
 
openEuler Case Study - The Journey to Supply Chain Security
openEuler Case Study - The Journey to Supply Chain SecurityopenEuler Case Study - The Journey to Supply Chain Security
openEuler Case Study - The Journey to Supply Chain Security
 
Automated software refactoring with OpenRewrite and Generative AI.pptx.pdf
Automated software refactoring with OpenRewrite and Generative AI.pptx.pdfAutomated software refactoring with OpenRewrite and Generative AI.pptx.pdf
Automated software refactoring with OpenRewrite and Generative AI.pptx.pdf
 
Climate Science Flows: Enabling Petabyte-Scale Climate Analysis with the Eart...
Climate Science Flows: Enabling Petabyte-Scale Climate Analysis with the Eart...Climate Science Flows: Enabling Petabyte-Scale Climate Analysis with the Eart...
Climate Science Flows: Enabling Petabyte-Scale Climate Analysis with the Eart...
 

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