SlideShare a Scribd company logo
Testing JavaScript
Applications
What? Why? How?
Hello!
Auwal Muhammad Samu
Software Engineer,@intapps
Community Manager, GDG Lafia
Tweets: @auwalms_
Other Socials: @auwalms
Mails: auwalforall@gmail.com
What is a Test?1
“
Testing is the process of evaluating a
system or its component(s) with the intent
to find whether it satisfies the specified
requirements or not.
“
A process of analyzing a software item to
detect the differences between existing and
required conditions (that is
defects/errors/bugs) and to evaluate the
features of the software item.
- ANSI/IEEE 1059 standard
Why write a Test?2
Write Test so as to:
◉spend less debugging time and
save cost
◉ship less buggy codes
◉ensure user requirement are met
◉identify errors and gaps
What do you Test?3
Writing Tests depends on:
◉what the test is expected to
achieve
◉the level and depth of the test
expectation
◉Non-Functional Testing
◉Functional Testing
Image Source:
http://testwithbest.blogspot.com.ng/p/
manual-testing.html
Image Source: http://www.mamsys.com/quality-
assurance/functional-testing/
Functional Testing4
Ensure tests are written for:
◉Areas where large users will be
accessing simultaneously such
◉Login/registration form
◉Bill/payment pages
◉Connection to DB
◉Expected response from database
◉Components interaction with each
others
Unit Test
The main aim is to isolate each part of a
program and show that the section of
code works correctly.
Integration Test
Involves testing of combined parts of a
program to ensure its working based on
user requirement.
System Test
Is performed when all components of a
program are integrated and tested to
ensure functionality.
Writing Test in JS5
JavaScript does not natively supports
testing
It employs the good will of some of its
frameworks and library to achieve this fit
for testing in both Node and browsers
Some JS Testing Frameworks
◉Mocha
◉Jasmine
◉Jest
◉Selenium
◉QUnit
◉Tape
◉Protractor
Some JS Testing Library
◉Chai
◉Sinon
◉Enzyme
◉Unexpected
◉WebdriverIO
◉ and many others
Using Mocha for
Testing
5
Why Mocha?
◉ a feature-rich JS testing framework
that runs on node and browser
◉ most used testing framework for
testing
◉ support usage of 3rd party library for
assertion, mocks, spy and others
Adding Mocha to
Project
//Mocha can be installed with npm, bower and available on cdnjs
//install globally with npm using
npm install -g mocha
//install as a dev dependency for your project
npm install --save-dev mocha
//installed using bower as
bower install mocha
And then structure?
Testing JavaScript Applications
Testing JavaScript Applications
Testing JavaScript Applications
<demo-time/>
Akwai tambaya ?
You can find me at
◉ @auwalms_
◉ auwalforall@gmail.com
Nagode!

More Related Content

What's hot (20)

PPTX
Agile test practices
Leonard Fingerman
 
PPTX
Unit testing
software testingcompany
 
PPTX
Unit Testing And Mocking
Joe Wilson
 
PPTX
TDD- Test Driven Development
Liza Antoun
 
PPTX
Understanding Unit Testing
ikhwanhayat
 
PPTX
Functional & Performance Test Automation with CI
Leonard Fingerman
 
ODP
Software testing tools
Gaurav Paliwal
 
PPT
Automated Unit Testing and TDD
Greg Sohl
 
PPTX
Unit Testing in Action - C#, NUnit, and Moq
XPDays
 
PPTX
Test Driven Development
bhochhi
 
PDF
Code Review Tool Evaluation
Kate Semizhon
 
PPTX
Test Driven Development
Sergey Aganezov
 
PPTX
Software Quality via Unit Testing
Shaun Abram
 
PPTX
An Introduction to Unit Testing
Joe Tremblay
 
PPTX
Unit testing
Mani Kanth
 
PDF
10 Benefits of Automated Testing
TestObject - Mobile Testing
 
PPTX
Project Onion unit test environment
Abhinav Jha
 
PDF
ABAP Code Retreat Frankfurt 2016: TDD - Test Driven Development
Hendrik Neumann
 
PDF
Unit and integration Testing
David Berliner
 
PPTX
Unit tests & TDD
Dror Helper
 
Agile test practices
Leonard Fingerman
 
Unit Testing And Mocking
Joe Wilson
 
TDD- Test Driven Development
Liza Antoun
 
Understanding Unit Testing
ikhwanhayat
 
Functional & Performance Test Automation with CI
Leonard Fingerman
 
Software testing tools
Gaurav Paliwal
 
