0% found this document useful (0 votes)
25 views

SE Unit5

The document discusses software testing fundamentals and principles, types of testing including unit, integration, system and acceptance testing, and black box and white box testing. It also provides details on unit testing, explaining that it tests individual units of code, is performed early, and has benefits like finding defects early and improving code quality.

Uploaded by

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

SE Unit5

The document discusses software testing fundamentals and principles, types of testing including unit, integration, system and acceptance testing, and black box and white box testing. It also provides details on unit testing, explaining that it tests individual units of code, is performed early, and has benefits like finding defects early and improving code quality.

Uploaded by

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

UNIT-5 SOFTWARE TESTING

Q1: Explain Testing Fundamentals and Principals.


Software testing is the process of evaluating software to find defects and ensure
that it meets its requirements. It is an essential part of the software development
lifecycle and helps to ensure the quality and reliability of software.
The fundamental principles of software testing are:

• Testing shows the presence of defects, not their absence. No matter how
much testing is done, it is impossible to guarantee that a piece of software
is 100% bug-free. However, testing can help to find defects and reduce
the risk of them causing problems in the software.
• Exhaustive testing is not possible. There are an infinite number of ways
to use software, so it is impossible to test every possible combination of
inputs and outputs. Instead, testing should focus on the most critical areas
of the software and the most likely scenarios for defects.
• Early testing is better than late testing. The sooner defects are found, the
easier and cheaper they are to fix. Therefore, it is important to start
testing as early as possible in the software development lifecycle.
• Defects tend to cluster. Once a defect is found in a piece of software, it is
likely that there are other defects in the same area. Therefore, it is
important to focus testing on areas where defects have already been
found.
• The pesticide paradox. As software is tested and defects are fixed, the
software becomes more resistant to testing. This is because the
developers may make changes to the software to prevent the same defects
from occurring again. However, this can also introduce new defects.
• Testing is context-dependent. The effectiveness of testing depends on the
context in which the software is being used. For example, the testing
criteria for a software used in a critical application will be different from
the testing criteria for a software used for entertainment purposes.
• The absence-of-errors fallacy. Just because no defects are found during
testing does not mean that the software is defect-free. It is possible that
the testing did not find the defects, or that the defects are not yet manifest.

These principles are important to keep in mind when planning and conducting
software testing. By following these principles, you can help to ensure that your
software is as high quality as possible.
UNIT-5 SOFTWARE TESTING
In addition to the fundamental principles, there are also a number of specific
software testing techniques that can be used to find defects. Some of the most
common techniques include:

• Unit testing: This is the lowest level of testing and involves testing
individual units of code.
• Integration testing: This involves testing how different units of code
interact with each other.
• System testing: This involves testing the entire system to ensure that it
meets all of its requirements.
• Acceptance testing: This is performed by the customer or end-user to
ensure that the software meets their needs.

The specific testing techniques that are used will depend on the type of software
being developed and the level of testing that is required.

Q2: Explain Types of Testing.


There are many different types of software testing, each with its own focus and
purpose.
Some of the most common types of testing include:
1) Unit testing: This is the lowest level of testing and involves testing
individual units of code. It is typically performed by the developers
themselves and is used to find defects in the code.
2) Integration testing: This involves testing how different units of code
interact with each other. It is typically performed by the QA team and is
used to find defects in the interfaces between different units of code.
3) System testing: This involves testing the entire system to ensure that it
meets all of its requirements. It is typically performed by the QA team
and is used to find defects in the system as a whole.
4) Acceptance testing: This is performed by the customer or end-user to
ensure that the software meets their needs. It is typically performed
manually, but can also be automated.
5) Performance testing: This involves testing the performance of the
software under different loads and conditions. It is used to ensure that the
software can handle the expected load and that it does not slow down or
crash under stress.
UNIT-5 SOFTWARE TESTING
6) Security testing: This involves testing the security of the software to find
vulnerabilities that could be exploited by attackers. It is used to ensure
that the software is protected from unauthorized access, modification, or
destruction.
7) Usability testing: This involves testing the usability of the software to
ensure that it is easy to use and understand. It is used to ensure that the
software meets the needs of the users and that it is easy to learn and use.
8) Exploratory testing: This is a non-systematic approach to testing where
the tester explores the software and tries to find defects. It is typically
performed manually and is used to find defects that may not be found by
other testing methods.
The most common testing methods are:
1) Black box testing: This is a type of testing where the tester does not have
any knowledge of the internal workings of the software. The tester only
knows the input and output of the software and uses this knowledge to try
to find defects.
2) White box testing: This is a type of testing where the tester has full
knowledge of the internal workings of the software. The tester uses this
knowledge to try to find defects in the code.
3) Grey box testing: This is a type of testing that falls between black box
testing and white box testing. The tester has some knowledge of the
internal workings of the software, but not as much as in white box testing.
The specific testing method that is used will depend on the type of software
being developed and the level of testing that is required.
UNIT-5 SOFTWARE TESTING

