0% found this document useful (0 votes)
25 views37 pages

STQA-Chapter_1

The document provides an introduction to software testing, detailing its importance in identifying software bugs and ensuring quality assurance throughout the software development life cycle (SDLC). It outlines the testing process, roles involved, when to start and stop testing, and the significance of the Software Testing Life Cycle (STLC) in improving software quality and reducing costs. Additionally, it discusses various testing methodologies, techniques, and the importance of measuring testing effectiveness.

Uploaded by

dagimnega66
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
25 views37 pages

STQA-Chapter_1

The document provides an introduction to software testing, detailing its importance in identifying software bugs and ensuring quality assurance throughout the software development life cycle (SDLC). It outlines the testing process, roles involved, when to start and stop testing, and the significance of the Software Testing Life Cycle (STLC) in improving software quality and reducing costs. Additionally, it discusses various testing methodologies, techniques, and the importance of measuring testing effectiveness.

Uploaded by

dagimnega66
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
You are on page 1/ 37

CHAPTER ONE

INTRODUCTION TO SOFTWARE TESTING


S O F T WA R E T E S T I N G A N D Q U A L I T Y A S S U R A N C E

1
Introduction to Software Testing
•“When we are testing something, we are checking whether it is OK “
•Software testing is a process used to identify software’s correctness by considering all its
attributes (Reliability, Scalability, Portability, Reusability, and Usability) and evaluating the
execution of software components to find the software bugs or errors or defects.
•In simple words, software testing is an activity to check that the software system is defect-
free.
•Testing is necessary because we all make mistakes, some of those mistakes are unimportant,
but some of them are expensive or dangerous. We need to check everything and anything we
produce because things can always go wrong – humans make mistakes all the time.
•Software bugs can potentially cause monetary and even human loss.
•It is important to ensure that the application does not result in any failures.
2
What is Testing?
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.
In simple words, testing is executing a system in order to identify any gaps, errors, or
missing requirements in contrary to the actual requirements.
According to ANSI/IEEE 1059 standard, Testing can be defined as - 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.

3
Who does Testing?
It depends on the process and the associated stakeholders of the project(s). In the IT industry, large
companies have a team with responsibilities to evaluate the developed software in context of the
given requirements. Moreover, developers also conduct testing which is called Unit Testing. In most
cases, the following professionals are involved in testing a system within their respective capacities −
◦ Software Tester
◦ Software Developer
◦ Project Lead/Manager
◦ End User
Different companies have different designations for people who test the software on the basis of their
experience and knowledge such as Software Tester, Software Quality Assurance Engineer, QA
Analyst, etc.
It is not possible to test the software at any time during its cycle. The next two sections state when
testing should be started and when to end it during the SDLC.
4
When to Start Testing?
An early start to testing reduces the cost and time to rework and produce error-free software that is delivered
to the client. However, in the Software Development Life Cycle (SDLC), testing can be started from the
Requirements Gathering phase and continued till the deployment of the software.
It also depends on the development model that is being used. For example, in the Waterfall model, formal
testing is conducted in the testing phase; but in the incremental model, testing is performed at the end of every
increment/iteration, and the whole application is tested at the end.
Testing is done in different forms at every phase of SDLC −
◦ During the requirement gathering phase, the analysis and verification of requirements are also considered as
testing.
◦ Reviewing the design in the design phase with the intent to improve the design is also considered as testing.
◦ Testing performed by a developer on completion of the code is also categorized as testing.

5
When to Stop Testing?
It is difficult to determine when to stop testing, as testing is a never-
ending process and no one can claim that a software is 100% tested.
The following aspects are to be considered for stopping the testing
process −
◦ Testing Deadlines
◦ Completion of test case execution
◦ Completion of functional and code coverage to a certain point
◦ Bug rate falls below a certain level and no high-priority bugs are identified
◦ Management decision

6
How Much Should We Test?
The question of "how much" to test is a crucial one. Testing everything is impossible, and prioritizing testing
efforts is essential. The ideal balance is achieved by targeting areas with a higher risk of bugs and potential
impact. This involves understanding the critical functionalities, user flows, and potential failure points of the
software.
Risk Analysis: Identify areas of the software with a higher risk of bugs and potential impact, based on factors
like complexity, criticality, and user interactions
Prioritization: Prioritize testing efforts towards the most critical areas identified in the risk analysis, ensuring
adequate coverage of core functionalities.
Testing Coverage: Establish realistic testing coverage targets based on the identified risks and priorities,
ensuring that critical areas are adequately tested.
Continuous Testing: Adopt a continuous testing approach, performing regular testing throughout the
development lifecycle to catch bugs early and prevent them from accumulating.