Automated Unit Testing and TDD
Greg Sohl
 
Unit Testing in Action - C#, NUnit, and Moq
XPDays
 
Test Driven Development
bhochhi
 
Code Review Tool Evaluation
Kate Semizhon
 
Test Driven Development
Sergey Aganezov
 
Software Quality via Unit Testing
Shaun Abram
 
An Introduction to Unit Testing
Joe Tremblay
 
Unit testing
Mani Kanth
 
10 Benefits of Automated Testing
TestObject - Mobile Testing
 
Project Onion unit test environment
Abhinav Jha
 
ABAP Code Retreat Frankfurt 2016: TDD - Test Driven Development
Hendrik Neumann
 
Unit and integration Testing
David Berliner
 
Unit tests & TDD
Dror Helper
 

Similar to Testing JavaScript Applications (20)

PDF
Testing Strategies for Node.pdf
infowindtech
 
PPTX
Zero to Testing in JavaScript
pamselle
 
PPTX
MidwestJS Zero to Testing
pamselle
 
PDF
Testacular
James Ford
 
PPTX
Testing 101
Noam Barkai
 
PDF
Unit-testing and E2E testing in JS
Michael Haberman
 
PDF
JS Lab`16. Сергей Селецкий: "Ретроспектива тестирования JavaScript"
GeeksLab Odessa
 
PPTX
Writing better tests for your java script app
JakeGinnivan
 
PPTX
3 Ways to test your ColdFusion API - 2017 Adobe CF Summit
Ortus Solutions, Corp
 
PDF
Collaborating with Developers: How-to Guide for Test Engineers - By Gil Tayar
Applitools
 
PPTX
How to write test in node.js
Jason Lin
 
PDF
JAVASCRIPT TDD(Test driven Development) & Qunit Tutorial
Anup Singh
 
PDF
mocha sinon chai Dc jquery 4-24
Carson Banov
 
PDF
Efficient JavaScript Unit Testing, March 2013
Hazem Saleh
 
PDF
JavaScript development methodology
Aleksander Fabijan
 
PDF
3 WAYS TO TEST YOUR COLDFUSION API
Gavin Pickin
 
PDF
3 WAYS TO TEST YOUR COLDFUSION API -
Ortus Solutions, Corp
 
PDF
JAVASCRIPT Test Driven Development & Jasmine
Anup Singh
 
PDF
How to write Testable Javascript
ColdFusionConference
 
PDF
How do I write Testable Javascript - Presented at dev.Objective() June 16, 2016
Gavin Pickin
 
Testing Strategies for Node.pdf
infowindtech
 
Zero to Testing in JavaScript
pamselle
 
MidwestJS Zero to Testing
pamselle
 
Testacular
James Ford
 
Testing 101
Noam Barkai
 
Unit-testing and E2E testing in JS
Michael Haberman
 
JS Lab`16. Сергей Селецкий: "Ретроспектива тестирования JavaScript"
GeeksLab Odessa
 
Writing better tests for your java script app
JakeGinnivan
 
3 Ways to test your ColdFusion API - 2017 Adobe CF Summit
Ortus Solutions, Corp
 
Collaborating with Developers: How-to Guide for Test Engineers - By Gil Tayar
Applitools
 
How to write test in node.js
Jason Lin
 
JAVASCRIPT TDD(Test driven Development) & Qunit Tutorial
Anup Singh
 
mocha sinon chai Dc jquery 4-24
Carson Banov
 
Efficient JavaScript Unit Testing, March 2013
Hazem Saleh
 
JavaScript development methodology
Aleksander Fabijan
 
3 WAYS TO TEST YOUR COLDFUSION API
Gavin Pickin
 
3 WAYS TO TEST YOUR COLDFUSION API -
Ortus Solutions, Corp
 
JAVASCRIPT Test Driven Development & Jasmine
Anup Singh
 
How to write Testable Javascript
ColdFusionConference
 
How do I write Testable Javascript - Presented at dev.Objective() June 16, 2016
Gavin Pickin
 
Ad

More from Muhammad Samu (6)

PDF
Optimizing Web Performance for Mobile Users
Muhammad Samu
 
PPTX
Progressive Web Apps 101
Muhammad Samu
 
PPTX
Building Offline Ready and Installable Web App
Muhammad Samu
 
PPTX
Offline First with Service Worker
Muhammad Samu
 
PPTX
Getting Started with Firebase Cloud Functions
Muhammad Samu
 
PPTX
Becoming a Software Developer
Muhammad Samu
 
