SlideShare une entreprise Scribd logo
1  sur  36
Test Policy
and Practices
Copyright © 2020 Talentica Software (I) Pvt Ltd. All rights reserved.
Test Policy and Practices
• What is Testing
• Challenges in Testing
• Levels of Testing
• Testing Best Practices and Policies
• Test Driven Design (TDD Testing)
• Behavioral Driven Design (BDD Testing)
• TDD v/s BDD
2
Copyright © 2020 Talentica Software (I) Pvt Ltd. All rights reserved. 3
Copyright © 2020 Talentica Software (I) Pvt Ltd. All rights reserved.
Software testing is a process, to evaluate the functionality of a software application
with an intent to find whether the developed software met the specified requirements or
not and to identify the defects to ensure that the product is defect free in order to
produce the quality product.
4
Copyright © 2020 Talentica Software (I) Pvt Ltd. All rights reserved.
Software Test Cycle
5
Copyright © 2020 Talentica Software (I) Pvt Ltd. All rights reserved.
Software Testing Challenges
• Inadequate Product/Business Knowledge
• Changing Requirements
• No or Less Documentation
• Frequent Regression Cycle
• Lack on Communication
• No Quality Measurements
• Agile Becomes Waterfall
• Tool Selection
6
Copyright © 2020 Talentica Software (I) Pvt Ltd. All rights reserved.
Testing Levels
• Unit Testing
• Component Testing
• Integration Testing
• System Testing
• Acceptance Testing
• Alpha Testing
• Beta Testing
7
Copyright © 2020 Talentica Software (I) Pvt Ltd. All rights reserved.
Testing Levels (Cont.)
Unit Testing
• Unit Testing is a level of software testing where individual units of a software are tested.
• The purpose is to validate that each unit of the software performs as designed.
• A Unit is a smallest testable part of Application like classes, Interface or a function/procedure.
Component Testing
• Component testing Unit Testing is a level of software testing where individual components of a
software are tested.
• It's also referred to as Module Testing.
8
Copyright © 2020 Talentica Software (I) Pvt Ltd. All rights reserved.
Testing Levels (Cont.)
Integration Testing
• Integration Testing is a level of software testing where individual units/ components are combined
and tested as a single unit.
• The main function or goal of this testing is to test the interfaces between the units/modules.
System Testing
• System Testing is performed on a complete integrated system to evaluate the compliance of the
system with the corresponding requirements.
• The purpose of this test is to evaluate the system’s compliance with the specified requirements.
9
Copyright © 2020 Talentica Software (I) Pvt Ltd. All rights reserved.
Testing Levels (Cont.)
Acceptance Testing
• Acceptance testing, a testing technique performed to determine whether or not the software
system has met the requirement specifications.
• The main purpose of this test is to evaluate the system
• Acceptance criteria may be defined on the basis of the following attributes :
-- Functional Correctness and Completeness
-- Data Integrity
-- Data Conversion
-- Usability
-- Performance
-- Confidentiality and Availability
-- Scalability
10
Copyright © 2020 Talentica Software (I) Pvt Ltd. All rights reserved.
Testing Levels (Cont.)
Alpha Testing
• Alpha Testing is a Pre-release activity and one of the types of Acceptance Testing.
• Testing activity is carried out in a much-controlled manner and it is not accessible by the end-
users/market.
Beta Testing
• Beta testing also known as user testing takes place at the end users site by the end users to
validate the usability, functionality, compatibility, and reliability testing.
• It allows the "real" customer an opportunity to provide inputs into the design, functionality, and
usability of a product.
11
Copyright © 2020 Talentica Software (I) Pvt Ltd. All rights reserved.
Testing Best Practices and Policies
• Analyze the Risk.
• Never/Ever Ignore a Bug.
• Think from End User Prospective.
• Start Automation post analyzing available tools.
• Keep yourself Updated with latest QA Market Trends.
• Test Early, Test Often.
• Implementing Test Coverage and Code Coverage
• Don’t rely just on Black Box Testing, go for White Box/Grey Box Testing.
• Take Scalability and Application Performance into consideration while Testing.
• Automate as much as possible to avoid redundant work.
12
Copyright © 2020 Talentica Software (I) Pvt Ltd. All rights reserved.
Common Mistakes we make as QA
• Not taking Bigger Picture/Business into Account.
• Gaps in Requirement Understanding.
• Not thinking from End User Prospective.
• Starting Automation without analyzing available tools.
• Criticising developers
• Frequently changing the focus
• Not asking developer’s help
• Incorrectly evaluate the impact of a new functionality/fix
13
Copyright © 2020 Talentica Software (I) Pvt Ltd. All rights reserved.
Test Driven Development (TDD)
• TDD stands for Test Driven Development.
• In this software development technique, we create the test cases first and then write the code
underlying those test cases.
• TDD is a development technique, it can also be used for automation testing development.
• TDD, take more time for development however, probability of finding defects is low.
• TDD results in improved quality of code and the code that is more reusable and flexible.
• TDD also helps in achieving high test coverage.
• The most challenging thing for developers/qa following TDD is to write their test cases before
writing the code.
14
Copyright © 2020 Talentica Software (I) Pvt Ltd. All rights reserved.
Test Driven Development (TDD)
15
Copyright © 2020 Talentica Software (I) Pvt Ltd. All rights reserved.
Test Driven Development - Process
• Write a test case: Based on the requirements, write all automated test case.
• Run all the test cases: Run these automated test cases on the currently developed code.
• Develop the code for that test cases: If the test case fails, then, write the code to make that
test-case work as expected.
• Run test cases again: Run the test cases again and check if all the test cases developed so far
are implemented.
• Refactor your code: This is an optional step. However, it's important to refactor your code to
make it more readable and reusable.
• Repeat above steps for new test cases: Repeat the cycle for the other test cases until all the
test cases are implemented.
16
Copyright © 2020 Talentica Software (I) Pvt Ltd. All rights reserved.
Behavioral Driven Development
(BDD)
• BDD stands for Behavioral Driven Development.
• BDD is an extension to TDD where instead of writing the test cases, we start by writing a behavior.
• Once behavior's are written, we develop the code which is required for our application to perform
the behavior.
• The scenario defined in the BDD approach makes it easy for the developers, testers and business
users to collaborate.
• BDD is considered a best practice when it comes to automated testing as it focuses on the behavior
of the application and not on thinking about the implementation of the code.
• The behavior of the application is the center of focus in BDD and it forces the developers and
testers to walk-in the customer’s shoes.
17
Copyright © 2020 Talentica Software (I) Pvt Ltd. All rights reserved.
Behavioral Driven Development -
Process
• Write the behavior of the application: The behavior of an application is written in simple
English like language by the product owner or the business analysts or QAs.
• Write the automated scripts: This simple English like language is then converted into
programming tests.
• Implement the functional code: The functional code underlying the behavior is then
implemented.
• Check if the behavior is successful: Run the behavior and see if it is successful. If successful,
move to the next behavior otherwise fix the errors in the functional code to achieve the application
behavior.
• Refactor or organize code: Refactor or organize your code to make it more readable and re-
usable.
• Repeat above steps for new behavior: Repeat the steps to implement more behaviors in your
application.
18
Copyright © 2020 Talentica Software (I) Pvt Ltd. All rights reserved.
TDD v/s BDD
19
TDD BDD
Stands for Test Driven Development Stands for Behaviour Driven Development
The process starts by writing a test case. The process starts by writing a scenario as per
the expected behavior.
TDD focuses on how the functionality is
implemented.
BDD focuses on the behavior of an application
for the end user.
Test cases are written in a programming
language.
Scenarios are more readable when compared
to TDD as they are written in simple English
format.
Might be a better approach for projects which
involve API and third-party tools.
Might be a better approach for projects which
are driven by user actions. For eg: e-commerce
website, application system, etc.
Some of the tools which support TDD are:
JUnit, TestNG, NUnit, etc.
Some of the tools which support BDD are
SpecFlow, Cucumber, MSpec, etc.
Copyright © 2020 Talentica Software (I) Pvt Ltd. All rights reserved.
Testing framework
– A testing framework is a set of guidelines
or rules used for creating and designing
test cases.
– These guidelines could include coding
standards, test-data handling methods,
object repositories, processes for storing
test results, etc
20
Copyright © 2020 Talentica Software (I) Pvt Ltd. All rights reserved.
– Mocha
– Jasmine
– Jest
21
Copyright © 2020 Talentica Software (I) Pvt Ltd. All rights reserved.
• Mocha
– Mocha is a feature-rich JavaScript test
framework running on Node.js and in the
browser
22
Copyright © 2020 Talentica Software (I) Pvt Ltd. All rights reserved.
• Context, describe, it functions
• Hooks
• Done callback and async code
• Timeouts
• only and skip function
• Mocha opts
• Reporters
23
Copyright © 2020 Talentica Software (I) Pvt Ltd. All rights reserved.
• Demo
24
Copyright © 2020 Talentica Software (I) Pvt Ltd. All rights reserved.
Assertions
– Assertion libraries are tools which
provides you a way to verify your expected
output with current output
– Without assertions a test is insignificant
25
Copyright © 2020 Talentica Software (I) Pvt Ltd. All rights reserved.
• Chai
• expect.js
• should.js
• unexpected.js
26
Copyright © 2020 Talentica Software (I) Pvt Ltd. All rights reserved.
• Chai
– Chai is a BDD / TDD assertion library
for node
– Has best of both worlds expect.js, should.js
– Has various custom plugins
27
Copyright © 2020 Talentica Software (I) Pvt Ltd. All rights reserved.
• Demo
28
Copyright © 2020 Talentica Software (I) Pvt Ltd. All rights reserved.
Mocks/Test doubles
– Test Double are pretend object used in
place of a real object for testing purposes.
– It is used so that a
function/component/object can be tested in
isolation
29
Copyright © 2020 Talentica Software (I) Pvt Ltd. All rights reserved.
• Dummies
• Stubs
• Spies
30
Copyright © 2020 Talentica Software (I) Pvt Ltd. All rights reserved.
• Dummy
– Dummy objects are passed around but
never actually used. Usually they are just
used to fill parameter lists.
31
Copyright © 2020 Talentica Software (I) Pvt Ltd. All rights reserved.
• spies
– A test spy is an object that records its
interaction with other objects throughout
the code base
32
Copyright © 2020 Talentica Software (I) Pvt Ltd. All rights reserved.
• stub
– Test stubs are fake objects with pre-
programmed behavior
33
Copyright © 2020 Talentica Software (I) Pvt Ltd. All rights reserved.
• Demo
34
Copyright © 2020 Talentica Software (I) Pvt Ltd. All rights reserved.
Best Practices
– Don't use arrow function since is binds
"this" and cannot use mocha context
– Use timeouts as when you need to setup
something before test execution
– Do not create multiple tests to test single
scenario with different data
– Test your test code with only/skip
– Add message in assertions
35
Copyright © 2020 Talentica Software (I) Pvt Ltd. All rights reserved. 36