Q2: Explain Black Box and White Box testing.


Black box testing and white box testing are two different testing methods
that are used to find defects in software.

Black box testing is a type of testing where the tester does not have any
knowledge of the internal workings of the software.

The tester only knows the input and output of the software and uses this
knowledge to try to find defects. Black box testing is typically used to test
the functionality of the software, ensuring that it meets the requirements
and specifications.
White box testing is a type of testing where the tester has full knowledge
of the internal workings of the software.

The tester uses this knowledge to try to find defects in the code. White
box testing is typically used to test the code for correctness, efficiency,
and maintainability.

The following table summarizes the key differences between black


box testing and white box testing:
UNIT-5 SOFTWARE TESTING

The best testing method to use will depend on the specific software being
developed and the level of testing that is required.

In general, black box testing is a good starting point for most software
projects. White box testing can be used to supplement black box testing
in cases where there are specific concerns about the code quality.

Here are some examples of black box testing:


1) Testing the login functionality of a website to ensure that users can log
in with valid credentials.
2) Testing the checkout functionality of an online store to ensure that
users can successfully purchase items.
3) Testing the search functionality of a search engine to ensure that users
can find the results they are looking for.

Here are some examples of white box testing:


1) Testing the code for logical errors, such as typos and missing
semicolons.
2) Testing the code for performance issues, such as memory leaks and
CPU bottlenecks.
3) Testing the code for security vulnerabilities, such as SQL injection and
cross-site scripting attacks.
UNIT-5 SOFTWARE TESTING

Q3: Explain Unit testing.


Unit testing is a software testing method by which individual units of source
code—sets of one or more computer program modules together with associated
control data, usage procedures.
Unit testing is a white box testing method, because it requires knowledge of the
internal structure of the code being tested.
Unit testing is typically performed by developers, and it is performed early in
the development process before the code is integrated and tested as a whole
system.
Unit tests are typically written in the same programming language as the code
being tested, and they are often automated so that they can be run quickly and
easily.
The benefits of unit testing include:
It can help to find defects early in the development process, when they are
easier and cheaper to fix.
It can help to improve the quality of the code by making it more modular and
reusable.
It can help to prevent defects from being introduced into the code during
integration and system testing.
It can help to improve the documentation of the code by providing a way to test
the code's functionality.
The drawbacks of unit testing include:
It can be time-consuming to write unit tests, especially for large and complex
code bases.
It can be difficult to write unit tests for code that is not well-designed.
Unit tests can only test the code that they are written for, so they cannot
guarantee that the entire system is working correctly.
Overall, unit testing is a valuable software testing method that can help to
improve the quality of software.
It is important to note that unit testing is not a silver bullet, and it should not be
used as the only testing method.
UNIT-5 SOFTWARE TESTING
Unit testing should be used in conjunction with other testing methods, such as
integration testing and system testing, to ensure that the software is as high
quality as possible.
Here are some tips for writing good unit tests:
Write unit tests for each unit of code.
Make sure that the unit tests are isolated, so that they do not depend on other
units of code.
Write unit tests that are clear and concise.
Use assertions to check the expected results of the unit tests.
Automate the unit tests so that they can be run quickly and easily.

Q4: Explain Integration Testing.


Integration testing is a software testing method that tests how individual units of
software interact with each other. It is typically performed after unit testing and
before system testing. Integration testing is a white box testing method, because
it requires knowledge of the internal structure of the code being tested.
The goal of integration testing is to identify defects in the interfaces between
different units of software. Integration testing can be performed in a number of
ways, depending on the size and complexity of the software being tested.
Some common approaches to integration testing include:
Top-down integration testing: This approach starts with the highest-level
modules and works its way down to the lowest-level modules.
Bottom-up integration testing: This approach starts with the lowest-level
modules and works its way up to the highest-level modules.
Incremental integration testing: This approach integrates the modules one at a
time, starting with the simplest modules and working its way up to the most
complex modules.
Sandwich integration testing: This approach combines top-down and bottom-up
integration testing.
The specific approach that is used will depend on the size and complexity of the
software being tested.
UNIT-5 SOFTWARE TESTING
The benefits of integration testing include:
It can help to find defects in the interfaces between different units of software.
It can help to ensure that the software is working as a whole system.
It can help to identify dependencies between different units of software.
It can help to improve the documentation of the software by providing a way to
test the interactions between different units of software.
The drawbacks of integration testing include:
It can be time-consuming, especially for large and complex software systems.
It can be difficult to identify the cause of defects that are found during
integration testing.
Integration testing can only test the interactions between the units of software
that are being tested, so it cannot guarantee that the entire system is working
correctly.
Overall, integration testing is a valuable software testing method that can help
to improve the quality of software.
It is important to note that integration testing is not a silver bullet, and it should
not be used as the only testing method.
Integration testing should be used in conjunction with other testing methods,
such as system testing and acceptance testing, to ensure that the software is as
high quality as possible.
Here are some tips for performing integration testing:
Start with the simplest modules and work your way up to the most complex
modules.
Use a variety of testing techniques, such as black box testing and white box
testing.
Automate the integration tests so that they can be run quickly and easily.
Track the defects that are found during integration testing and make sure that
they are fixed.
UNIT-5 SOFTWARE TESTING

