UNIT – V
SOFTWARE TESTING
Software testing involves a strategic approach encompassing various types
and levels to ensure quality, reliability, and functionality.
Different Types of Software Testing.
1. Manual Testing
2. Automation Testing
There are two different types of software testing currently used in the industry
both have their own advantages and disadvantages. If you looking to learn
testing from the starting to advance level then you can checkout our dedicated
software testing course in which we offer very important concept and
knowledge you need to master testing.
1. Manual Testing
Manual testing is a technique to test the software that is carried out using the
functions and features of an application. In manual software testing, a tester
carries out tests on the software by following a set of predefined test cases. In
this testing, testers make test cases for the codes, test the software, and give the
final report about that software. Manual testing is time-consuming because it is
done by humans, and there is a chance of human errors.
Advantages of Manual Testing
Fast and accurate visual feedback: It detects almost every bug in the
software application and is used to test the dynamically changing GUI
designs like layout, text, etc.
Less expensive: It is less expensive as it does not require any high-level
skill or a specific type of tool.
No coding is required: No programming knowledge is required while
using the black box testing method. It is easy to learn for the new testers.
Efficient for unplanned changes: Manual testing is suitable in case of
unplanned changes to the application, as it can be adopted easily.
2. Automation Testing
Automated Testing is a technique where the Tester writes scripts on their own
and uses suitable Software or Automation Tool to test the software. It is an
Automation Process of a Manual Process. It allows for executing repetitive
tasks without the intervention of a Manual Tester.
Advantages of Automation Testing:
Simplifies Test Case Execution: Automation testing can be left virtually
unattended and thus it allows monitoring of the results at the end of the
process. Thus, simplifying the overall test execution and increasing the
efficiency of the application.
Improves Reliability of Tests: Automation testing ensures that there is
equal focus on all the areas of the testing, thus ensuring the best quality
end product.
Increases amount of test coverage: Using automation testing, more test
cases can be created and executed for the application under test. Thus,
resulting in higher test coverage and the detection of more bugs. This
allows for the testing of more complex applications and more features can
be tested.
Minimizing Human Interaction: In automation testing, everything is
automated from test case creation to execution thus there are no changes
for human error due to neglect. This reduces the necessity for fixing
glitches in the post-release phase.
Manual vs. Automated testing
Here is the table of comparing Manual Testing and Automated Testing:
Parameters Manual Testing Automation Testing
In automated testing,
In manual testing, the
the test cases are
test cases are executed
executed by the
by the human tester.
Definition software tools.
Automation testing is
Manual testing is time-
faster than manual
consuming.
Processing Time testing.
Automation testing
Manual testing takes up takes up automation
human resources. tools and trained
Resources requirement employees.
Exploratory testing is Exploratory testing is
possible in manual not possible in
Exploratory testing testing. automation testing.
Automation testing uses
Manual testing doesn’t
frameworks like Data
use frameworks.
Framework requirement Drive, Keyword, etc.
Types of Manual Testing
1. White Box Testing
2. Black Box Testing
3. Gray Box Testing
1. White Box Testing
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 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.
Advantages of White box Testing:
Thorough Testing: White box testing is thorough as the entire code and
structures are tested.
Code Optimization: It results in the optimization of code removing errors
and helps in removing extra lines of code.
Early Detection of Defects: It can start at an earlier stage as it doesn’t
require any interface as in the case of black box testing.
Integration with SDLC: White box testing can be easily started in
the Software Development Life Cycle.
Detection of Complex Defects: Testers can identify defects that cannot be
detected through other testing techniques.
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.
Advantages of Black Box Testing:
The tester does not need to have more functional knowledge or
programming skills to implement the Black Box Testing.
It is efficient for implementing the tests in the larger system.
Tests are executed from the user’s or client’s point of view.
Test cases are easily reproducible.
It is used to find the ambiguity and contradictions in the functional
specifications.
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.
1. 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.
2. The internal structure is partially known in Gray Box Testing.
3. This includes access to internal data structures and algorithms to design
the test cases.
Advantages of Gray Box Testing:
1. Clarity of goals: Users and developers have clear goals while doing
testing.
2. Done from a user perspective: Gray box testing is mostly done from the
user perspective.
3. High programming skills not required: Testers are not required to have
high programming skills for this testing.
4. Non-intrusive: Gray box testing is non-intrusive.
5. Improved product quality: Overall quality of the product is improved.
Types of Black Box Testing
1. Functional Testing
2. Non-Functional Testing
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. This type of testing is particularly concerned with the result of
processing. It focuses on the simulation of actual system usage but does not
develop any system structure assumptions. The article focuses on discussing
function testing.
Benefits of Functional Testing
Bug-free product: Functional testing ensures the delivery of a bug-free
and high-quality product.
Customer satisfaction: It ensures that all requirements are met and
ensures that the customer is satisfied.
Testing focused on specifications: Functional testing is focused on
specifications as per customer usage.
Proper working of application: This ensures that the application works as
expected and ensures proper working of all the functionality of the
application.
Improves quality of the product: Functional testing ensures the security
and safety of the product and improves the quality of the product.
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. Non-functional testing is a software
testing technique that checks the non-functional attributes of the system. Non-
functional testing is defined as a type of software testing to check non-
functional aspects of a software application. It is designed to test the readiness
of a system as per nonfunctional parameters which are never addressed by
functional testing. Non-functional testing is as important as functional testing.
Benefits of Non-functional Testing
Improved performance: Non-functional testing checks the performance of
the system and determines the performance bottlenecks that can affect the
performance.
Less time-consuming: Non-functional testing is overall less time-
consuming than the other testing process.
Improves user experience: Non-functional testing like Usability testing
checks how easily usable and user-friendly the software is for the users.
Thus, focus on improving the overall user experience for the application.
More secure product: As non-functional testing specifically includes
security testing that checks the security bottlenecks of the application and
how secure is the application against attacks from internal and external
sources.
Types of Functional Testing
1. Unit Testing
2. Integration Testing
3. System Testing
4. End-to-end Testing
5. Acceptance testing
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. Unit tests are usually
automated and are designed to test specific parts of the code, such as a
particular function or method. Unit testing is done at the lowest level of
the software development process , where individual units of code are tested in
isolation.
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.
Integration testing is typically done after unit testing and before functional
testing and is used to verify that the different units of the software work together
as intended.
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. This type of testing is performed after the
integration testing and before the acceptance testing.
A Strategic Approach to Software Testing
Software Testing is a critical part of the software development lifecycle.
A strategic approach to software testing involves planning, designing,
executing, and evaluating tests systematically to ensure that the software
meets its specifications and performs as expected.
The strategy typically includes:
1. Test Planning: Defining the scope, approach, resources, and
schedule for testing.
2. Test Design: Developing test cases, defining inputs, expected
outputs, and conditions.
3. Test Execution: Running the test cases and identifying defects.
4. Test Evaluation: Analyzing test results to determine if the system
meets the requirements.
Types of Testing
1. Functional Testing:
o Definition: Functional testing verifies the software's functionality
against the functional requirements or specifications.
o Objective: To ensure that the software performs the tasks it is
intended to.
o Example: Testing the login functionality in a web application
(whether it accepts correct inputs and denies incorrect ones).
2. Structural Testing:
o Definition: Structural testing, also known as white-box testing,
focuses on the internal structure and working of the software.
o Objective: To test the logic, structure, and internal operations of
the code.
o Example: Testing individual functions or methods in the software
to ensure they are functioning as expected and checking the code
for possible paths, branches, and loops.
Levels of Testing
Testing is performed at different levels in the software development process:
1. Unit Testing: Testing individual units or components of the software in
isolation to ensure correctness.
2. Integration Testing: Testing the interactions between integrated modules
or components to check if they work together.
3. System Testing: Testing the entire software system as a whole to ensure it
meets the specified requirements.
4. Acceptance Testing: Verifying the software meets business requirements
and is ready for delivery to the customer.
Validation Testing
Definition: Validation testing ensures that the software meets the
intended use and satisfies the user’s needs.
Objective: To confirm that the system is solving the right problem and
meets user expectations.
Example: User Acceptance Testing (UAT) where end-users verify that
the software performs as expected in real-world scenarios.
Software Maintenance:
Categories of Maintenance
Software maintenance refers to the activities required to maintain and update
software after its release. It can be categorized into:
1. Corrective Maintenance: Fixing defects or bugs identified after the
software has been deployed.
2. Adaptive Maintenance: Modifying the software to adapt it to new
environments, technologies, or changes in the business context.
3. Perfective Maintenance: Enhancing the software to improve performance
or add new features based on user feedback or evolving requirements.
4. Preventive Maintenance: Updating the software to prevent future
problems, often by refactoring code, improving security, or addressing
potential risks.
Problems During Maintenance
Complexity: Over time, the software may become complex and harder to
understand, making maintenance more difficult.
Knowledge Loss: When the original developers leave, it may become
harder to maintain the system due to loss of knowledge about its design
and functionality.
Legacy Code: Old code or technologies may be difficult to integrate or
maintain in the face of new advancements.
Budget and Time Constraints: Maintenance often has fewer resources and
timelines than initial development, making it harder to perform necessary
updates or fixes.
Maintenance is Manageable
While maintenance can be challenging, it is manageable through:
Good Documentation: Detailed documentation on system design, code,
and user requirements helps in understanding and maintaining the system.
Modular Code: Systems designed with modularity are easier to maintain
and upgrade.
Automated Tools: Use of automated testing, code analysis, and
deployment tools can streamline the maintenance process.
Potential Solutions to Maintenance Problems
Regular Refactoring: Refactoring code periodically to improve
readability, reduce complexity, and address technical debt.
Automated Testing: Implementing automated regression tests ensures that
new changes don’t introduce errors.
Code Reviews: Peer reviews help in maintaining code quality and
reducing the likelihood of defects.
Version Control: Using version control systems helps track changes,
manage versions, and avoid issues with conflicting updates.
Maintenance Process
The maintenance process typically involves the following steps:
1. Problem Identification: Identifying the issue or need for change, which
could be a bug, enhancement, or adaptation.
2. Impact Analysis: Assessing how the change will affect the existing
system.
3. Change Implementation: Developing and applying the necessary changes.
4. Testing: Ensuring that the change works as expected and does not break
existing functionality.
5. Deployment: Deploying the updated software to the production
environment.
6. Post-Deployment Review: Monitoring the system after deployment to
ensure the change has resolved the issue and checking for new problems.
Estimation of Maintenance Cost
Maintenance cost can be difficult to predict but can be estimated based on
factors such as:
o Size and Complexity of the System: Larger and more complex
systems tend to have higher maintenance costs.
o Frequency of Changes: Systems requiring frequent updates or fixes
will have higher ongoing maintenance costs.
o Skillset of the Development Team: Highly skilled developers may
be more efficient, but they could also command higher salaries.
o Tools and Automation: Investment in automated tools can reduce
manual effort, lowering costs in the long term.
o Maintenance Category: Corrective maintenance is typically less
expensive than adaptive or perfective maintenance, as the latter
might involve substantial changes or enhancements.
IMPORTANT QUESTIONS
5 Marks Questions
1. What is the strategic approach to software testing?
2. Define functional testing and explain its importance in software
testing.
3. What is the difference between functional testing and structural
testing?
4. List the different levels of testing and briefly describe each one.
5. Explain the concept of validation testing in software testing.
6. What are the categories of maintenance in software engineering?
7. Describe the main problems that occur during software maintenance.
8. Explain how maintenance can be managed effectively in software
engineering.
9. What are the key stages in the software maintenance process?
10.Define the process for estimating maintenance costs in software
projects.
10 Marks Questions
1. Discuss the strategic approach to software testing, including its
phases and objectives.
2. Explain the differences between functional testing and structural
testing. Provide examples where each would be used.
3. What are the different levels of testing in software development?
Discuss the importance of each level.
4. Discuss the role of validation testing in ensuring the correctness and
effectiveness of a software product.
5. Explain the categories of software maintenance and give examples
for each category.
6. Discuss the problems commonly encountered during software
maintenance and how they affect the project.
7. What solutions can be applied to overcome the common problems
faced during software maintenance?
8. Explain how software maintenance can be managed. What best
practices can be implemented to handle maintenance tasks
effectively?
9. Describe the typical software maintenance process. How do the stages
in the maintenance process contribute to the system’s longevity?
10.Explain how the cost of software maintenance can be estimated.
What factors influence the estimation of maintenance costs?
15 Marks Questions
1. Critically analyze the strategic approach to software testing. Discuss
its key components and how it helps in delivering a quality software
product.
2. Compare and contrast functional testing and structural testing in
terms of objectives, methodologies, and advantages. When would you
choose one over the other?
3. Discuss the various levels of testing (unit testing, integration testing,
system testing, and acceptance testing). Explain the goals and
challenges associated with each level of testing.
4. Examine the importance of validation testing in the context of
software development. How does it contribute to the overall quality
assurance process?
5. Discuss in detail the categories of software maintenance (corrective,
adaptive, perfective, and preventive). How do they impact the long-
term sustainability of software?
6. Identify and analyze common problems that arise during software
maintenance. Provide potential solutions and strategies for mitigating
these issues to ensure effective maintenance.
7. Discuss how software maintenance is manageable. What are the key
practices and strategies for ensuring that maintenance tasks are
handled efficiently and effectively over time?
8. Provide an in-depth explanation of the software maintenance
process. Discuss the steps involved and the importance of each step in
maintaining and updating software systems.
9. Discuss the factors that influence the estimation of software
maintenance costs. How can software development teams accurately
estimate the costs associated with maintenance over the software’s
lifecycle?
10.Analyze the impact of maintenance on software quality and
performance. How can software engineering teams ensure that
maintenance doesn’t degrade the system’s functionality or reliability
over time?