Optimizing Web Performance for Mobile Users
Muhammad Samu
 
Progressive Web Apps 101
Muhammad Samu
 
Building Offline Ready and Installable Web App
Muhammad Samu
 
Offline First with Service Worker
Muhammad Samu
 
Getting Started with Firebase Cloud Functions
Muhammad Samu
 
Becoming a Software Developer
Muhammad Samu
 
Ad

Recently uploaded (20)

PDF
AWS Consulting Services: Empowering Digital Transformation with Nlineaxis
Nlineaxis IT Solutions Pvt Ltd
 
PDF
From Data Preparation to Inference: How Alluxio Speeds Up AI
Alluxio, Inc.
 
PPTX
Avast Premium Security crack 25.5.6162 + License Key 2025
HyperPc soft
 
PPTX
Threat Modeling a Batch Job Framework - Teri Radichel - AWS re:Inforce 2025
2nd Sight Lab
 
PPTX
IObit Driver Booster Pro 12.4-12.5 license keys 2025-2026
chaudhryakashoo065
 
PDF
Code Once; Run Everywhere - A Beginner’s Journey with React Native
Hasitha Walpola
 
PPTX
IDM Crack with Internet Download Manager 6.42 [Latest 2025]
HyperPc soft
 
PDF
Telemedicine App Development_ Key Factors to Consider for Your Healthcare Ven...
Mobilityinfotech
 
PDF
Writing Maintainable Playwright Tests with Ease
Shubham Joshi
 
DOCX
Best AI-Powered Wearable Tech for Remote Health Monitoring in 2025
SEOLIFT - SEO Company London
 
PDF
Why Edge Computing Matters in Mobile Application Tech.pdf
IMG Global Infotech
 
DOCX
Zoho Creator Solution for EI by Elsner Technologies.docx
Elsner Technologies Pvt. Ltd.
 
PDF
Building scalbale cloud native apps with .NET 8
GillesMathieu10
 
PPTX
declaration of Variables and constants.pptx
meemee7378
 
PDF
Best Software Development at Best Prices
softechies7
 
PDF
TEASMA: A Practical Methodology for Test Adequacy Assessment of Deep Neural N...
Lionel Briand
 
PPTX
Agentforce – TDX 2025 Hackathon Achievement
GetOnCRM Solutions
 
PPTX
arctitecture application system design os dsa
za241967
 
PDF
Designing Accessible Content Blocks (1).pdf
jaclynmennie1
 
PDF
capitulando la keynote de GrafanaCON 2025 - Madrid
Imma Valls Bernaus
 
AWS Consulting Services: Empowering Digital Transformation with Nlineaxis
Nlineaxis IT Solutions Pvt Ltd
 
From Data Preparation to Inference: How Alluxio Speeds Up AI
Alluxio, Inc.
 
Avast Premium Security crack 25.5.6162 + License Key 2025
HyperPc soft
 
Threat Modeling a Batch Job Framework - Teri Radichel - AWS re:Inforce 2025
2nd Sight Lab
 
IObit Driver Booster Pro 12.4-12.5 license keys 2025-2026
chaudhryakashoo065
 
Code Once; Run Everywhere - A Beginner’s Journey with React Native
Hasitha Walpola
 
IDM Crack with Internet Download Manager 6.42 [Latest 2025]
HyperPc soft
 
Telemedicine App Development_ Key Factors to Consider for Your Healthcare Ven...
Mobilityinfotech
 
Writing Maintainable Playwright Tests with Ease
Shubham Joshi
 
Best AI-Powered Wearable Tech for Remote Health Monitoring in 2025
SEOLIFT - SEO Company London
 
Why Edge Computing Matters in Mobile Application Tech.pdf
IMG Global Infotech
 
Zoho Creator Solution for EI by Elsner Technologies.docx
Elsner Technologies Pvt. Ltd.
 
Building scalbale cloud native apps with .NET 8
GillesMathieu10
 
declaration of Variables and constants.pptx
meemee7378
 
Best Software Development at Best Prices
softechies7
 
TEASMA: A Practical Methodology for Test Adequacy Assessment of Deep Neural N...
Lionel Briand
 
Agentforce – TDX 2025 Hackathon Achievement
GetOnCRM Solutions
 
arctitecture application system design os dsa
za241967
 
Designing Accessible Content Blocks (1).pdf
jaclynmennie1
 
capitulando la keynote de GrafanaCON 2025 - Madrid
Imma Valls Bernaus
 

Testing JavaScript Applications

Editor's Notes