Download as docx, pdf, or txt
Download as docx, pdf, or txt
You are on page 1of 8

TESTING TECHNIQUES

STATIC TESTING TECHNIQUES

➢ REVIEWS
➢ STATIC ANALYSIS
The two main types of static testing techniques are

➢ Tool driven evaluation of the code or other work


products is called STATIC ANALYSIS.

We can use the different tools to perform the code's analysis and
evaluation of the same. In other words, we can say that
developers' developed code is analysed with some tools for
structural bugs, which might cause the defects. The static analysis
will help us to identify the below errors:

Dead code
Unused variables & Variable with undefined value
Endless loops & Incorrect syntax

➢ Manual examinations include analysis of code done


manually, known as REVIEWS.

Reviews are an effective technique for Static Testing. A review in a


Static
Testing is a process or meeting conducted to find the potential
defects in the design of any program. Another significance of
review is that all the team members get to know about the
progress of the project. Documents are directly examined by
people and discrepancies are sorted out. Reviews not only help to
find defects but also understand missing requirements, design defects,
non-maintainable code.

Reviews can further be classified into four Types:

Informal reviews/Buddy check


Walkthroughs
Technical review/Peer review
Inspections/Formal review
Informal review

Not based on a formal process. May be performed by the author


(buddy check, pairing, pair review) or by more people.
Walkthrough

Walkthrough is used to review documents with peers, managers


and fellow team member who are guided by the author of the
document to gather feedback.

Technical review /Peer review

Technical review is examined by a team of qualified software


engineers for the suitability of the software product for its
intended use and identifies discrepancies from specification and
standards.

Inspection or Formal Review

Inspections are a formal type of review that involves checking the


documents thoroughly before meeting and is carried out by
moderators.

ROLES IN A FORMAL REVIEW

Author: Creates the work product and fix defects in the work
product under review.
Manager: Responsible for review planning, decides on the
execution of reviews and ensures the review process
objectives are met.
Moderator: Ensure effective running of meeting and mediates,
if necessary, between the various points of view.
Reviewer: May be subject matter experts, person working on
the project. Identify potential defects in the work product
under review.
Scribe: Records new potential defects, open points and
decision from the review meeting.

Static testing is performed due to the following reasons


Early defect detection and correction.
Reduced development timescales.
Reduced testing cost and time.
For improvement of development
productivity. To get fewer defect at a later
stage of testing.

DYNAMIC TESTING TECHNIQUES

➢ BLACK BOX TESTING TECHNIQUES


➢ WHITE BOX TESTING TECHNIQUES
➢ EXPERIENCED BASED TECHNIQUES

BLACK BOX TESTING TECHNIQUE

These are scientific and time-tested techniques that will help us


get maximum coverage in minimum test cases.

1) EQUIVALENCE CLASS PARTIONING

➢ Equivalence partitioning is also known as Equivalence class


partitioning.

➢ Equivalence partitioning is a black-box testing technique that


applies to all levels of testing.

➢ It divides the input data into different equivalence data classes


and will test with one input value from each class.

The idea behind the technique is to divide a set of test conditions


into groups or sets that can be considered as same. Partitioning
usually happens for test objects, which includes inputs, outputs,
internal values, time-related values, and for interface parameters.
It works on certain assumptions:

The system will handle all the test input variations within a
partition in the same way.
Each value must belong to one and only one equivalence
partition
If one of the input condition passes, then all other input
conditions within the partition will pass and if one of the
input conditions fails, then all other input conditions within
the partition will fail as well
By applying this technique, we have significantly reduced our
test cases, but yet the coverage remains high.
The partitions can be further divided into sub-partitions if
required Consider that you are filling an online application form for a gym
membership. Most of the gyms have age criteria of 16-60, where you can
independently get the membership without any supervision needed. If you look
at below membership form, you will need to fill age first. After that, depending
on whether you are between 16-60, you can go further. Otherwise, you will get
a message that you cannot get a membership.

If we have to test this age field, we need to test the values between 16-60, and
values which are less than 16, and some values which are more than 60. It is easy
to figure out, but what is not very evident is how many combinations we need to
test