Q5: Explain System Testing.


System testing is a software testing method that tests the entire software system
to ensure that it meets all of its requirements.
It is typically performed after integration testing and before acceptance testing.
System testing is a black box testing method, because it does not require
knowledge of the internal structure of the code being tested.
The goal of system testing is to identify defects in the system as a whole.
System testing can be performed in a number of ways, depending on the size
and complexity of the software being tested.
Some common approaches to system testing include:
Black box testing: This approach uses test cases that are developed based on
the system requirements.
White box testing: This approach uses test cases that are developed based on
the internal structure of the code.
Boundary value testing: This approach tests the boundaries of the system, such
as the minimum and maximum values that can be entered.
Error guessing: This approach involves guessing the defects that may be
present in the system and then developing test cases to find those defects.
The specific approach that is used will depend on the size and complexity of the
software being tested.
The benefits of system testing include:
It can help to find defects in the system as a whole.
It can help to ensure that the system meets all of its requirements.
It can help to identify potential problems with the system before it is released to
users.
It can help to improve the documentation of the system by providing a way to
test the system's functionality.
The drawbacks of system testing include:
It can be time-consuming, especially for large and complex software systems.
It can be difficult to identify the cause of defects that are found during system
testing.
UNIT-5 SOFTWARE TESTING
System testing can only test the system as it is currently configured, so it cannot
guarantee that the system will work correctly in all possible configurations.
Overall, system testing is a valuable software testing method that can help to
improve the quality of software.
It is important to note that system testing is not a silver bullet, and it should not
be used as the only testing method.
System testing should be used in conjunction with other testing methods, such
as acceptance testing, to ensure that the software is as high quality as possible.
Here are some tips for performing system testing:
Develop a comprehensive test plan that covers all of the system's requirements.
Use a variety of testing techniques, such as black box testing, white box testing,
and boundary value testing.
Automate the system tests so that they can be run quickly and easily.
Track the defects that are found during system testing and make sure that they
are fixed.

Q6: Discuss topic of change over in software Engineering.


Ans. There are four main types of changeovers in software engineering:
Parallel changeover is the most common type of changeover. In this approach,
both the old and new systems are run simultaneously until the new system is
fully tested and ready to be used. This method minimizes the risk of disruption
to business operations, but it can be more expensive and time-consuming than
other methods.
Direct changeover is the quickest and cheapest type of changeover, but it is
also the riskiest. In this approach, the old system is shut down and the new
system is brought online all at once. This method can be disruptive to business
operations if the new system is not fully tested or ready to be used.
Pilot changeover is a hybrid of parallel and direct changeover. In this approach,
the new system is first implemented in a small part of the organization, such as
a pilot group of users. Once the new system is tested and working properly in
the pilot group, it is then rolled out to the rest of the organization. This method
UNIT-5 SOFTWARE TESTING
can help to mitigate the risks of a direct changeover, but it can also be more
time-consuming and expensive.
Phased changeover is a gradual approach to changeover. In this approach, the
new system is implemented in phases, with each phase covering a different part
of the organization's operations. This method can help to minimize disruption to
business operations, but it can also be more time-consuming and expensive than
other methods.
The best type of changeover for a particular project will depend on a number of
factors, such as the size and complexity of the project, the budget, the time
constraints, and the risk tolerance of the organization.
Here are some additional things to consider when choosing a changeover
method:
The impact on business operations: How much disruption will the changeover
cause to business operations?
The risk of failure: How likely is it that the new system will fail?
The cost: How much will the changeover cost?
The time frame: How much time is available for the changeover?
The level of user acceptance: How likely are users to accept the new system?
The changeover method should be chosen carefully to minimize the risks and
disruption to business operations.

You might also like