Contenu connexe

Tendances

Conquering AngularJS Limitations
Conquering AngularJS LimitationsConquering AngularJS Limitations
Conquering AngularJS LimitationsValeri Karpov
 
Introduction to Continuous Integration
Introduction to Continuous IntegrationIntroduction to Continuous Integration
Introduction to Continuous IntegrationHùng Nguyễn Huy
 
Java APIs- The missing manual (concurrency)
Java APIs- The missing manual (concurrency)Java APIs- The missing manual (concurrency)
Java APIs- The missing manual (concurrency)Hendrik Ebbers
 
Angular - Chapter 1 - Introduction
 Angular - Chapter 1 - Introduction Angular - Chapter 1 - Introduction
Angular - Chapter 1 - IntroductionWebStackAcademy
 
Hybrid Mobile Development with Apache Cordova and
Hybrid Mobile Development with Apache Cordova and Hybrid Mobile Development with Apache Cordova and
Hybrid Mobile Development with Apache Cordova and Ryan Cuprak
 
FAST for SharePoint Deep Dive
FAST for SharePoint Deep DiveFAST for SharePoint Deep Dive
FAST for SharePoint Deep Diveneil_richards
 
JavaOne 2015 - Swimming upstream in the container revolution
JavaOne 2015 - Swimming upstream in the container revolutionJavaOne 2015 - Swimming upstream in the container revolution
JavaOne 2015 - Swimming upstream in the container revolutionBert Jan Schrijver
 
