You are on page 1of 18

Unit I

Psychology of Testing

By Dr. Vibha kaw Raina


Psychology of testing
• Psychology of testing is a type of testing which fully
depends on the mindset of developers and tester.  
• When we are building the software, we working
positively towards the software never think about
negative things.
• The mindset should be different while testing and
reviewing developing software.
• With the correct mindset, the programmer can test
their own code.
• At a certain point independence tester often makes
the tester more
Levels of Independence Tester in Psychology of testing

• Tests designed by the person who wrote the software under test
• Tests designed by another person
• Tests designed by a person from a different organizational
group or test specialists
• Tests designed by a person from a different organization or
company
Myers says:
• If your goal is to show absence of errors, you will not discover many.
• If you are trying to show the program correct, your subconscious will
manufacture safe test cases.
• If your goal is to show presence of errors, you will discover large
percentage of them.
Psychology of testing
• In Psychology of testing, People and projects are driven by
objectives.
• While developing the software, programmer writing code to
build software, that time Programmers test their code then
pass through the next phase but as we already mentioned, It
is difficult to find our own mistakes.
• That’s why independence tester highly recommendable. they
are testing specialists or professional testers.
•  In Psychology of testing communication also matters, tester
and test lead need good interpersonal skill to communicate.
• In Psychology of testing Tester and others can improve
communication by:
Psychology of testing
• Starting collaboration instead of battles.
• Everyone should have a common goal of the
quality software.
• Improve mutual understanding while working.
• Confirm that the other person has understood
what you have said.
References:https
://softwaretestingbooks.com/what-is-the-psycholog
y-testing
Verification and Validation

• These terms are used interchangeably and some of


us may also feel that both are synonyms.
• The Institute of Electrical and Electronics
Engineers (IEEE) has given definitions which are
largely accepted by the software testing
community.
• Verification is related to static testing which is
performed manually.
• We only inspect and review the document.
However, validation is dynamic in nature and
requires the execution of the program.
Verification
• As per IEEE [IEEE01], “It is the process of evaluating the
system or component to determine whether the products of
a given development phase satisfy the conditions imposed
at the start of that phase.”
• We apply verification activities from the early phases of the
software development and check / review the documents
generated after the completion of each phase.
• Hence, it is the process of reviewing the requirement
document, design document, source code and other related
documents of the project.
• This is manual testing and involves only looking at the
documents in order to ensure what comes out is what we
expected to get.
Validation
• As per IEEE [IEEE01], “It is the process of evaluating a system or
component during or at the end of development process to
determine whether it satisfies the specified requirements.” It
requires the actual execution of the program.
• It is dynamic testing and requires a computer for execution of the
program. Here, we experience failures and identify the causes of
such failures.
• Hence, testing includes both verification and validation.
• Thus Testing = Verification + Validation
• Both are essential and complementary activities of software testing.
• If effective verification is carried out, it may minimize the need of
validation and more number of errors may be detected in the early
phases of the software development.
• Unfortunately, testing is primarily validation oriented.
Verification & Validation Goals
• Establish confidence that the software is fit for purpose.
• Two principal objectives
• The discovery of defects in a system
• The assessment of whether or not the system is useful and
useable in an operational situation.
• This does not mean:
• completely free of defects
• correct
Rather, it must be good enough for its intended use and the type of
use will determine the degree of confidence that is needed.
Verification & Validation
Static verification. Concerned with Analysis of the
static system representation to discover problems
• Software inspections: May be supplement by
tool-based document and code analysis
• Static analysis
• Formal verification

Dynamic V & V: Concerned with exercising and


observing product behavior, using Software testing.
• The system is executed with test data and its
operational behavior is observed
Static verification Code Inspections
• Formalized approach to document reviews
• Intended explicitly for defect detection (not correction).
• Defects may be: logical errors, anomalies in the code
that might indicate an erroneous condition (e.g. an
uninitialized variable) or non-compliance with standards.
• Inspections can check conformance with a specification
but not conformance with the customer’s real
requirements.
• Inspections cannot check non-functional characteristics
such as performance, usability, etc.
• Usually done by a group of programmers
• The comments are to the program not the programmer
Static verification Code Inspections
• Error Checklist for Inspections
• The checklist is largely language independent
• Sometimes (unfortunately) concentrate more on issues of style
than on errors (for example, “Are comments accurate and
meaningful?” and “Are if- else, code blocks, and do-while
groups aligned?”), and the error checks are too nebulous to be
useful (such as “Does the code meet the design
requirements?”).
• Beneficial side effects
• The programmer usually receives feedback concerning
programming style, choice of algorithms, and programming
techniques.
• The other participants gain in a similar way by being exposed
to another programmer’s errors and programming style.
Static verification Code Inspections -example
Data Flow Errors

Will the program, module, or subroutine


eventually terminate?

what happens if NOTFOUND never becomes false?


Static verification Code Inspections -example
Comparison errors

Does the way in which the compiler evaluates Boolean


expressions affect the program?

If ((x==0) && (y/x)>z)

This statement may be acceptable for compilers that end the test as
soon as one side of an and is false but may cause a division-by-zero
error with other compilers.
Static verification Automated Static Analysis
• Static analyzers are software tools for source text
processing.
• A static Analyzer:
• A collection of algorithms and techniques used to
analyze source code in order to automatically find bugs
• Parses the program text and try to discover potentially
erroneous conditions and bring these to the attention of
the V & V team.
• Very effective as an aid to inspections – they are a
supplement to but not a replacement for
inspections.
Static verification Formal Verification Methods
• Formal methods can be used when a mathematical
specification of the system is available.
• Form the ultimate static verification technique.
• Involve detailed mathematical analysis of the
specification
• May develop formal arguments that a program
conforms to its mathematical specification.
• Model checking.
• Predicate abstraction.
• Termination analysis.
Dynamic V & V Software Testing
• According to Boehm (1975),
• Programmers in large software projects typically
spend their time as follows:
• 45-50% program checkout
• 33% program design
• 20% coding
THANK YOU

You might also like