Unit 1
Unit 1
What is a bug?
In software testing, a bug is the informal name of defects, which means that
software or application is not working as per the requirement. When we have some
coding error, it leads a program to its breakdown, which is known as a bug.
The test engineers use the terminology Bug.
If a QA (Quality Analyst) detect a bug, they can reproduce the bug and record it
with the help of the bug report template.
What is a Defect?
When the application is not working as per the requirement is knows as defects. It
is specified as the aberration from the actual and expected result of the
application or software.
In other words, we can say that the bug announced by the programmer and inside
the code is called a Defect.
What is Error?
The Problem in code leads to errors, which means that a mistake can occur due to
the developer's coding error as the developer misunderstood the requirement or the
requirement was not defined correctly. The developers use the term error.
2
What is Fault?
The fault may occur in software because it has not added the code for fault
tolerance, making an application act up.
o Lack of resources
o An invalid step
o Inappropriate data definition
What is Failure?
Many defects lead to the software's failure, which means that a loss
specifies a fatal issue in software/ application or in its module, which makes
the system unresponsive or broken.
Possibilities are there one defect that might lead to one failure or several
failures.
3
Objectives of Testing, Testing Activities, Test Case Selection:
The objective of testing is to ensure that the software is reliable, efficient, and
meets the user's requirements. Preventing defects is an essential part of the testing
process. If defects are not prevented, they can become errors or bugs in the final
product, which can lead to significant problems.
In this fifth phase of SDLC, the testing is done to ensure that the entire application
works according to the customer requirements. After testing, the QA and testing
team might find some bugs or defects and communicate the same with the
developers.
4
7. Test Completion
Test Planning:
Determining the scope, objectives, and risks of testing
Integrating and coordinating the test activities into the software lifecycle
activities
Making decisions about what to test, the people and other resources required to
perform the various test activities, and how test activities will be carried out
Determining the level of detail and structure for test documentation (e.g., by
providing templates or example documents)
Test Analysis
“what to test”
Analyzing the test basis appropriate to the test level being considered
Evaluating the test basis and test items to identify defects of various types
Identifying features and sets of features to be tested
Defining and prioritizing test conditions for each feature based on analysis of
the test basis, and considering functional, non-functional, and structural
characteristics, other business and technical factors, and levels of risks
5
Test Design
“how to test?”
Designing and prioritizing test cases and sets of test cases
Identifying necessary test data to support test conditions and test cases
Designing the test environment and identifying any required infrastructure and
tools
Capturing bi-directional traceability between the test basis, test conditions, and
test cases
Test Implementation
“do we now have everything in place to run the tests?”
Developing and prioritizing test procedures and, potentially creating automated
test scripts
Creating test suites from the test procedures and (if any) automated test scripts
Arranging the test suites within a test execution schedule in a way that results in
efficient test execution
Building the test environment (including, potentially, test harnesses, service
virtualization, simulators, and other infrastructure items) and verifying that
everything needed has been set up correctly
Preparing test data and ensuring it is properly loaded in the test environment
Verifying and updating bi-directional traceability between the test basis, test
conditions, test cases, test procedures, and test suites
Test Execution
Recording the IDs and versions of the test item(s) or test object, test tool(s), and
test ware
Executing tests either manually or by using test execution tools
Comparing actual results with expected results
Analyzing anomalies to establish their likely causes (e.g., failures may occur
due to defects in the code, but false positives also may occur
Reporting defects based on the failures observed
Logging the outcome of test execution (e.g., pass, fail, blocked)
Repeating test activities either as a result of action taken for an anomaly, or as
part of the planned testing (e.g., execution of a corrected test, confirmation
testing, and/or regression testing)
Verifying and updating bi-directional traceability between the test basis, test
conditions, test cases, test procedures, and test results.
6
Test Completion
Checking whether all defect reports are closed, entering change requests or
product backlog items for any defects that remain unresolved at the end of test
execution
Creating a test summary report to be communicated to stakeholders
Finalizing and archiving the test environment, the test data, the test
infrastructure, and other test-ware for later reuse
Handing over the test-ware to the maintenance teams, other project teams,
and/or other stakeholders who could benefit from its use
The objective of writing test cases is to ensure that software functions correctly and
meets the specified requirements. Some of the key objectives of writing test cases,
White box testing techniques analyze the internal structures the used data
structures, internal design, code structure, and the working of the software rather
than just the functionality as in black box testing. It is also called glass box
testing or clear box testing or structural testing. White Box Testing is also known
as transparent testing or open box testing.
White box testing is a software testing technique that involves testing the internal
structure and workings of a software application. The tester has access to the
source code and uses this knowledge to design test cases that can verify the
correctness of the software at the code level.
White box testing is also known as structural testing or code-based testing, and it
is used to test the software’s internal logic, flow, and structure. The tester creates
test cases to examine the code paths and logic flows to ensure they meet the
specified requirements.
Tools required for White box testing:
7
PyUnit
Sqlmap
Nmap
Parasoft Jtest
Nunit
VeraUnit
CppUnit
Bugzilla
Fiddler
JSUnit.net
OpenGrok
Wireshark
HP Fortify
CSUnit
Features of White box Testing
1. Code coverage analysis: White box testing helps to analyze the code
coverage of an application, which helps to identify the areas of the code that
are not being tested.
2. Access to the source code: White box testing requires access to the
application’s source code, which makes it possible to test individual functions,
methods, and modules.
3. Knowledge of programming languages: Testers performing white box
testing must have knowledge of programming languages like Java, C++,
Python, and PHP to understand the code structure and write tests.
4. Identifying logical errors: White box testing helps to identify logical errors
in the code, such as infinite loops or incorrect conditional statements.
5. Integration testing: White box testing is useful for integration testing, as it
allows testers to verify that the different components of an application are
working together as expected.
6. Unit testing: White box testing is also used for unit testing, which involves
testing individual units of code to ensure that they are working correctly.
7. Optimization of code: White box testing can help to optimize the code by
identifying any performance issues, redundant code, or other areas that can be
improved.
8. Security testing: White box testing can also be used for security testing, as it
allows testers to identify any vulnerabilities in the application’s code.
9. Verification of Design: It verifies that the software’s internal design is
implemented in accordance with the designated design documents.
10.Check for Accurate Code: It verifies that the code operates in accordance
with the guidelines and specifications.
8
11.Identifying Coding Mistakes: It finds and fix programming flaws in your
code, including syntactic and logical errors.
12.Path Examination: It ensures that each possible path of code execution is
explored and test various iterations of the code.
13.Determining the Dead Code: It finds and remove any code that isn’t used
when the programme is running normally (dead code).
Equivalence Class Testing: An application may follow the same control flow for
certain types of inputs. For example, an application that should only be accessible
to adults may terminate if a user enters an age under 18 or a tool with a limited
service area may terminate for country or postal codes outside of that area. With
9
equivalence class testing, testers identify these classes that produce the same
results and only test for one value within that class.
Error Checking: This form of evaluation tests for common errors that a developer
may have made when creating an application. This often revolves around input
sanitization and ensuring that assumptions about an input are enforced. For
example, testers may check to see if developers properly handled an input of zero
in a numeric field or restricted the character set for a name to the letters and
symbols that can appear in a name.
The Black Box Test is a test that only considers the external behavior of the
system; the internal workings of the software are not taken into account. The White
Box Test is a method used to test software taking into consideration its internal
functioning
10
identify software defects early in the development cycle before the product is
released to users.
Software test design is the process of creating a plan or strategy to test an entire
software application, including all of its features and functions. Test design aims to
identify software defects early in the development cycle before the product is
released to users.
A team of testers is responsible for designing all aspects of a test, including:
Test design is a critical part of every software launch, and it plays as a guarantee
that fewer bugs and errors are encountered.
11
The purpose of test design calls for creating a plan for how a test, or series of tests,
will be conducted. Test design aims to ensure that the testing process is efficient
and effective and identify all the bugs, errors, and future mistakes in the software.
According to The QA Lead, the most common test documentation are bugs, with
79% of users using this type of report. Needless to say, this is an important piece of
information that testers should take into consideration for both the company and
the end-user.
A well-designed test plan will take into account the specific goals of the test, the
resources available, and the skills and knowledge of the testers. The test design
process should also consider the potential risks and impacts of the test on users,
systems, and data.
By taking all of these factors into account, test designers can create a plan that will
optimize the chances of success for the project.
Automated Testing means using special software for tasks that people usually do
when checking and testing a software product. Nowadays, many software
projects use automation testing from start to end, especially
in agile and DevOps methods. This means the engineering team runs tests
automatically with the help of software tools.
Software Testing tools are the tools that are used for the testing of software.
Software testing tools are often used to assure firmness, thoroughness, and
performance in testing software products. Unit testing and subsequent integration
testing can be performed by software testing tools.
testRigor — Best overall no-code test automation for scalability and end-to-end
tests. ...
Avo Assure — Best for no-code test automation. ...
Mabl — Best for integrating testing with existing workflows. ...
Selenium — Best for testing web-based applications.
Power of Test:
12
In the world of software development, the importance of testing cannot
be overstated.
Testing serves as the safety net that ensures your software functions
as intended before reaching the hands of your customers.
The primary goal of software testing is to uncover bugs and issues before the
software is released to end-users, thereby enhancing customer satisfaction and
reducing maintenance costs.
Importance of Software Testing
13
Best Practices in Software Testing
QA Team Responsibilities
To give you an idea of what you should expect from your software testing team,
here are its most important responsibilities listed.
15
Requirements Analysis
Before diving into the testing or planning stages, it’s crucial for the test team to
thoroughly understand the client’s expectations for the upcoming product. This
stage also includes testing Service Level Agreements (SLAs) between the company
that owns an application and its future users.
Test Planning
Gone are the days when quality assurance teams would just sit back and wait for
developers to finish a product before starting their work. Now, test planning and
case development kick off simultaneously with, or even before, the software
development process. This approach calls for collaborative roundtable discussions,
dynamic brainstorming sessions, and thorough research involving all key team
members. That’s why the roles and responsibilities of quality assurance teams are
constantly evolving to align better with these advanced processes.
16
modern testing tools into their workflows, and consistently apply QA best
practices.
17
for efficient and more focused work. Most often, functional teams are supervised by
test managers, while senior management oversees the project as a whole.
18