Asp.Net Core MVC , Razor page , Entity Framework Core
Asp.Net Core MVC , Razor page , Entity Framework CoreAsp.Net Core MVC , Razor page , Entity Framework Core
Asp.Net Core MVC , Razor page , Entity Framework Coremohamed elshafey
 
Story Testing Approach for Enterprise Applications using Selenium Framework
Story Testing Approach for Enterprise Applications using Selenium FrameworkStory Testing Approach for Enterprise Applications using Selenium Framework
Story Testing Approach for Enterprise Applications using Selenium FrameworkOleksiy Rezchykov
 
Microservices - java ee vs spring boot and spring cloud
Microservices - java ee vs spring boot and spring cloudMicroservices - java ee vs spring boot and spring cloud
Microservices - java ee vs spring boot and spring cloudBen Wilcock
 
Modern Tools for Building Progressive Web Apps
Modern Tools for Building Progressive Web AppsModern Tools for Building Progressive Web Apps
Modern Tools for Building Progressive Web AppsAll Things Open
 
Micronaut: A new way to build microservices
Micronaut: A new way to build microservicesMicronaut: A new way to build microservices
Micronaut: A new way to build microservicesLuram Archanjo
 
Prod-Like Integration Testing for Distributed Containerized Applications
Prod-Like Integration Testing for Distributed Containerized ApplicationsProd-Like Integration Testing for Distributed Containerized Applications
Prod-Like Integration Testing for Distributed Containerized ApplicationsVMware Tanzu
 
Testing Java EE apps with Arquillian
Testing Java EE apps with ArquillianTesting Java EE apps with Arquillian
Testing Java EE apps with ArquillianIvan Ivanov
 
Practical Patterns for Developing a Cross-product Cross-version App
Practical Patterns for Developing a Cross-product Cross-version AppPractical Patterns for Developing a Cross-product Cross-version App
Practical Patterns for Developing a Cross-product Cross-version AppAtlassian
 
Introducing ASP.NET Core 2.0
Introducing ASP.NET Core 2.0Introducing ASP.NET Core 2.0
Introducing ASP.NET Core 2.0Steven Smith
 
Scaling Indexing and Replication in Jira Data Center Apps
Scaling Indexing and Replication in Jira Data Center AppsScaling Indexing and Replication in Jira Data Center Apps
Scaling Indexing and Replication in Jira Data Center AppsAtlassian
 

Tendances (20)

Conquering AngularJS Limitations
Conquering AngularJS LimitationsConquering AngularJS Limitations
Conquering AngularJS Limitations
 
Introduction to Continuous Integration
Introduction to Continuous IntegrationIntroduction to Continuous Integration
Introduction to Continuous Integration
 
Java APIs- The missing manual (concurrency)
Java APIs- The missing manual (concurrency)Java APIs- The missing manual (concurrency)
Java APIs- The missing manual (concurrency)
 
Agility Requires Safety
Agility Requires SafetyAgility Requires Safety
Agility Requires Safety
 
Angular - Chapter 1 - Introduction
 Angular - Chapter 1 - Introduction Angular - Chapter 1 - Introduction
Angular - Chapter 1 - Introduction
 
Angular 2.0
Angular  2.0Angular  2.0
Angular 2.0
 
Hybrid Mobile Development with Apache Cordova and
Hybrid Mobile Development with Apache Cordova and Hybrid Mobile Development with Apache Cordova and
Hybrid Mobile Development with Apache Cordova and
 
FAST for SharePoint Deep Dive
FAST for SharePoint Deep DiveFAST for SharePoint Deep Dive
FAST for SharePoint Deep Dive
 
React native
React nativeReact native
React native
 
JavaOne 2015 - Swimming upstream in the container revolution
JavaOne 2015 - Swimming upstream in the container revolutionJavaOne 2015 - Swimming upstream in the container revolution
JavaOne 2015 - Swimming upstream in the container revolution
 
Asp.Net Core MVC , Razor page , Entity Framework Core
Asp.Net Core MVC , Razor page , Entity Framework CoreAsp.Net Core MVC , Razor page , Entity Framework Core
Asp.Net Core MVC , Razor page , Entity Framework Core
 
Story Testing Approach for Enterprise Applications using Selenium Framework
Story Testing Approach for Enterprise Applications using Selenium FrameworkStory Testing Approach for Enterprise Applications using Selenium Framework
Story Testing Approach for Enterprise Applications using Selenium Framework
 