7
Test Cases
 A Test Case is a documented set of conditions or actions used to verify that a software application functions
as expected. It outlines inputs, execution steps, and expected outcomes.
 Each test case typically includes a title, description, test steps, and expected results.
 In its most basic form, a test case is a simple pair of <input, expected outcome>.
 In stateless systems, where the outcome depends solely on the current input, test cases are very simple in
structure.
 If a program under test is expected to compute the square root of nonnegative numbers, then examples of
test cases can be:
 TC1: <0, 0>
 TC2: <25, 5>
 TC3: <40, 6.324553>

8
Selection of Good Test Cases
Test cases are specific scenarios designed to test different aspects of the software. Selecting good test cases is
crucial for effective testing. These cases should target key functionalities, boundary conditions, error handling,
and potential user scenarios, providing comprehensive coverage of the software's features.
1. Functional Testing: Verify that the software meets its intended functionality. For example, test if a login
feature correctly authenticates users.
2. Performance Testing: Ensure that the software performs adequately under different load conditions. For
example, test how the website responds with a large number of concurrent users.
3. Security Testing: Identify potential security vulnerabilities in the software. For example, test if sensitive
data is adequately protected.
4. Usability Testing: Evaluate the user experience and ensure the software is easy to use and understand. For
example, test if users can easily navigate and complete tasks.

9
Measurement of Testing
Measuring the effectiveness of testing is essential for improving the process. This involves tracking
various metrics like defect density, test coverage, and time to resolution. These metrics provide insights
into the quality of the software, the efficiency of the testing process, and areas for improvement.

Defect Density Number of bugs found per line of code or unit of functionality.
Test Coverage Percentage of code or functionality covered by test cases.
Time to Resolution Average time taken to fix bugs and implement changes.
Percentage of tests that are automated, reducing manual effort and
Test Automation Rate
increasing efficiency.
Traceability Matrix associate test cases with requirements and measure coverage
Test Case Design Yield
metric to measure test case design effectiveness
(TCDY)

10
Software Testing Life Cycle (STLC)
The procedure of software testing is also known as STLC (Software Testing Life Cycle) which
includes phases of the testing process. The testing process is executed in a well-planned and
systematic manner. All activities are done to improve the quality of the software product.
Let's see, the different steps of STLC.
Software testing life cycle contains the following steps:
Requirement Analysis
Test Plan Creation
Environment setup
Test case Execution
Defect Logging
Test Cycle Closure
We will discuss each one of these steps in detail in the coming sections.

11
Characteristics of STLC
STLC characteristics define the scope of testing and its importance as a part of SDLC.
Here are some of them:
1. STLC is a fundamental section of SDLC, but it only consists of testing phases.
2. The phases of STLC start soon after requirement documents are defined.
3. STLC follows a series of steps in a sequential manner to yield quality software that
functions as per the requirement document.
In STLC, before starting any phase, you will have to analyze and define the scope of
testing, the entry and exit criteria, and the test cases. All this helps to decrease the test cycle
time and enhance product quality. And after the development phase is complete, the testing
team can begin the execution using the test cases.

12
Importance of Software Testing Life Cycle
Quality and dependability of software products are ensured by the Software Testing Life Cycle (STLC).

Early Detection of Defects: The STLC initiative takes place at an early stage of software
development. This means that bugs can be caught and eliminated before they grow into bigger issues
later down the line. This approach saves time and resources as it deals with problems when they are less
costly to address.

Improved Quality: When all components of the software are tested to ensure they meets the required
standards including performance and security – it helps improve quality.

Risk management: Risk assessment and mitigation strategies are part of STLC. When potential risks
are identified and worked on during the testing phase, this helps reduce the occurrences of software
failure or unexpected behavior in production.

13
Importance of Software Testing Life Cycle..
Clear Testing Goals: For each phase of STLC, there are particular deliverables and goals— like the test plans, test
cases, and test reports. This clear understanding makes sure that the tests are done in an organized way which helps
to deliver better outcomes from the testing process.

Cost Efficiency: Although the adoption of STLC is time and resource consuming at the outset, it eventually leads
to curtailment of expenses related to defects that surface post release. It costs a lot less to address issues if they are
discovered and dealt with during the development phase than after the software has been rolled out.

Customer Satisfaction: When properly tested software is delivered, it not only does what the customer expects in
terms of functionality, reliability, and performance but also wows user satisfaction, leading to trust by end users in
the software system.