• <16 has 15 combinations from 0-15, and if you test negative values, then
some more combination can be added
• 16-60 has 45 combinations
• >60 has 40 combinations (if you only take till 100)

The First step in Equivalence partitioning is to divide (partition) the input values
into sets of valid and invalid partitions.
Valid Partitions are values that should be accepted by the component or system
under test. This partition is called "Valid Equivalence Partition."

Invalid Partitions are values that should be rejected by the component or system
under test. This partition is called "Invalid Equivalence Partition."

The premise of this technique works on the assumption that all values within the
partition will behave the same way. So, all values from 16-60 will behave the same
way. The same goes for any value less than 16 and values greater than 60. As
such, we only test 1 condition within each partition and assume that if it
works/doesn't work, the rest of the condition will behave the same way.
Our Test conditions in Such case could be:

• Enter Age = 5
• Enter Age = 20
• Enter Age = 65

2) BOUNDARY VALUE ANALYSIS

➢ The basis of Boundary Value Analysis (BVA) is testing the


boundaries at partitions.
➢ BVA is an extension of equivalence partitioning.
➢ Boundary value analysis can perform at all test levels, and its
primarily used for a range of numbers, dates, and time.
➢ However, this is useable only when the partition is ordered,
consisting of numeric or sequential data. The minimum and
maximum values of a partition are its boundary values.
We will refer to the same example of gym form (Refer to our article on Equivalence
Partitioning) where we need to enter Age.

The first step of Boundary value analysis is to create Equivalence Partitioning

Now Concentrate on the Valid Partition, which ranges from 16-60.


15 16 17 59 60 61

(Boundary-1) (Boundary
+1) (Boundary-1) (Boundary+1)

Boundary Boundary

Valid Boundary Conditions


• Identify Exact Boundary Value of this partition Class - which is 16 and 60.
• Get the Boundary value which is one less than the exact Boundary - which
is 15 and 59.
• Get the Boundary Value which is one more than the precise Boundary -
which is 17 and 61. If we combine them all, we will get below combinations
for Boundary Value for the Age Criteria.

Valid Boundary Conditions: Age = 16, 17, 59, 60

Invalid Boundary Conditions: Age = 15 61,

It's straightforward to see that valid boundary conditions fall under Valid partition
class, and invalid boundary conditions fall under Invalid partition class.

WHITE BOX TESTING TECHNIQUES

1) STATEMENT COVERAGE

➢ This technique involves execution of all statements of the


source code at least once. It is used to calculate the total
number of executed statements in the source code out of
total statements present in the source code.
Generally, in the internal source code, there is a wide variety of
elements like operators, methods, arrays, looping, control
statements, exception handlers, etc. Based on the input given to
the program, some code statements are executed and some may
not be executed. The goal of statement coverage technique is to
cover all the possible executing statements and path lines in the
code.
2) DECISION COVERAGE

➢ Decision coverage technique comes under white box testing


which gives decision coverage to Boolean values. This
technique reports true and false outcomes of Boolean
expressions. Whenever there is a possibility of two or more
outcomes from the statements like do while statement, if
statement and case statement (Control flow statements),
it is considered as decision point because there are two
outcomes either true or false.
➢ Decision coverage covers all possible outcomes of each and
every Boolean condition of the code by using control flow
graph or chart.
Generally, a decision point has two decision values one is true,
and another is false that's why most of the times the total
number of outcomes is two. The percent of decision coverage can
be found by dividing the number of exercised outcomes with the
total number of outcomes and multiplied by 100.

EXPERIENCED BASED TECHNIQUES

1) EXPLORATORY TESTING

➢ Exploratory Testing is a type of software testing where Test cases


are not created in advance but testers check system on the fly. They
may note down ideas about what to test before test execution.
➢ Exploratory testing is a hands-on approach in which the testers are
involved in minimum planning and maximum test execution.

2) ERROR GUESSING

➢ It is an experience-based testing technique where the Test


Analyst uses his/her experience to guess the problematic
areas of the application.
➢ This technique necessarily requires skilled and experience
and It is mainly based on intuition.
➢ The main purpose of this technique is to guess possible
bugs in the application

You might also like