Microservices - java ee vs spring boot and spring cloud
Microservices - java ee vs spring boot and spring cloudMicroservices - java ee vs spring boot and spring cloud
Microservices - java ee vs spring boot and spring cloud
 
Modern Tools for Building Progressive Web Apps
Modern Tools for Building Progressive Web AppsModern Tools for Building Progressive Web Apps
Modern Tools for Building Progressive Web Apps
 
Micronaut: A new way to build microservices
Micronaut: A new way to build microservicesMicronaut: A new way to build microservices
Micronaut: A new way to build microservices
 
Prod-Like Integration Testing for Distributed Containerized Applications
Prod-Like Integration Testing for Distributed Containerized ApplicationsProd-Like Integration Testing for Distributed Containerized Applications
Prod-Like Integration Testing for Distributed Containerized Applications
 
Testing Java EE apps with Arquillian
Testing Java EE apps with ArquillianTesting Java EE apps with Arquillian
Testing Java EE apps with Arquillian
 
Practical Patterns for Developing a Cross-product Cross-version App
Practical Patterns for Developing a Cross-product Cross-version AppPractical Patterns for Developing a Cross-product Cross-version App
Practical Patterns for Developing a Cross-product Cross-version App
 
Introducing ASP.NET Core 2.0
Introducing ASP.NET Core 2.0Introducing ASP.NET Core 2.0
Introducing ASP.NET Core 2.0
 
Scaling Indexing and Replication in Jira Data Center Apps
Scaling Indexing and Replication in Jira Data Center AppsScaling Indexing and Replication in Jira Data Center Apps
Scaling Indexing and Replication in Jira Data Center Apps
 

Similaire à Test Policy and Practices

Behavior Driven Development—A Guide to Agile Practices by Josh Eastman
Behavior Driven Development—A Guide to Agile Practices by Josh EastmanBehavior Driven Development—A Guide to Agile Practices by Josh Eastman
Behavior Driven Development—A Guide to Agile Practices by Josh EastmanQA or the Highway
 
Quality for DevOps teams - Quality engineering in the DevOps culture
Quality for DevOps teams - Quality engineering in the DevOps cultureQuality for DevOps teams - Quality engineering in the DevOps culture
Quality for DevOps teams - Quality engineering in the DevOps cultureRik Marselis
 
PMI-ACP Lesson 06 Quality
PMI-ACP Lesson 06 QualityPMI-ACP Lesson 06 Quality
PMI-ACP Lesson 06 QualityThanh Nguyen
 
Mastering BDD - Eran Kinsbruner Workshop Quest 2018
Mastering BDD - Eran Kinsbruner Workshop Quest 2018Mastering BDD - Eran Kinsbruner Workshop Quest 2018
Mastering BDD - Eran Kinsbruner Workshop Quest 2018Perfecto Mobile
 
How to build confidence in your release cycle
How to build confidence in your release cycleHow to build confidence in your release cycle
How to build confidence in your release cycleDiUS
 
How to become a Software Tester Carrier Path for Software Quality Tester
How to become a Software Tester Carrier Path for Software Quality TesterHow to become a Software Tester Carrier Path for Software Quality Tester
How to become a Software Tester Carrier Path for Software Quality Testerjeetendra mandal
 
Quality Jam: BDD, TDD and ATDD for the Enterprise
Quality Jam: BDD, TDD and ATDD for the EnterpriseQuality Jam: BDD, TDD and ATDD for the Enterprise
Quality Jam: BDD, TDD and ATDD for the EnterpriseQASymphony
 
How To Avoid Continuously Delivering Faulty Software
How To Avoid Continuously Delivering Faulty SoftwareHow To Avoid Continuously Delivering Faulty Software
How To Avoid Continuously Delivering Faulty SoftwareErika Barron
 
Test Driven Development
Test Driven DevelopmentTest Driven Development
Test Driven Developmentnikhil sreeni
 
DevLabs Alliance Top 20 Software Testing Interview Questions for SDET - by De...
DevLabs Alliance Top 20 Software Testing Interview Questions for SDET - by De...DevLabs Alliance Top 20 Software Testing Interview Questions for SDET - by De...
DevLabs Alliance Top 20 Software Testing Interview Questions for SDET - by De...DevLabs Alliance
 
DevLabs Alliance Top 20 Software Testing Interview Questions for SDET - by De...
DevLabs Alliance Top 20 Software Testing Interview Questions for SDET - by De...DevLabs Alliance Top 20 Software Testing Interview Questions for SDET - by De...
DevLabs Alliance Top 20 Software Testing Interview Questions for SDET - by De...DevLabs Alliance
 
Top 20 software testing interview questions for sdet
Top 20 software testing interview questions for sdetTop 20 software testing interview questions for sdet
Top 20 software testing interview questions for sdetDevLabs Alliance
 
Creating a successful continuous testing environment by Eran Kinsbruner
Creating a successful continuous testing environment by Eran KinsbrunerCreating a successful continuous testing environment by Eran Kinsbruner
Creating a successful continuous testing environment by Eran KinsbrunerQA or the Highway
 
Software testing and software development process
Software testing and software development processSoftware testing and software development process
Software testing and software development processGen Aloys Ochola Badde
 
An introduction to Software Testing and Test Management
An introduction to Software Testing and Test ManagementAn introduction to Software Testing and Test Management
An introduction to Software Testing and Test ManagementAnuraj S.L
 

Similaire à Test Policy and Practices (20)

Behavior Driven Development—A Guide to Agile Practices by Josh Eastman
Behavior Driven Development—A Guide to Agile Practices by Josh EastmanBehavior Driven Development—A Guide to Agile Practices by Josh Eastman
Behavior Driven Development—A Guide to Agile Practices by Josh Eastman
 