Compliance and Standards: If these are met by the software, it adheres to STLC, thus making sure that the
software is compliant with required regulatory standards and guidelines. This can be very important in industries
such as healthcare, finance, or aerospace where the issue of reliability and safety of software is crucial.

Continuous Improvement: STLC helps make things better by giving feedback at different points. This allows us
to learn from testing and use that to improve development processes, tools, and frameworks
14
What is the Role of Software Testing Life Cycle?
The role of STLC is primarily to identify issues in the application as soon as possible and
record it for developers to understand and resolve. For testers, STLC assists in the
following:
 Fine-tuning the agile process, making it effective and efficient for cross-team
communication
 Clearly defining the deadlines for project testing
 Properly documenting the goals and objectives of every project and following through
consistently
 Ensuring and verifying that the objectives of all the phases are accurately met
 Testing each and every feature of the software before passing it for adding more features
 Analyzing the tasks that can be automated to improve the testing quality

15
Here are some of the common activities in STLC
that you would have to execute:
 Analyzing all the requirements of the project
 Creating a document that measures the progress of the testing
 Identifying the testing types and techniques you need for the project at hand
 Determining which environment to test your application on
 Prioritizing the right tasks and understanding which of those can be automated
 Listing down the automation tools you need to run your STLC tests

Some of the popular automation tools you can use are Selenium, Cypress,
and TestNG. All of these have different features and provide varying
services to your testing needs. You can choose the one that complements
your project.

16
Methodologies of Software Testing Life Cycle
There are a few main methodologies used in STLC:
1. Waterfall Model
2. Agile Model
3. Scrum
4. DevOps
5. Iterative Model
6. V Model (Verification and Validation model)

17
Verification & Validation
These two terms are very confusing for most people, who use them interchangeably. The
following table highlights the differences between verification and validation.

Sr.No. Verification Validation


Verification addresses the concern: "Are you Validation addresses the concern: "Are you
1
building it right?" building the right thing?"
Ensures that the software system meets all the Ensures that the functionalities meet the
2
functionality. intended behavior.
Verification takes place first and includes the Validation occurs after verification and mainly
3
checking for documentation, code, etc. involves the checking of the overall product.
4 Done by developers. Done by testers.
It has static activities, as it includes collecting
It has dynamic activities, as it includes
5 reviews, walkthroughs, and inspections to executing the software against the
verify a software. requirements.
It is a subjective process and involves
It is an objective process and no subjective
6 subjective decisions on how well a software
decision should be needed to verify a software.
works.

18
Advantages and Best Practices of STLC
STLC makes sure to everything is tested thoroughly, catching problems early
on to make sure the product is reliable and top quality. This saves money on
fixing things later.
STLC also helps reduce risks and keep customers happy, which helps in
improving and meeting industry standards.
Plus, STLC helps teams work together better and be more efficient.

19
What are Entry and Exit Criteria in STLC?
STLC must comply with entry and exit criteria to be termed as successful. Ideally, the QA team takes
care of this point and only begins/completes the next STLC phase after both criteria are met. Both these
criteria are defined for each phase of STLC.

Entry Criteria: Entry criteria for an STLC phase are to undertake all prerequisite conditions that must
be met before testing starts. All the documents, with the necessary information regarding testing, should
be available before initiating any of the STLC phases. For example, to begin with, creating test cases,
you must have the user requirement document, a complete understanding of the application flow, and the
test plan document. This is the entry criteria for developing and executing test cases.

Exit Criteria: Exit criteria are all the information/items that must be available and completed before
concluding a phase. It includes all the actions, tasks, documents, and test elements that need to be over
before marking the phase complete and moving on to the next one. One example of exit criteria can be
verifying if the user requirements are proper and all the risk-associated areas of an application are
thoroughly tested.

20
Testing Techniques
BLACK-BOX TESTING WHITE-BOX TESTING
In black-box testing, the tester designs test cases based In white-box testing, the tester designs test cases based
on the software's functionality, without knowledge of its on the software's internal structure and implementation.
internal implementation.
Testers have access to the source code and use it to guide
Testers focus on inputs and outputs, ensuring that the their test case design, ensuring that different parts of the
software produces the expected outputs for various code are exercised during testing.
inputs.  Statement Coverage: Designing tests to ensure that
Equivalence Partitioning: Dividing the input space each statement in the code is executed at least once
into groups or partitions.  Branch Coverage: Designing tests to ensure that each
Boundary Value Analysis: Testing at the edges or branch or decision point in the code is executed at least
boundaries of input ranges. once.
 Path Coverage: Designing tests to execute all possible
Decision Table Testing: Creating decision tables to
paths through the code.
represent complex business rules and conditions.

