SE Unit5
SE Unit5
• 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.
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 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.