Unit 1 Software Testing
Unit 1 Software Testing
UNIT-I
INTRODUCTION
Introduction to software testing:
Software Testing is a process of verifying and validating whether the Software
Product or Application is working as expected or not. The complete testing includes
identifying errors and bugs that cause future problems for the performance of an
application.
Types of software testing:
Manual testing involves checking the functionality of the product without using any
automated tools and technologies. The basic requirement is to have proper understanding of
product. Specific knowledge of any tool is not needed. Manual testing is further divided in
three types.
1. White Box Testing : It verifies the source code and internal working of the system.
2. Black Box Testing : an Application is tested without knowing the internal code.
3. Gray Box testing : Partial information of the internal structure to be tested
Black box is further divided to functional and non-functional testing. Functional testing
validates the function against its specifications. Its subtypes are :
Unit Testing helps the developer know whether an individual unit of code or component
is working properly or not. It is executed using automation tools like JUnit, xUnit etc.
Integration testing aligns with construction and design of software. It checks two or
more unit as a single component.
System testing: Software is compiled as a whole and then tested
User acceptance testing validates the testing done at the end of development cycle.
Non-functional testing verifies non-functional aspects of the system , stability, usability,
performance, compatibility. The main subtypes are:
Performance testing : It analyzes the performance of a software under stress. We can
measure how quickly and efficiently the product develops
Compatibility testing : Compares the functionality across components like OS,
browsers, devices, platforms to generate any discrepancies.
Usability testing inculcates the evaluation of the product with the representative users.
Automation Testing is the process of converting any manual test cases into test scripts .
Automation tools or any programming language can be used for the same. The process
works by writing a test script and executing it. Automation allows boosting the execution
speed since the human effort is not required .
Evolution of software testing:
Software testing has undergone significant transformations over the years. From the early days
of manual testing to the advent of automated testing tools, the field has evolved to meet the
growing complexities and demands of software development. In this blog, we will explore the
evolution of software testing and how it has revolutionized the way we ensure software
quality.
1. Debugging-Oriented Testing (1950s–1970s)
In the early days of computing, software testing was not recognized as a separate discipline.
Developers wrote code and manually tested it themselves, often as an informal part of
debugging. Testing essentially meant executing a program and fixing any visible errors,
without a formal process or documentation. There were no structured methodologies, and
testing occurred only after coding was complete, making it reactive rather than preventive.
Since software was tightly coupled with hardware and often written in low-level languages,
identifying and resolving issues required intimate knowledge of the system.
1. Immediate Goals: These objectives are the direct outcomes of testing. These objectives
may be set at any time during the SDLC process. Some of these are covered in detail
below:
Bug Discovery: This is the immediate goal of software testing to find errors at any
stage of software development. The number of bugs is discovered in the early stage of
testing. The primary purpose of software testing is to detect flaws at any step of the
development process. The higher the number of issues detected at an early stage, the
higher the software testing success rate.
Bug Prevention: This is the immediate action of bug discovery, that occurs as a result
of bug discovery. Everyone in the software development team learns how to code from
the behavior and analysis of issues detected, ensuring that bugs are not duplicated in
subsequent phases or future projects.
2. Long-Term Goals: These objectives have an impact on product quality in the long run
after one cycle of the SDLC is completed. Some of these are covered in detail below:
Quality: This goal enhances the quality of the software product. Because software is
also a product, the user’s priority is its quality. Superior quality is ensured by thorough
testing. Correctness, integrity, efficiency, and reliability are all aspects that influence
quality. To attain quality, you must achieve all of the above-mentioned quality
characteristics.
Customer Satisfaction: This goal verifies the customer’s satisfaction with a developed
software product. The primary purpose of software testing, from the user’s standpoint,
is customer satisfaction. Testing should be extensive and thorough if we want the client
and customer to be happy with the software product.
Reliability: It is a matter of confidence that the software will not fail. In short,
reliability means gaining the confidence of the customers by providing them with a
quality product.
Risk Management: Risk is the probability of occurrence of uncertain events in the
organization and the potential loss that could result in negative consequences. Risk
management must be done to reduce the failure of the product and to manage risk in
different situations.
3. Post-Implemented Goals: After the product is released, these objectives become
critical. Some of these are covered in detail below:
Reduce Maintenance Cost: Post-released errors are costlier to fix and difficult to
identify. Because effective software does not wear out, the maintenance cost of any
software product is not the same as the physical cost. The failure of a software product
due to faults is the only expense of maintenance. Because they are difficult to discover,
post-release mistakes always cost more to rectify. As a result, if testing is done
thoroughly and effectively, the risk of failure is lowered, and maintenance costs are
reduced as a result.
Improved Software Testing Process: These goals improve the testing process for
future use or software projects. These goals are known as post-implementation goals. A
project’s testing procedure may not be completely successful, and there may be room
for improvement. As a result, the bug history and post-implementation results can be
evaluated to identify stumbling blocks in the current testing process that can be avoided
in future projects
Software testing defnitions:
Software testing is an important process in the Software Development Lifecycle(SDLC). It
involves verifying and validating that a Software Application is free of bugs, meets the
technical requirements set by its Design and Development, and satisfies user requirements
efficiently and effectively
Types of Software Testing
Here are the Types of Software Testing mainly categorized into the two domain, which are
below.
1. Manual Testing
Manual Testing is a technique to test the software that is carried out using the functions
and features of an application. Which means manual testing will check the defect manually
with trying one by one function is working as expected.
2. Automation Testing
Automation Testing It is a technique where the Tester writes scripts independently and
uses suitable Software or Automation Tools to test the software. It is an Automation
Process of a Manual Process. It allows for executing repetitive tasks without the use of a
Manual Tester.
Types of Manual Testing
Manual testing will be divided into further types which is following:
1. White 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.
2. Black Box Testing
Black-Box Testing is a type of software testing in which the tester is not concerned with
the internal knowledge or implementation details of the software but rather focuses on
validating the functionality based on the provided specifications or requirements.
3. Gray Box Testing
Gray Box Testing is a software testing technique that is a combination of the Black Box
Testing technique and the White Box Testing technique. In the Black Box Testing
technique, the tester is unaware of the internal structure of the item being tested and in
White Box Testing the internal structure is known to the tester.
Types of Black Box Testing
Black Box Testing will be divided into further types which is following:
1. Functional Testing
Functional Testing is a type of Software Testing in which the system is tested against the
functional requirements and specifications. Functional testing ensures that the requirements
or specifications are properly satisfied by the application.
2. Non-Functional Testing
Non-Functional Testing is a type of Software Testing that is performed to verify the non-
functional requirements of the application. It verifies whether the behavior of the system is
as per the requirement or not. It tests all the aspects that are not tested in functional testing.
Types of Functional Testing
Functional Testing will be divided into further types which is following:
1. Unit Testing
Unit Testing is a method of testing individual units or components of a software
application. It is typically done by developers and is used to ensure that the individual units
of the software are working as intended.
2. Integration Testing
Integration Testing is a method of testing how different units or components of a software
application interact with each other. It is used to identify and resolve any issues that may
arise when different units of the software are combined.
3. System Testing
System Testing is a type of software testing that evaluates the overall functionality and
performance of a complete and fully integrated software solution. It tests if the system
meets the specified requirements and if it is suitable for delivery to the end-users.
Models for software testing:
1. Waterfall Model:
The waterfall model is a classical model used in the software development life cycle to
create a linear and sequential approach. It is known as a waterfall because it develops
systematically from one phase to another downward. This model contains different stages,
and the output of one step is the input for the next phase. Every phase has to end before the
next phase starts.
3. Agile model:
The Agile Model believes every project needs to execute differently, and the existing
methods must be tailored to best suit the project requirements. In Agile, there is a plain
division of tasks into time boxes for delivering specific features for carrying out the release.
An iterative approach is taken, and a working software build is shown after each iteration. In
each build, there is an addition of features, and there is consideration to build all the features
as per the wish of the customer.
Software Testing Process
Step-1: Assess Development Plan and Status –
This initiative may be prerequisite to putting together Verification, Validation, and
Testing Plan wont to evaluate implemented software solution. During this step, testers
challenge completeness and correctness of event plan. Based on extensiveness and
completeness of Project Plan testers can estimate quantity of resources they’re going to
got to test implemented software solution.
Software testing methodologies are the various strategies or approaches used to test an
application to ensure it behaves and looks as expected. These encompass everything from
front to back-end testing, including unit and system testing.
Functional vs. non-functional testing methodologies
The goal of utilizing numerous testing methodologies in your development process is to make
sure your software can successfully operate in multiple environments and across different
platforms. These can typically be broken down between functional and non-functional
testing.
Functional testing methods
Functional testing involves testing the application against the business requirements. It
incorporates all test types designed to guarantee each part of a piece of software behaves as
expected by using use cases provided by the design team or business analyst. These testing
methods are usually conducted in order and include:
Unit testing
Integration testing
System testing
Acceptance testing
Non-functional testing methods
Non-functional testing methods incorporate all test types focused on the operational aspects
of a piece of software. These include:
Performance testing
Security testing
Usability testing
Compatibility testing
The key to releasing high-quality software that your end users can easily adopt is to build a
robust testing framework that implements both functional and non-functional software testing
methodologies.
Unit testing
Unit testing is the first level of testing and is often performed by the developers themselves. It
is the process of ensuring individual components of a piece of software at the code level are
functional and work as they were designed to. Developers in a test-driven environment will
typically write and run the tests prior to the software or feature being passed over to the test
team. Unit testing can be conducted manually, but automating the process will speed up
delivery cycles and expand test coverage. Unit testing will also make debugging easier
because finding issues earlier means they take less time to fix than if they were discovered
later in the testing process.
Integration testing
After each unit is thoroughly tested, it is integrated with other units to create modules or
components that are designed to perform specific tasks or activities. These are then tested as a
group through integration testing to ensure whole segments of an application behave as
expected (i.e., the interactions between units are seamless). These tests are often framed by
user scenarios, such as logging into an application or opening files. Integrated tests can be
conducted by either developers or independent testers and are usually comprised of a
combination of automated functional and manual tests.
System testing
System testing is a black box testing method used to evaluate the completed and integrated
system, as a whole, to ensure it meets specified requirements. The functionality of the
software is tested from end-to-end and is typically conducted by a separate testing team
before the product is pushed into production.
Acceptance testing
Acceptance testing is the last phase of functional testing and is used to assess whether or not
the final piece of software is ready for delivery. It involves ensuring that the product is in
compliance with all of the original business criteria and that it meets the end user’s needs.
This requires the product to be tested both internally and externally, meaning you’ll need to
get it into the hands of your end users for beta testing along with those of your QA team. Beta
testing is key to getting real feedback from potential customers and can address any final
usability concerns.
Performance testing
Performance testing is a non-functional testing technique used to determine how an
application will behave under various conditions. The goal is to test its responsiveness and
stability in real-user situations. Performance testing can be broken down into four types:
Load testing is the process of putting increasing amounts of simulated demand on your
software, application, or website to verify whether or not it can handle what it’s designed
to handle.
Stress testing takes this a step further and is used to gauge how your software will
respond at or beyond its peak load. The goal of stress testing is to overload the application
on purpose until it breaks by applying both realistic and unrealistic load scenarios. With
stress testing, you’ll be able to find the failure point of your piece of software.
Endurance testing, also known as soak testing, is used to analyze the behavior of an
application under a specific amount of simulated load over longer amounts of time. The
goal is to understand how your system will behave under sustained use, making it a longer
process than load or stress testing (which is designed to end after a few hours). A critical
piece of endurance testing is that it helps uncover memory leaks.
Spike testing is a type of load test used to determine how your software will respond to
substantially larger bursts of concurrent user or system activity over varying amounts of
time. Ideally, this will help you understand what will happen when the load is suddenly
and drastically increased.
Security testing
With the rise of cloud-based testing platforms and cyber attacks, there is a growing concern
and need for the security of data being used and stored in software. Security testing is a non-
functional software testing technique used to determine if the information and data in a
system is protected. The goal is to purposefully find loopholes and security risks in the
system that could result in unauthorized access to or the loss of information by probing the
application for weaknesses. There are multiple types of this testing method, each of which
aims at verifying six basic principles of security:
1. Integrity
2. Confidentiality
3. Authentication
4. Authorization
5. Availability
6. Non-repudiation
Usability testing
Usability testing is a testing method that measures an application’s ease of use from the end-
user perspective and is often performed during the system or acceptance testing stages. The
goal is to determine whether or not the visible design and aesthetics of an application meet
the intended workflow for various processes, such as logging into an application. Usability
testing is a great way for teams to review separate functions, or the system as a whole, and is
intuitive to use.
Compatibility testing
Compatibility testing is used to gauge how an application or piece of software will work in
different environments. It is used to check that your product is compatible with multiple
operating systems, platforms, browsers, or resolution configurations. The goal is to ensure
that your software’s functionality is consistently supported across any environment you
expect your end users to be Software Testing Methodologies Copyusing
Software testing with TestComplete
TestComplete is our robust automated GUI testing tool that excels in compatibility and
integration testing. It helps QA teams create and run tests across desktop, mobile, and web
applications – enabling testing professionals to speed up delivery cycles and improve
software quality. TestComplete comes with built-in support for various test environments,
integrations to performance testing tools, as well as support for developer-friendly SCMs,
allowing you to integrate it into your development process seamlessly. Using TestComplete
will enable you to build a robust testing framework that utilizes the broad spectrum of
available software testing methodologies
Software testing terminology
Types of Testing
1. Requirement Analysis
Requirement Analysis is the first step of the Software Testing Life Cycle (STLC). In this
phase quality assurance team understands the requirements like what is to be tested. If
anything is missing or not understandable then the quality assurance team meets with the
stakeholders to better understand the detailed knowledge of requirements.
The activities that take place during the Requirement Analysis stage include:
Reviewing the software requirements document (SRD) and other related documents
Interviewing stakeholders to gather additional information
Identifying any ambiguities or inconsistencies in the requirements
Identifying any missing or incomplete requirements
Identifying any potential risks or issues that may impact the testing process
Creating a requirement traceability matrix (RTM) to map requirements to test cases
At the end of this stage, the testing team should have a clear understanding of the software
requirements and should have identified any potential issues that may impact the testing
process. This will help to ensure that the testing process is focused on the most important
areas of the software and that the testing team is able to deliver high-quality results.
2. Test Planning
Test Planning is the most efficient phase of the software testing life cycle where all testing
plans are defined. In this phase manager of the testing, team calculates the estimated effort
and cost for the testing work. This phase gets started once the requirement-gathering phase
is completed.
The activities that take place during the Test Planning stage include:
Identifying the testing objectives and scope
Developing a test strategy: selecting the testing methods and techniques that will be
used
Identifying the testing environment and resources needed
Identifying the test cases that will be executed and the test data that will be used
Estimating the time and cost required for testing
Identifying the test deliverables and milestones
Assigning roles and responsibilities to the testing team
Reviewing and approving the test plan
At the end of this stage, the testing team should have a detailed plan for the testing
activities that will be performed, and a clear understanding of the testing objectives, scope,
and deliverables. This will help to ensure that the testing process is well-organized and that
the testing team is able to deliver high-quality results.
3. Test Case Development
The Test Case Development phase gets started once the test planning phase is completed.
In this phase testing team notes down the detailed test cases. The testing team also prepares
the required test data for the testing. When the test cases are prepared then they are
reviewed by the quality assurance team.
The activities that take place during the Test Case Development stage include:
Identifying the test cases that will be developed
Writing test cases that are clear, concise, and easy to understand
Creating test data and test scenarios that will be used in the test cases
Identifying the expected results for each test case
Reviewing and validating the test cases
Updating the requirement traceability matrix (RTM) to map requirements to test cases
At the end of this stage, the testing team should have a set of comprehensive and accurate
test cases that provide adequate coverage of the software or application. This will help to
ensure that the testing process is thorough and that any potential issues are identified and
addressed before the software is released.
4. Test Environment Setup
Test Environment Setup is an important part of the STLC. Basically, the test environment
decides the conditions on which software is tested. This is independent activity and can be
started along with test case development. In this process, the testing team is not involved.
either the developer or the customer creates the testing environment.
5. Test Execution
In Test Execution, after the test case development and test environment setup test
execution phase gets started. In this phase testing team starts executing test cases based on
prepared test cases in the earlier step.
The activities that take place during the test execution stage of the Software Testing
Life Cycle (STLC) include:
Test execution: The test cases and scripts created in the test design stage are run against
the software application to identify any defects or issues.
Defect logging: Any defects or issues that are found during test execution are logged in
a defect tracking system, along with details such as the severity, priority, and
description of the issue.
Test data preparation: Test data is prepared and loaded into the system for test
execution
Test environment setup: The necessary hardware, software, and network
configurations are set up for test execution
Test execution: The test cases and scripts are run, and the results are collected and
analyzed.
Test result analysis: The results of the test execution are analyzed to determine the
software’s performance and identify any defects or issues.
Defect retesting: Any defects that are identified during test execution are retested to
ensure that they have been fixed correctly.
Test Reporting: Test results are documented and reported to the relevant stakeholders.
It is important to note that test execution is an iterative process and may need to be repeated
multiple times until all identified defects are fixed and the software is deemed fit for
release.
6. Test Closure
Test Closure is the final stage of the Software Testing Life Cycle (STLC) where all
testing-related activities are completed and documented. The main objective of the test
closure stage is to ensure that all testing-related activities have been completed and that the
software is ready for release.
At the end of the test closure stage, the testing team should have a clear understanding of
the software’s quality and reliability, and any defects or issues that were identified during
testing should have been resolved. The test closure stage also includes documenting the
testing process and any lessons learned so that they can be used to improve future testing
processes
Test closure is the final stage of the Software Testing Life Cycle (STLC) where all testing-
related activities are completed and documented. The main activities that take place during
the test closure stage include:
Test summary report: A report is created that summarizes the overall testing process,
including the number of test cases executed, the number of defects found, and the
overall pass/fail rate.
Defect tracking: All defects that were identified during testing are tracked and managed
until they are resolved.
Test environment clean-up: The test environment is cleaned up, and all test data and
test artifacts are archived.
Test closure report: A report is created that documents all the testing-related activities
that took place, including the testing objectives, scope, schedule, and resources used.
Knowledge transfer: Knowledge about the software and testing process is shared with
the rest of the team and any stakeholders who may need to maintain or support the
software in the future.
Feedback and improvements: Feedback from the testing process is collected and used
to improve future testing processes
Verification and Validation:
Verification and Validation is the process of investigating whether a software system
satisfies specifications and standards and fulfills the required purpose. Verification and
Validation both play an important role in developing good software development.
Verification helps in examining whether the product is built right according to
requirements, while validation helps in examining whether the right product is built to meet
user needs.
What is Verification?
Verification is the process of checking that software achieves its goal without any bugs. It
is the process to ensure whether the product that is developed is right or not. It verifies
whether the developed product fulfills the requirements that we have. Verification is static
testing. Verification means
Validation is the process of checking whether the Software Product is up to the mark or
in other words product has high-level requirements. It is the process of checking the
validation of the product i.e. it checks what we are developing is the right product. It is
validation of the actual and expected products. Validation is dynamic testing.
Real-World Example of Verification vs Validation
Verification Example: Imagine a team is developing a new mobile banking app. During
the verification phase, they review the requirements and design documents. They check
if all the specified features like fund transfer, account balance check, and transaction
history are included and correctly detailed in the design. They also perform peer
reviews and inspections to ensure the design aligns with the requirements. This step
ensures that the app is being built according to the initial plan and specifications
without actually running the app.
Validation Example: In the validation phase, the team starts testing the mobile banking
app on actual devices. They check if users can log in, transfer money, and view their
transaction history as intended. Testers perform usability tests to ensure the app is user-
friendly and functional tests to ensure all features work correctly. They might also
involve real users to provide feedback on the app’s performance. This phase ensures
that the app works as expected and meets user needs in real-world scenarios.
Advantages of Differentiating Verification and Validation
Differentiating between verification and validation in software testing offers several
advantages:
1. Clear Communication: It ensures that team members understand which aspects of the
software development process are focused on checking requirements (verification) and
which are focused on ensuring functionality (validation).
2. Efficiency: By clearly defining verification as checking documents and designs without
executing code, and validation as testing the actual software for functionality and
usability, teams avoid redundant efforts and streamline their testing processes.
3. Minimized Errors: It reduces the chances of overlooking critical requirements or
functionalities during testing, leading to a more thorough evaluation of the software’s
capabilities.
4. Cost Savings: Optimizing resource allocation and focusing efforts on the right testing
activities based on whether they fall under verification or validation helps in managing
costs effectively.
5. Client Satisfaction: Ensuring that software meets or exceeds client and user
expectations by conducting both verification and validation processes rigorously
improves overall software quality and user satisfaction.
6. Process Improvement: By distinguishing between verification and validation,
organizations can refine their testing methodologies, identify areas for improvement,
and enhance the overall Software development lifecycle (SDLC) .
In essence, clear differentiation between verification and validation in Software
testing contributes to a more structured, efficient, and successful software development
process.