21
6 Phases of STLC Phases

22
STLC Phases
STLC consists of 6 phases where each has its entry-exit criteria and comes with associated
activities and deliverables. Entry-exit criteria define when the phase starts and ends. Activities
and deliverables define the actions taken within the phase and the results received. You can
execute some of these phases together while others run more independently. These are the 6
phases of STLC:
Requirement Analysis : It is the first phase of STLC which deals with the QA team analyzing
and understanding the requirement document to start the testing process with accurate
information. In the Requirement analysis phase, the entry criteria are requirement documents,
acceptance criteria, and understanding of the product architecture. The exit criteria for this phase
are approved Requirements Traceability Matrix (RTM) and automation feasibility reports that
evaluate if the tests can be automated. All of this ensures that the testing process starts with the
right information and focuses on the important areas of the software

23
Test Planning : After determining the user requirements, the next phase of STLC is to plan the tests. It is a
critical step of STLC where all the test plans are defined, and a detailed strategy is laid out for the project. It
includes developing test steps, assigning roles and responsibilities, and choosing the right testing approach and
automation tools, if any. The QA team also calculates the estimated cost and resources to begin the testing. The
entry criteria for the test planning phase are approved Requirements Traceability Matrix (RTM) and automation
feasibility reports. The exit criteria are approved test plans, automation scripts, and defining the cost analysis of
the complete project.
Test Case Development/Design : After finishing the planning stage, this phase is designing and developing the
test cases. In this step, the testing team creates the test steps with proper input, test execution conditions, and
expected output for execution. For the test case design and development phase, the entry criteria are approved
test plans, automation scripts, and defining the cost analysis of the complete project. The exit criteria are the
approved test cases and automation scripts with the proper information for each test step.
Test Environment Setup : This phase includes setting up a test environment to run your test cases and check
the application for its efficiency. It decides the conditions to test your application and involves configuring and
deploying the test environment. Often, this step also includes setting up test servers. You can either perform the
test environment setup in sequence or execute it after the requirement analysis phase, as it is independent of all
the previous phases. The entry criteria of this phase are requirement documents, system architecture details, and
application design. The exit criteria are a fully up-and-running test environment to execute the approved test
cases.

24
Test Execution : After all the setup and planning are over, the test execution phase comes. The QA
team runs the test cases and scripts to check the quality of the application. They compare the
expected results with the actual results to understand which areas have issues and need attention.
The entry criteria of this step are the combined exit criteria of all the previous steps, including test
plans/cases, test environment, user requirement document, and more. The exit criteria are all the
executed test cases with results.
Test Closure : The last phase of STLC is test closure which pertains to preparing a test result report. It
summarizes the testing process and highlights the comparison between the actual and expected test
results. The comparison includes the fulfilled project objectives, time taken to complete the testing,
budget, test coverage, and identified issues. The entry criteria for the test closure phase are test
results after executing all the test cases. The exit criteria are designed, delivered, and approved test
results report.

25
Principles of Software Testing

26
Principles of Software Testing
Software testing is an important activity. It provides certain level of confidence
with the product. That level of confidence achieved through a series of testing
activities. Software testing activities is a procedures that are executed to catch
bugs, errors, defects as early as possible, ensure that the product meets
acceptance criteria, and the completeness of specifications in accordance with
business, user, and product requirements.
To run that procedures, we need to have a strategy, so our testing activities will
not take too long time but still optimum enough to reach the goal.
How can we develop a good strategy? Or Base on what we develop that
strategy? One of the rules that have been proven to be used as a basis for
building strategy is 7 Principles Of Software Testing.

27
1. Testing shows presence of defects
The purpose of software testing is to
reduce bugs occurrence in software
using various methods and techniques.
By doing series of testing procedures, it
detect the presence of bugs or defects .
Software testing can only ensure that
bugs are present, not those that are
absent. Even after we execute test
endlessly, it is impossible to be sure that
the software is completely bugs-free.
Presence of defects

28
2. Exhaustive testing is not possible
It is a practice of testing a software using all
possible inputs and preconditions. It is very
difficult to test all modules and their functionality
with valid and invalid combinations of input data
throughout the testing process.
Imagine an input field that accept age
information, we need to execute test using 1, 2, 3,
4, 5, and so on. And don’t forget to also test it
using invalid value, such as a-z, A-Z. It is a very
time-consuming procedure and very not cost
effective.
Exhaustive testing