Quality for DevOps teams - Quality engineering in the DevOps culture
Quality for DevOps teams - Quality engineering in the DevOps cultureQuality for DevOps teams - Quality engineering in the DevOps culture
Quality for DevOps teams - Quality engineering in the DevOps culture
 
PMI-ACP Lesson 06 Quality
PMI-ACP Lesson 06 QualityPMI-ACP Lesson 06 Quality
PMI-ACP Lesson 06 Quality
 
Mastering BDD - Eran Kinsbruner Workshop Quest 2018
Mastering BDD - Eran Kinsbruner Workshop Quest 2018Mastering BDD - Eran Kinsbruner Workshop Quest 2018
Mastering BDD - Eran Kinsbruner Workshop Quest 2018
 
Quality Assurance and Testing services
Quality Assurance and Testing servicesQuality Assurance and Testing services
Quality Assurance and Testing services
 
How to build confidence in your release cycle
How to build confidence in your release cycleHow to build confidence in your release cycle
How to build confidence in your release cycle
 
How to become a Software Tester Carrier Path for Software Quality Tester
How to become a Software Tester Carrier Path for Software Quality TesterHow to become a Software Tester Carrier Path for Software Quality Tester
How to become a Software Tester Carrier Path for Software Quality Tester
 
Quality Jam: BDD, TDD and ATDD for the Enterprise
Quality Jam: BDD, TDD and ATDD for the EnterpriseQuality Jam: BDD, TDD and ATDD for the Enterprise
Quality Jam: BDD, TDD and ATDD for the Enterprise
 
How To Avoid Continuously Delivering Faulty Software
How To Avoid Continuously Delivering Faulty SoftwareHow To Avoid Continuously Delivering Faulty Software
How To Avoid Continuously Delivering Faulty Software
 
Test Driven Development
Test Driven DevelopmentTest Driven Development
Test Driven Development
 
Methodology: IT test
Methodology: IT testMethodology: IT test
Methodology: IT test
 
DevLabs Alliance Top 20 Software Testing Interview Questions for SDET - by De...
DevLabs Alliance Top 20 Software Testing Interview Questions for SDET - by De...DevLabs Alliance Top 20 Software Testing Interview Questions for SDET - by De...
DevLabs Alliance Top 20 Software Testing Interview Questions for SDET - by De...
 
DevLabs Alliance Top 20 Software Testing Interview Questions for SDET - by De...
DevLabs Alliance Top 20 Software Testing Interview Questions for SDET - by De...DevLabs Alliance Top 20 Software Testing Interview Questions for SDET - by De...
DevLabs Alliance Top 20 Software Testing Interview Questions for SDET - by De...
 
Top 20 software testing interview questions for sdet
Top 20 software testing interview questions for sdetTop 20 software testing interview questions for sdet
Top 20 software testing interview questions for sdet
 
Rakesh Resume
Rakesh ResumeRakesh Resume
Rakesh Resume
 
Creating a successful continuous testing environment by Eran Kinsbruner
Creating a successful continuous testing environment by Eran KinsbrunerCreating a successful continuous testing environment by Eran Kinsbruner
Creating a successful continuous testing environment by Eran Kinsbruner
 
Software testing and software development process
Software testing and software development processSoftware testing and software development process
Software testing and software development process
 
prod-dev-management.pptx
prod-dev-management.pptxprod-dev-management.pptx
prod-dev-management.pptx
 
Software_Testing.pptx
Software_Testing.pptxSoftware_Testing.pptx
Software_Testing.pptx
 
An introduction to Software Testing and Test Management
An introduction to Software Testing and Test ManagementAn introduction to Software Testing and Test Management
An introduction to Software Testing and Test Management
 

Plus de Talentica Software

Typescript: Beginner to Advanced
Typescript: Beginner to AdvancedTypescript: Beginner to Advanced
Typescript: Beginner to AdvancedTalentica Software
 
Nodejs Chapter 3 - Design Pattern
Nodejs Chapter 3 - Design PatternNodejs Chapter 3 - Design Pattern
Nodejs Chapter 3 - Design PatternTalentica Software
 
Connected World in android - Local data sharing and service discovery
Connected World in android - Local data sharing and service discoveryConnected World in android - Local data sharing and service discovery
Connected World in android - Local data sharing and service discoveryTalentica Software
 
Mobile App Monetization - Ecosystem & Emerging Trends
Mobile App Monetization - Ecosystem & Emerging TrendsMobile App Monetization - Ecosystem & Emerging Trends
Mobile App Monetization - Ecosystem & Emerging TrendsTalentica Software
 
Android Media Player Development
Android Media Player DevelopmentAndroid Media Player Development
Android Media Player DevelopmentTalentica Software
 
Cross Platform Mobile Technologies
Cross Platform Mobile TechnologiesCross Platform Mobile Technologies
Cross Platform Mobile TechnologiesTalentica Software
 
Big Data Technologies - Hadoop
Big Data Technologies - HadoopBig Data Technologies - Hadoop
Big Data Technologies - HadoopTalentica Software
 
Continous Integration: A Case Study
Continous Integration: A Case StudyContinous Integration: A Case Study
Continous Integration: A Case StudyTalentica Software
 
Technology Challenges in Building New Media Applications
Technology Challenges in Building New Media ApplicationsTechnology Challenges in Building New Media Applications
Technology Challenges in Building New Media ApplicationsTalentica Software
 
