SOFTWARE TESTING - CST458
Saju CJ
SYLLABUS : Module - 1
Some Popular Errors – Ariane 5, Therac 25, Intel Pentium Bug.
What is Software testing? Why should it be tested? Software Quality, Role of Testing.
Testing Process –
Level 0 thinking, Level 1 thinking, Level 2 thinking, Level 3 thinking, Level 4 thinking.
Software Testing Terminologies –
Verification, Validation and Testing, Faults, Error and Bug, Test cases, Coverage Criteria.
Types of Testing-
Unit testing, integration testing, System testing, Acceptance testing, Beta testing,
Functional testing, Stress testing, Performance testing, Usability testing and Regression
testing.
Testing Methods - Black Box testing, White Box testing, Grey Box testing.
What is SOFTWARE TESTING ?
To check whether the actual software product matches expected requirements
To understand gap / missing requirements in contrast to actual requirements
To ensure that software product is Defect free
To evaluate one or more properties of interest
To identify any issue OR Bug’s
Testing is done manual or automated tools
If outcome matches desired expectations, before used by customer / end-user
Why should we TEST a software ?
To achieve a bug free product
To improve the software in terms of efficiency, accuracy, usability etc.
Aims at measuring a Software functionality, scalability, performance etc.
To identify any bugs or errors early, before its delivery to Customer
To ensure reliability, security and high performance
For time saving, cost effectiveness and MOST importantly …….. customer satisfaction
Software bugs could be expensive or even dangerous like loss of human life(s)
To evaluate the code, which is done as per Customer requirements
Ensures that only quality products are released to consumers
ROLE for Software Testing?
Important reasons why we do software testing:
Identify defects early
Improves product quality
To Increase customer trust and satisfaction
Detect security vulnerabilities
Saves money
KEY Players
1) Customer
2) Developer
3) Tester
4) Sales (Marketing)
5) Manager (s)
6) Architect (Coding / Testing (or) both)
Software Quality VS Testing
Software Quality Testing
To ensure implementation of processes, To ensure the identification of
procedures and standards in context to bugs/error/defects in a software
verification of developed software and
intended requirements
Focuses only on processes and procedures Focuses on actual testing
Process-oriented activities Product-oriented activities
Preventive activities preventive process
subset of “Software Test Life Cycle” Testing is the subset of “Quality Control”
(corrective process)
VERIFICATION vs VALIDATION
Verification:
Refers to set of tasks that ensure that the software correctly implements a specific
function
Testing done before customer delivery
Validation:
Refers to different set of tasks that ensure that the software that has been built is
traceable to customer requirements
Its more Customer testing like Prototype, Acceptance Testing etc.
BUG vs DEFECT vs ERROR vs FAULT
Key players:
1. Developer
2. Tester
What is a TESTCASE ?
Set of actions performed, to determine if it satisfies the requirement(s)
Define how to test a Software
Set of instructions for a tester, to validate a specific aspect of Software functionality
If the test fails, the result might be a software defect that the organization can triage
Document that gives detailed step-by-step instructions on how to perform Testing
The conditions necessary for the start of the test with one or more inputs (if any)
Group of conditions If a software is working as per the customer's requirement(s)
Includes preconditions, Testcase ID, Testcase name, input(s), expected result etc.
COVERAGE Criteria
Measures to qualify if a test objective is satisfied when executing test cases
To estimate the quality of test cases
Coverage Criteria has to be considered in software testing
One or more rules that imposes test requirements on a Testcase
Number of lines that are covered by a test and divide by the total number of lines in that
Software
Example:
Consider an Software with 5,000 lines of code
If Testcases can test only 1,000 lines of code, then test/code coverage is 20%
Types of Testing
Types Done by Modules Tested
Unit Testing Developer One module
Integration testing Test Engineer 2+ module’s
System testing Test Engineer All modules (Complete
Software)
Acceptance testing Customer All modules
Beta testing Real user(s) All modules
Types of Testing
Types of Testing (Contd….)
Types Done by Modules Tested
Functional testing All modules
Tester
Stress testing ( sometimes by
Developer
/customer or
Performance testing anyone.. )
Usability testing
Regression testing
Functional Testing
Functionality: Set of functions that a Software can perform
Type of software testing that validates software against functional
requirements
Type of black-box testing (focuses on Software specification rather
than actual code)
Testcases are based on specifications of the software component(s)
under test
To verify the functionality of the software application, if the function is
working according to the requirement specification
To confirm if the functionality of an Software behaves as expected
Stress Testing
Example of Stress Testing:
During festival time, an online shopping site may witness a spike in traffic, or
when it announces a sale
To check whether the system works under abnormal conditions
To analyze the behavior of a software after a failure
Displaying appropriate error message when the system is under stress
To makes sure that the Software recovers after failure
System failure under extreme conditions could result in enormous revenue loss
It is better to be prepared for extreme conditions by executing Stress Testing
To confirm if unexpected failures do not cause security issues
If the software has saved the data before crashing or not
Performance Testing
Its a non-functional software testing technique
To verify the behavior of Software by applying some load
To determine how the stability, speed, scalability, and responsiveness of
an Software holds up under a given workload
Factors to be considered : Response time, Load, and Stability of Software
objective is to eliminate performance congestion, identify bottlenecks
This Testing is done only after a software is functionally stable and reliable
Example :
How quickly the server responds to the user's request
Handling expected number of users or transactions
A software can be accessed by multiple users concurrently
Performance vs Stress Testing
Performance Testing Stress Testing
to check under varying loads to check with sudden increase in
load
to determine the behavior of High load for an extended period, a
software under normal conditions software should not crash
Verifies scalability, speed, reliability, It verifies only the stability of the
etc. software
Load varies from lowest to highest load is directly changed from the
limit uniformly lowest to the highest(extreme) point
Usability Testing
Focused on end-user, on how easily an user is able to use the interface like
GUI
If design of the interface(GUI) was friendly enough
it gives direct input on how real users access a software
To measure how easy and user-friendly a software
Focuses on user’s ease of using an Software
How easy a design is to use with a group of representative users
testing your product with real users and observe the user(s) behavior
Example : Do users easily find the “buy now” button? on an e-commerce
website
It covers Functional and Acceptance Testing
Regression Testing
to confirm that a recent code change has not affected existing features
Complete or partial selection of Testcases, are re-executed to ensure existing
functionalities work fine
to ensure new code changes do not have side effects on already working
functionalities
To make sure old code still works with the latest code changes
This is done on already released product(to improve quality or additional feature
of an Software) or new Development
Re-running functional and non-functional tests to ensure that previously
developed and tested software still performs as expected after a change
Mostly done using Automation (OR) using already created scripts
Regression Testing - Example
Chrome - first released in 2008
Google Drive - Launched during 2012
Google Classroom - release year: 2014
Google Duo - Initial release Year: 2016
Google Chat - release year 2017
Google meet - replaced the consumer-facing Google Duo in late 2022
Testing Methods
BLACK Box testing GREY Box testing WHITE Box testing
Mostly done by Tester End-user (acceptance) Generally done by
testing developers
Testing has Low medium level of high-level granularity
granularity(scale or level of granularity
detail)
functionality of the combination of Black Box tests the software with
software is not known and the White Box Testing knowledge on source
technique(s) code
Test expected behavior of test design is tested by Testing developer’s point
Software Functions, from using the information of view
user’s point of view about the code
Testing Process (Thinking of a TESTER)
1. Level 0 (Developer)
• There’s no difference between testing and debugging.
2. Level 1 (Tester with Developer mind)
• To show if the software works.
3. Level 2 (Tester wants to dominate)
• Testing is done, show that the software doesn’t work.
4. Level 3 (Tester start to work with Developer)
• NOT to prove anything specific, but to reduce the risk of using the
software.
5. Level 4 (both Tester and Developer are in Sync)
• Testing is a mental discipline that helps all IT professionals develop
higher quality software
Testing process – Level 0
debugging and not actual testing
adopted by those interested in coding/Programming (CSE)
students get their programs to compile, then debug the
programs
inputs are chosen either arbitrarily or provided by professor
This model does not distinguish between a program’s
incorrect behavior and a mistake within the program
very little to help develop software that is reliable or safe
Testing process – Level 1
purpose of testing is to show correctness
Next level from 0-level, but both are similar
Testing is ineffective, as no bugs were found
Tester acts like a developer !
Test team are unaware of what portion of software is tested
and pending scenarios/testcases
no way to quantitatively express or evaluate their work
Testing process – Level 2
To show that the software does not work
purpose is to show failures
Tester uses abnormal or negative or un-used scenarios
level 2 testing puts testers and developers into an
BAD(conflict) relationship
Tester finds failures but actual scenario/testcases are not
tested properly
Testing process – Level 3
not to prove anything specific by the Tester
To reduce bugs in software
Tester can show the presence of “Test team”
when we use software, we incur some risk(Bugs)
Risk(Bugs) may be small or catastrophic, but risk is
always there
both testers and developers START to work together
Testing process – Level 4
To develop high quality software
Software with low risk (Bug's)
testers and developers are on the same “team”
Find ways to increase quality
Example : creating tests that cause the software to fail is
only one
Tester takes responsibility of measuring and improving
software quality
Tester expertise will help the developers
Questions
1. Why do we need Testing in developing a software ?
2. How do you plan Testing ?
3. If a Tester is new for testing, which level of thinking he has ?
4. If a Tester has coding knowledge, what Testing method can be done ?
5. What is the difference between Software Quality and Software Testing ?
6. To develop a good quality software, what level of thinking a Tester need ? Explain why ?
7. Difference between Verification and Validation ?
8. Imagine you are testing a new software for chat application, write 5 testcases to test this new CHAT software
9. If tester has tested 900 lines of code in a software with 1000 lines of code(in total), what is the code coverage for this testing ?
10. When can a BUG be also called as DEFECT ?
11. Can Acceptance and Beta testing be similar ? Explain with reason ?
12. In which scenario does both Stress and Performance testing are