29
3. Early testing
Here early testing means that all the testing
activities should start in the early stages of the
software development life cycle's requirement
analysis stage to identify the defects because if we
find the bugs at an early stage, it will be fixed in the
initial stage itself, which may cost us very less as
compared to those which are identified in the future
phase of the testing process.
To perform testing, we will require the requirement
specification documents; therefore, if the
requirements are defined incorrectly, then it can be Early testing
fixed directly rather than fixing them in another
stage, which could be the development phase.

30
4. Defect clustering
The defect clustering defined that throughout
the testing process, we can detect the numbers
of bugs which are correlated to a small number
of modules. We have various reasons for this,
such as the modules could be complicated; the
coding part may be complex, and so on.
These types of software or the application will
follow the Pareto Principle, which states that we
can identify that approx. Eighty percent of the
complication is present in 20 percent of the
modules. With the help of this, we can find the
uncertain modules, but this method has its
difficulties if the same tests are performing
regularly, hence the same test will not able to Defect clustering
identify the new defects.

31
5. Pesticide paradox
Imagine a farmer that are using the same
type and doses of pesticide to spray bugs,
again and again repetitively, eventually
bugs will develop immunity to that kind
of pesticide. The same thing happened to
software testing. If the same methods
and approaches are used repetitively, the
method will be useless to catch a new
bugs.
To overcome this, the test case needs to
be evaluated and replaced periodically.
Also, tester need to be more creative and Pesticide paradox
run the test outside the test case.

32
6. Testing is context dependent
Testing is a context-dependent principle that
states that we have multiple fields such as e-
commerce websites, commercial websites,
and so on are available in the market. There
is a definite way to test the commercial site
as well as the e-commerce websites because
every application has its own needs, features,
and functionality.
To check this type of application, we will take
the help of various kinds of testing, different
technique approaches, and multiple
methods. Therefore, the testing depends on
the context of the application. Context dependent

33
7. Absence of errors fallacy
Once the application is completely tested and
there are no bugs identified before the release, so
we can say that the application is 99 percent bug-
free.
But there is the chance when the application is
tested beside the incorrect requirements,
identified the flaws, and fixed them on a given
period would not help as testing is done on the
wrong specification, which does not apply to the
client's requirements. The absence of error fallacy
means identifying and fixing the bugs would not
help if the application is impractical and not able Absence of errors fallacy
to accomplish the client's requirements and
needs.

34
Basic Terminology in Software Testing
Here is the list of testing terminology-
Bug: An error in a software application that causes it to behave in an unintended manner.
Defect: An issue or bug identified during testing that needs to be fixed.
Error: A mistake made by a person while developing or using a software application that results
in an incorrect output.
◦ An incorrect internal state that is the manifestation of some fault. An error is an incorrect state within the software system that arises as a
result of a fault. For instance, if a fault in the code leads to a variable being assigned an incorrect value, the incorrect value represents an
error.
Fault - A static defect in a software system that may or may not cause an error.
◦ A fault represents an error or a flaw in the software code or its design. For example, a fault could be an incorrect calculation, a logical
error in a conditional statement, or a missing validation check.
Failure - The inability of a software system to perform its intended function according to its specification.
◦ External, incorrect behaviour with respect to the requirements or another description of the expected behavior.
◦ A failure is when the software system exhibits behavior that deviates from its expected behavior as defined in the requirements or
specifications. Failures are often observable by users or testers. For example, if a user clicks a button and the software crashes, that
represents a failure.

35
Basic Terminology ….Contd…..
Test Case: A set of steps and expected results used to test a specific feature or functionality.
Test Suite: A collection of related test cases.
Test Script: A set of instructions used to execute a test case.
Test Execution: The process of running the test cases and recording the results.
Test Data: The inputs used to execute test cases.
Severity: The degree of impact a defect has on the software's functionality.
Priority: The level of importance assigned to a defect based on its severity and other factors.
Traceability: The ability to trace requirements to test cases and defects.
Test Environment: The hardware, software, and network setup used to conduct testing.
Test Coverage: The percentage of requirements or code covered by the test cases.
Test Automation - The process of using software tools to execute tests and compare results.
Test Scenario: A high-level description of a test case or group of test cases.
Test Plan: A document that outlines the testing approach, objectives, scope, and deliverables.
Test Report: A document that summarizes the testing results, including any defects found.
36
 Software faults can lead to software errors.
 Software errors, when triggered, can manifest as software failures.
 Verification activities aim to detect software faults and prevent software errors.
 Validation activities focus on ensuring that the software meets user requirements and
prevents software failures.
 Test cases are designed to identify software failures by testing specific scenarios.
 Test suites are collections of test cases organized to test different aspects of the
software.
 Black-box and white-box testing techniques are employed to design effective test
cases.

37

You might also like