Software Testing unit 1
Software Testing unit 1
Testing includes an examination of code and also the execution of code in various
environments, conditions as well as all the examining aspects of the code. In the
current scenario of software development, a testing team may be separate from
the development team so that Information derived from testing can be used to
correct the process of software development.
Software testing provides an independent view and objective of the software and
gives surety of fitness of the software. It involves testing of all components under
the required services to confirm that whether it is satisfying the specified
requirements or not. The process is also providing the client with information
about the quality of the software.
Starting the test process without a plan is not a good idea to achieve the goal.
So, the first and foremost process in software testing is test planning and
control.
Good testing is based on the good test plan that we have prepared. Once the design
process is completed, test implementation and execution activity should take
place for better test coverage. Exit criteria is evaluated to conclude the testing. It
varies from project to project. Better Implementation of the test plan drives us to
success. Test planning and control involves the following activities,
Axioms means a rule or principle that most people believe to be true so the
following are testing axioms in software testing.
1. It is impossible to test a program completely.
4. The more bugs you find, the more bugs there are.
If you do not test the software for all inputs (a wise choice) you take a risk.
• What if you skip inputs that cause a fault? Risk: financial loss, security, loss of
money, loss of life! That is a lot of pressure for a tester! Software testing is a risk-
based exercise
• If you try to test too much, the development cost becomes prohibitive.
• If you test too little, the probability of software failure increases and as we
discussed, software failures can cost us big time!
• Program testing can be used to show the presence of bugs, but never to show
their absence!
Axiom 4: The more bugs you find, the more bugs there are
• Bugs appear in groups, where you see one you will likely find more,
• Why? Programmers can have bad days Programmers tend to make the same
mistakes some bugs are just the tip of the iceberg.
Why wouldn’t you fix a bug you knew about? There’s not enough time, it’s not
really a bug
• Why not charge the customer for bug fixes in the next release (sound familiar?)
Axiom 6: It is difficult to say when a bug is indeed a bug
• If there is a problem in the software but no one ever discovers it, is it a bug?
Parody of “if a tree falls in the forest does it really make a noise?”
Do’s of a tester:
I. sophisticated tools
II. advanced technologies
III. rewarding career growth
By doing testing on any application, we can decrease the number of bugs, which
does not mean that the application is defect-free because sometimes the software
seems to be bug-free while performing multiple types of testing on it. But at the
time of deployment in the production server, if the end-user encounters those bugs
which are not found in the testing process.
2. Exhaustive Testing is not possible
Sometimes it seems to be very hard to test all the modules and their features with
effective and non- effective combinations of the inputs data throughout the actual
testing process. Hence, instead of performing the exhaustive testing as it takes
boundless determinations and most of the hard work is unsuccessful. So we can
complete this type of variations according to the importance of the modules
because the product timelines will not permit us to perform such type of testing
scenarios.
3. Early Testing
Here early testing means that all the testing activities should start in the early
stages of the software development life cycle's requirement analysis stage to
identify the defects because if we find the bugs at an early stage, it will be fixed
in the initial stage itself, which may cost us very less as compared to those which
are identified in the future phase of the testing process.
4. Defect clustering
The defect clustering defined that throughout the testing process, we can detect
the numbers of bugs which are correlated to a small number of modules. We have
various reasons for this, such as the modules could be complicated; the coding
part may be complex, and so on.
This principle defined that if we are executing the same set of test cases again and
again over a particular time, then these kinds of the test will not be able to find
the new bugs in the software or the application. To get over these pesticide
paradoxes, it is very significant to review all the test cases frequently. And the
new and different tests are necessary to be written for the implementation of
multiple parts of the application or the software, which helps us to find more bugs.
6. Testing is context-dependent
The chance when the application is tested beside the incorrect requirements,
identified the flaws, and fixed them on a given period would not help as testing
is done on the wrong specification, which does not apply to the client's
requirements. The absence of error fallacy means identifying and fixing the bugs
would not help if the application is impractical and not able to accomplish the
client's requirements and needs.
1. Reveal defects,
2. Find weak points,
3. Inconsistent behaviour,
4. Circumstances where the software does not work as expected.
It is difficult for developers to effectively test their own code. A tester needs very
good programming experience in order to understand how code is constructed,
and to know where and what types of, defects could occur.
A tester should work with the developers to produce high-quality software that
meets the customers’ requirements.
Teams of testers and developers are very common in industry, and projects should
have a correct developer/tester ratio. The ratio will vary depending on
1. Available resources
2. Type of project,
3. TMM level (Testing maturity model)
4. Nature of the project
5. Project Schedules
A testers also need to work with requirements engineers to make sure that
requirements are testable, and to plan for system and acceptance test. Testers also
need to work with designers to plan for integration and unit test. Test
managers need to cooperate with project managers in order to develop reasonable
test plans, and with upper management to provide input for the development and
maintenance of organizational
1. Testing standards
2. Polices
3. Goals
Testers also need to cooperate with software quality assurance staff and software
engineering process group members. Testers are a part of the development group.
They concentrate on testing. They may be part of the software quality assurance
group. Testers are specialists, their main function is to plan, execute, record, and
analyse tests. They do not debug software. When defects are detected during
testing, software should be returned to the developers.
The developers locate the defect and repair the code. The developers have a
detailed understanding of the code, and they can perform debugging better.
Testers need the support of management. Testers ensure that developers release
code with few or no defects, and that marketers can deliver software that satisfies
the customers’ requirements, and is reliable, usable, and correct.
Education: The software engineer did not have the proper educational
background to prepare the software artifact. She did not understand how to do
something. For example, a software engineer who did not understand the
precedence order of operators in a particular programming language could inject
a defect in an equation that uses the operators for a calculation.
Transcription: The software engineer knows what to do, but makes a mistake in
doing it. A simple example is a variable name being misspelled when entering
the code.
Process: The process used by the software engineer misdirected her actions. For
example, a development process that did not allow sufficient time for a detailed
specification to be developed and reviewed could lead to specification defects.
Q. Explain Cost of Defects?
In the same way when defect or error is found in the design during
design review then the design can be corrected and it can be re-issued.
But if the error is not caught in the specifications and is not found till
the user acceptance then the cost to fix those errors or defects will be
way too expensive.
Types of Defects: Following are some of the basic types of defects in the
software development:
1. Arithmetic Defects: It include the defects made by the developer in some
arithmetic expression or mistake in finding solution of such arithmetic
expression. This type of defects are basically made by the programmer due
to access work or less knowledge. Code congestion may also lead to the
arithmetic defects as programmer is unable to properly watch the written
code.
2. Logical Defects: Logical defects are mistakes done regarding the
implementation of the code. When the programmer doesn’t understand the
problem clearly or thinks in a wrong way then such types of defects happen.
Also while implementing the code if the programmer doesn’t take care of the
corner cases then logical defects happen. It is basically related to the core of
the software.
3. Syntax Defects: Syntax defects means mistake in the writing style of the
code. It also focuses on the small mistake made by developer while writing
the code. Often the developers do the syntax defects as there might be some
small symbols escaped. For example, while writing a code in C++ there is
possibility that a semicolon (;) is escaped.
4. Multithreading Defects: Multithreading means running or executing the
multiple tasks at the same time. Hence in multithreading process there is
possibility of the complex debugging. In multithreading processes
sometimes there is condition of the deadlock and the starvation is created
that may lead to system’s failure.
5. Interface Defects: Interface defects means the defects in the interaction of
the software and the users. The system may suffer different kinds of the
interface testing in the forms of the complicated interface, unclear interface
or the platform based interface.
6. Performance Defects: Performance defects are the defects when the
system or the software application is unable to meet the desired and the
expected results. When the system or the software application doesn’t fulfil
the user’s requirements then that is the performance defects. It also includes
the response of the system with the varying load on the system.
7. Software error: A software error occurs during the development of the
software. This error can be in the form of a grammatical error, a logical error
where the outcome of a sequence of executions will not result in what was
intended or a misinterpretation of the user requirements in the actual written
code. It may be in the form of user documentation not matching the software
applications operation. An error may or may not be
detected during the coding or testing of the program before it is released to a
customer.
8. Software Fault: A software fault occurs as a result of an error that remains
in the executing program. Not all faults however are detected and the
software may continue executing without any obvious problems. There are
cases where software faults go undetected for many years of a programs
existence.
9. Software Failure: A software failure is a fault that results in a detectable
problem; hence it is referred to as a failure. A failure would cause the
application to malfunction in an obvious manner that warrants the attention
of system maintenance.
2. Errors of Omissions:
As name is already describing error of omission is something which
happens accidentally. Omission word means something left out or
executed. Practical most common example of this error is suppose we
make a function in programming open its bracket but forget to close at
the end.
3. Error of Clarity:
The most common error in the natural languages. This error happens
due to miss understanding between the developer and client. It travels
most of the time from the requirements to the software.
Some defects will fit into more than one class or category. Because of this
problem, developers, testers, and SQA staff should try to be as consistent as
possible when recording defect data.
The overall description of what the product does, and how it should behave
(inputs/outputs), is incorrect, ambiguous, and/or incomplete.
2. Feature Defects
Features refer to functional aspects of the software that map to functional
requirements as described by the users and clients. Features also map to quality
requirements such as performance and reliability. Feature defects are due to
feature descriptions that are missing, incorrect, incomplete, or superfluous.
2. Design Defects
Design defects occur when system components, interactions between system
components, interactions between the components and outside software
/hardware, or users are incorrectly designed. This covers defects in the design of
algorithms, control, logic, data elements, module interface descriptions, and
external software/hardware/user interface descriptions.
When describing these defects we assume that the detailed design description for
the software modules is at the pseudo code level with processing steps, data
structures, input/output parameters, and major control structures defined. If
module design is not described in such detail then many of the defects types
described here may be moved into the coding defects class.
3. Coding Defects
Coding defects are derived from errors in implementing the code. Coding defects
classes are closely related to design defect classes especially if pseudo code has
been used for detailed design. Some coding defects come from a failure to
understand programming language constructs, and miscommunication with the
designers. Others may have transcription or omission origins. At times it may be
difficult to classify a defect as a design or as a coding defect. It is best to make a
choice and be consistent when the same defect arises again.
1. Algorithmic and Processing Defects
Adding levels of programming detail to design, code-related algorithmic and
processing defects would now include unchecked overflow and underflow
conditions, comparing inappropriate data types, converting one data type to
another, incorrect ordering of arithmetic operators (perhaps due to
misunderstanding of the precedence of operators), misuse or omission of
parentheses, precision loss, and incorrect use of signs.
1. Customer Satisfaction
2. Cost Effective
If an application works without any fault and with low maintenance will
save a big amount for the owner. Software testing helps in early defect
detection and fixing them to make a more successful and good return
application. Every application demands maintenance and the application
owner spends a good amount to maintain the working and functionality of
the application. By testing an application, the maintenance area reduces
too many folds and hence saves money. Software testing helps in saving
the money of the developing organization by detecting defects in the early
stages of the software which becomes easy and economical for the
developer to redesign the module instead of detecting bugs after the
complete development of the software.
3. Quality Product
The main focus of software testing is to deliver a quality product to its
clients which results in a satisfied client. The quality of a product can only
be maintained when it is bug-free and meet all the user requirements.
5. Bug-Free Application
The main task of software testing is to identify bugs and inform them the
concerned developing team to fix. When a bug is fixed, testers recheck the
bug to identify its status. A bug-free application means an application with
no glitches, faults, or defects and works effectively and smoothly. The only
demand of an application is that it functions as per requirements and does
not behave unusually due to defects. A 100% bug-free application is
practically not possible but the testing team tries to identify as many as
possible bugs in the application by creating test scenarios. Software testing
follows the STLC process to detect a bug.
6. Security
The main concern of the digital world is Security. A secure system always
remains on the priority list of customers. Owners pay multiple dollars to
make their systems secure from hackers, malicious attacks, and other
thefts. Security testing technique is used to identify the security level of
the application and testers try to find loopholes to break the security of an
application. In the case of bank applications, security is the foremost
requirement as it deals with customer money, and bank applications always
remain on top of the thefts.
7. Easy Recovery
Software Testing Design Techniques help you design better test cases. Since
exhaustive testing is not possible; Manual Testing Techniques help reduce
the number of test cases to be executed while increasing test coverage. They
help identify test conditions that are otherwise difficult to recognize.
Equivalent Class Partitioning allows you to divide set of test condition into
a partition which should be considered the same. This software testing
method divides the input domain of a program into classes of data from
which test cases should be designed.
The concept behind this Test Case Design Technique is that test case of a
representative value of each class is equal to a test of any other value of the
same class. It allows you to identify valid as well as invalid equivalence
classes.
For every function, you need to create a table and list down all types of
combinations of inputs and its respective outputs. This helps to identify a
condition that is overlooked by the tester.
• Error Guessing
Error Guessing is a software testing technique based on guessing the error
which can prevail in the code. The technique is heavily based on the
experience where the test analysts use their experience to guess the
problematic part of the testing application. Hence, the test analysts must be
skilled and experienced for better error guessing.
The technique counts a list of possible errors or error-prone situations. Then
tester writes a test case to expose those errors. To design test cases based on
this software testing technique, the analyst can use the past experiences to
identify the conditions.
**************************