Flex on Grails - Rich Internet Applications With Rapid Application Development
Flex on Grails - Rich Internet Applications With Rapid Application DevelopmentFlex on Grails - Rich Internet Applications With Rapid Application Development
Flex on Grails - Rich Internet Applications With Rapid Application DevelopmentTalentica Software
 
Building scalable and language independent java services using apache thrift
Building scalable and language independent java services using apache thriftBuilding scalable and language independent java services using apache thrift
Building scalable and language independent java services using apache thriftTalentica Software
 

Plus de Talentica Software (18)

Typescript: Beginner to Advanced
Typescript: Beginner to AdvancedTypescript: Beginner to Advanced
Typescript: Beginner to Advanced
 
Web 3.0
Web 3.0Web 3.0
Web 3.0
 
Remix
RemixRemix
Remix
 
Nodejs Chapter 3 - Design Pattern
Nodejs Chapter 3 - Design PatternNodejs Chapter 3 - Design Pattern
Nodejs Chapter 3 - Design Pattern
 
Node.js Chapter1
Node.js Chapter1Node.js Chapter1
Node.js Chapter1
 
Micro Frontends
Micro FrontendsMicro Frontends
Micro Frontends
 
Advanced JavaScript
Advanced JavaScriptAdvanced JavaScript
Advanced JavaScript
 
Connected World in android - Local data sharing and service discovery
Connected World in android - Local data sharing and service discoveryConnected World in android - Local data sharing and service discovery
Connected World in android - Local data sharing and service discovery
 
Mobile App Monetization - Ecosystem & Emerging Trends
Mobile App Monetization - Ecosystem & Emerging TrendsMobile App Monetization - Ecosystem & Emerging Trends
Mobile App Monetization - Ecosystem & Emerging Trends
 
Android Media Player Development
Android Media Player DevelopmentAndroid Media Player Development
Android Media Player Development
 
Cross Platform Mobile Technologies
Cross Platform Mobile TechnologiesCross Platform Mobile Technologies
Cross Platform Mobile Technologies
 
Big Data Technologies - Hadoop
Big Data Technologies - HadoopBig Data Technologies - Hadoop
Big Data Technologies - Hadoop
 
Big Data – Are You Ready?
Big Data – Are You Ready?Big Data – Are You Ready?
Big Data – Are You Ready?
 
Legacy modernization
Legacy modernizationLegacy modernization
Legacy modernization
 
Continous Integration: A Case Study
Continous Integration: A Case StudyContinous Integration: A Case Study
Continous Integration: A Case Study
 
Technology Challenges in Building New Media Applications
Technology Challenges in Building New Media ApplicationsTechnology Challenges in Building New Media Applications
Technology Challenges in Building New Media Applications
 
Flex on Grails - Rich Internet Applications With Rapid Application Development
Flex on Grails - Rich Internet Applications With Rapid Application DevelopmentFlex on Grails - Rich Internet Applications With Rapid Application Development
Flex on Grails - Rich Internet Applications With Rapid Application Development
 
Building scalable and language independent java services using apache thrift
Building scalable and language independent java services using apache thriftBuilding scalable and language independent java services using apache thrift
Building scalable and language independent java services using apache thrift
 

Dernier

Developing An App To Navigate The Roads of Brazil
Developing An App To Navigate The Roads of BrazilDeveloping An App To Navigate The Roads of Brazil
Developing An App To Navigate The Roads of BrazilV3cube
 
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...Neo4j
 
HTML Injection Attacks: Impact and Mitigation Strategies
HTML Injection Attacks: Impact and Mitigation StrategiesHTML Injection Attacks: Impact and Mitigation Strategies
HTML Injection Attacks: Impact and Mitigation StrategiesBoston Institute of Analytics
 
Tech Trends Report 2024 Future Today Institute.pdf
Tech Trends Report 2024 Future Today Institute.pdfTech Trends Report 2024 Future Today Institute.pdf
Tech Trends Report 2024 Future Today Institute.pdfhans926745
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerThousandEyes
 
Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsMaria Levchenko
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024Rafal Los
 
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
 
Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsJoaquim Jorge
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationRadu Cotescu
 
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdfUnderstanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdfUK Journal
 
Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...Enterprise Knowledge
 
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
 
AWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of TerraformAWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of TerraformAndrey Devyatkin
 
What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?Antenna Manufacturer Coco
 
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024The Digital Insurer
 
[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdfhans926745
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)Gabriella Davis
 
Real Time Object Detection Using Open CV
Real Time Object Detection Using Open CVReal Time Object Detection Using Open CV
Real Time Object Detection Using Open CVKhem
 

Dernier (20)

Developing An App To Navigate The Roads of Brazil
Developing An App To Navigate The Roads of BrazilDeveloping An App To Navigate The Roads of Brazil
Developing An App To Navigate The Roads of Brazil
 
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...Workshop - Best of Both Worlds_ Combine  KG and Vector search for  enhanced R...
Workshop - Best of Both Worlds_ Combine KG and Vector search for enhanced R...
 
HTML Injection Attacks: Impact and Mitigation Strategies
HTML Injection Attacks: Impact and Mitigation StrategiesHTML Injection Attacks: Impact and Mitigation Strategies
HTML Injection Attacks: Impact and Mitigation Strategies
 
Tech Trends Report 2024 Future Today Institute.pdf
Tech Trends Report 2024 Future Today Institute.pdfTech Trends Report 2024 Future Today Institute.pdf
Tech Trends Report 2024 Future Today Institute.pdf
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed texts
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024
 
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...
 
Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and Myths
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organization
 
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdfUnderstanding Discord NSFW Servers A Guide for Responsible Users.pdf
Understanding Discord NSFW Servers A Guide for Responsible Users.pdf
 
Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...
 
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
 
AWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of TerraformAWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of Terraform
 
+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...
 
What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?What Are The Drone Anti-jamming Systems Technology?
What Are The Drone Anti-jamming Systems Technology?
 
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
 
[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)
 
Real Time Object Detection Using Open CV
Real Time Object Detection Using Open CVReal Time Object Detection Using Open CV
Real Time Object Detection Using Open CV
 

Test Policy and Practices

  • 2. Copyright © 2020 Talentica Software (I) Pvt Ltd. All rights reserved. Test Policy and Practices • What is Testing • Challenges in Testing • Levels of Testing • Testing Best Practices and Policies • Test Driven Design (TDD Testing) • Behavioral Driven Design (BDD Testing) • TDD v/s BDD 2
  • 3. Copyright © 2020 Talentica Software (I) Pvt Ltd. All rights reserved. 3
  • 4. Copyright © 2020 Talentica Software (I) Pvt Ltd. All rights reserved. Software testing is a process, to evaluate the functionality of a software application with an intent to find whether the developed software met the specified requirements or not and to identify the defects to ensure that the product is defect free in order to produce the quality product. 4
  • 5. Copyright © 2020 Talentica Software (I) Pvt Ltd. All rights reserved. Software Test Cycle 5
  • 6. Copyright © 2020 Talentica Software (I) Pvt Ltd. All rights reserved. Software Testing Challenges • Inadequate Product/Business Knowledge • Changing Requirements • No or Less Documentation • Frequent Regression Cycle • Lack on Communication • No Quality Measurements • Agile Becomes Waterfall • Tool Selection 6
  • 7. Copyright © 2020 Talentica Software (I) Pvt Ltd. All rights reserved. Testing Levels • Unit Testing • Component Testing • Integration Testing • System Testing • Acceptance Testing • Alpha Testing • Beta Testing 7
  • 8. Copyright © 2020 Talentica Software (I) Pvt Ltd. All rights reserved. Testing Levels (Cont.) Unit Testing • Unit Testing is a level of software testing where individual units of a software are tested. • The purpose is to validate that each unit of the software performs as designed. • A Unit is a smallest testable part of Application like classes, Interface or a function/procedure. Component Testing • Component testing Unit Testing is a level of software testing where individual components of a software are tested. • It's also referred to as Module Testing. 8
  • 9. Copyright © 2020 Talentica Software (I) Pvt Ltd. All rights reserved. Testing Levels (Cont.) Integration Testing • Integration Testing is a level of software testing where individual units/ components are combined and tested as a single unit. • The main function or goal of this testing is to test the interfaces between the units/modules. System Testing • System Testing is performed on a complete integrated system to evaluate the compliance of the system with the corresponding requirements. • The purpose of this test is to evaluate the system’s compliance with the specified requirements. 9
  • 10. Copyright © 2020 Talentica Software (I) Pvt Ltd. All rights reserved. Testing Levels (Cont.) Acceptance Testing • Acceptance testing, a testing technique performed to determine whether or not the software system has met the requirement specifications. • The main purpose of this test is to evaluate the system • Acceptance criteria may be defined on the basis of the following attributes : -- Functional Correctness and Completeness -- Data Integrity -- Data Conversion -- Usability -- Performance -- Confidentiality and Availability -- Scalability 10
  • 11. Copyright © 2020 Talentica Software (I) Pvt Ltd. All rights reserved. Testing Levels (Cont.) Alpha Testing • Alpha Testing is a Pre-release activity and one of the types of Acceptance Testing. • Testing activity is carried out in a much-controlled manner and it is not accessible by the end- users/market. Beta Testing • Beta testing also known as user testing takes place at the end users site by the end users to validate the usability, functionality, compatibility, and reliability testing. • It allows the "real" customer an opportunity to provide inputs into the design, functionality, and usability of a product. 11
  • 12. Copyright © 2020 Talentica Software (I) Pvt Ltd. All rights reserved. Testing Best Practices and Policies • Analyze the Risk. • Never/Ever Ignore a Bug. • Think from End User Prospective. • Start Automation post analyzing available tools. • Keep yourself Updated with latest QA Market Trends. • Test Early, Test Often. • Implementing Test Coverage and Code Coverage • Don’t rely just on Black Box Testing, go for White Box/Grey Box Testing. • Take Scalability and Application Performance into consideration while Testing. • Automate as much as possible to avoid redundant work. 12
  • 13. Copyright © 2020 Talentica Software (I) Pvt Ltd. All rights reserved. Common Mistakes we make as QA • Not taking Bigger Picture/Business into Account. • Gaps in Requirement Understanding. • Not thinking from End User Prospective. • Starting Automation without analyzing available tools. • Criticising developers • Frequently changing the focus • Not asking developer’s help • Incorrectly evaluate the impact of a new functionality/fix 13
  • 14. Copyright © 2020 Talentica Software (I) Pvt Ltd. All rights reserved. Test Driven Development (TDD) • TDD stands for Test Driven Development. • In this software development technique, we create the test cases first and then write the code underlying those test cases. • TDD is a development technique, it can also be used for automation testing development. • TDD, take more time for development however, probability of finding defects is low. • TDD results in improved quality of code and the code that is more reusable and flexible. • TDD also helps in achieving high test coverage. • The most challenging thing for developers/qa following TDD is to write their test cases before writing the code. 14
  • 15. Copyright © 2020 Talentica Software (I) Pvt Ltd. All rights reserved. Test Driven Development (TDD) 15
  • 16. Copyright © 2020 Talentica Software (I) Pvt Ltd. All rights reserved. Test Driven Development - Process • Write a test case: Based on the requirements, write all automated test case. • Run all the test cases: Run these automated test cases on the currently developed code. • Develop the code for that test cases: If the test case fails, then, write the code to make that test-case work as expected. • Run test cases again: Run the test cases again and check if all the test cases developed so far are implemented. • Refactor your code: This is an optional step. However, it's important to refactor your code to make it more readable and reusable. • Repeat above steps for new test cases: Repeat the cycle for the other test cases until all the test cases are implemented. 16
  • 17. Copyright © 2020 Talentica Software (I) Pvt Ltd. All rights reserved. Behavioral Driven Development (BDD) • BDD stands for Behavioral Driven Development. • BDD is an extension to TDD where instead of writing the test cases, we start by writing a behavior. • Once behavior's are written, we develop the code which is required for our application to perform the behavior. • The scenario defined in the BDD approach makes it easy for the developers, testers and business users to collaborate. • BDD is considered a best practice when it comes to automated testing as it focuses on the behavior of the application and not on thinking about the implementation of the code. • The behavior of the application is the center of focus in BDD and it forces the developers and testers to walk-in the customer’s shoes. 17
  • 18. Copyright © 2020 Talentica Software (I) Pvt Ltd. All rights reserved. Behavioral Driven Development - Process • Write the behavior of the application: The behavior of an application is written in simple English like language by the product owner or the business analysts or QAs. • Write the automated scripts: This simple English like language is then converted into programming tests. • Implement the functional code: The functional code underlying the behavior is then implemented. • Check if the behavior is successful: Run the behavior and see if it is successful. If successful, move to the next behavior otherwise fix the errors in the functional code to achieve the application behavior. • Refactor or organize code: Refactor or organize your code to make it more readable and re- usable. • Repeat above steps for new behavior: Repeat the steps to implement more behaviors in your application. 18
  • 19. Copyright © 2020 Talentica Software (I) Pvt Ltd. All rights reserved. TDD v/s BDD 19 TDD BDD Stands for Test Driven Development Stands for Behaviour Driven Development The process starts by writing a test case. The process starts by writing a scenario as per the expected behavior. TDD focuses on how the functionality is implemented. BDD focuses on the behavior of an application for the end user. Test cases are written in a programming language. Scenarios are more readable when compared to TDD as they are written in simple English format. Might be a better approach for projects which involve API and third-party tools. Might be a better approach for projects which are driven by user actions. For eg: e-commerce website, application system, etc. Some of the tools which support TDD are: JUnit, TestNG, NUnit, etc. Some of the tools which support BDD are SpecFlow, Cucumber, MSpec, etc.
  • 20. Copyright © 2020 Talentica Software (I) Pvt Ltd. All rights reserved. Testing framework – A testing framework is a set of guidelines or rules used for creating and designing test cases. – These guidelines could include coding standards, test-data handling methods, object repositories, processes for storing test results, etc 20
  • 21. Copyright © 2020 Talentica Software (I) Pvt Ltd. All rights reserved. – Mocha – Jasmine – Jest 21
  • 22. Copyright © 2020 Talentica Software (I) Pvt Ltd. All rights reserved. • Mocha – Mocha is a feature-rich JavaScript test framework running on Node.js and in the browser 22
  • 23. Copyright © 2020 Talentica Software (I) Pvt Ltd. All rights reserved. • Context, describe, it functions • Hooks • Done callback and async code • Timeouts • only and skip function • Mocha opts • Reporters 23
  • 24. Copyright © 2020 Talentica Software (I) Pvt Ltd. All rights reserved. • Demo 24
  • 25. Copyright © 2020 Talentica Software (I) Pvt Ltd. All rights reserved. Assertions – Assertion libraries are tools which provides you a way to verify your expected output with current output – Without assertions a test is insignificant 25
  • 26. Copyright © 2020 Talentica Software (I) Pvt Ltd. All rights reserved. • Chai • expect.js • should.js • unexpected.js 26
  • 27. Copyright © 2020 Talentica Software (I) Pvt Ltd. All rights reserved. • Chai – Chai is a BDD / TDD assertion library for node – Has best of both worlds expect.js, should.js – Has various custom plugins 27
  • 28. Copyright © 2020 Talentica Software (I) Pvt Ltd. All rights reserved. • Demo 28
  • 29. Copyright © 2020 Talentica Software (I) Pvt Ltd. All rights reserved. Mocks/Test doubles – Test Double are pretend object used in place of a real object for testing purposes. – It is used so that a function/component/object can be tested in isolation 29
  • 30. Copyright © 2020 Talentica Software (I) Pvt Ltd. All rights reserved. • Dummies • Stubs • Spies 30
  • 31. Copyright © 2020 Talentica Software (I) Pvt Ltd. All rights reserved. • Dummy – Dummy objects are passed around but never actually used. Usually they are just used to fill parameter lists. 31
  • 32. Copyright © 2020 Talentica Software (I) Pvt Ltd. All rights reserved. • spies – A test spy is an object that records its interaction with other objects throughout the code base 32
  • 33. Copyright © 2020 Talentica Software (I) Pvt Ltd. All rights reserved. • stub – Test stubs are fake objects with pre- programmed behavior 33
  • 34. Copyright © 2020 Talentica Software (I) Pvt Ltd. All rights reserved. • Demo 34
  • 35. Copyright © 2020 Talentica Software (I) Pvt Ltd. All rights reserved. Best Practices – Don't use arrow function since is binds "this" and cannot use mocha context – Use timeouts as when you need to setup something before test execution – Do not create multiple tests to test single scenario with different data – Test your test code with only/skip – Add message in assertions 35
  • 36. Copyright © 2020 Talentica Software (I) Pvt Ltd. All rights reserved. 36