Types of Testing by ASS

You might also like

Download as pptx, pdf, or txt
Download as pptx, pdf, or txt
You are on page 1of 31

Types of Testing

By Arvind Sardar
Types of Testing
Objectives:
Understand the basic types of testing for
software.
Differentiate White box and Black box testing
Examining the Specification
The product specification is a written document using words and
pictures to describe the intended product.

Black-Box and White-Box Testing


Examining the Specification
White-Box Testing
In white-box testing (sometimes called clear-box testing), the
software tester has access to the programs code and can examine it
for clues to help him with his testing.
He can see inside the box. Based on what he sees, the tester may
determine that certain numbers are more or less likely to fail and
can tailor his testing based on that information.

white-box testing examines the program structure and derives test


data from the program logic/code.
The other names of glass box testing are clear box testing, open box
testing, logic driven testing or path driven testing or structural
testing.
Examining the
Specification
White Box Testing Techniques:
Statement Coverage - This technique is aimed at exercising
all programming statements with minimal tests.

Branch Coverage - This technique is running a series of tests


to ensure that all branches are tested at least once.

Path Coverage - This technique corresponds to testing all


possible paths which means that each statement and branch is
covered.
Examining the Specification
White-Box Testing

Advantages of White Box Testing:


1. Forces test developer to reason carefully about implementation.
2. Reveals errors in "hidden" code.
3. Spots the Dead Code or other issues with respect to best
programming practices.

Disadvantages of White Box Testing:


4. Expensive as one has to spend both time and money to perform
white box testing.
5. Every possibility that few lines of code are missed accidentally.
6. In-depth knowledge about the programming language is
necessary to perform white box testing.
Examining the Specification
Black-Box Testing

Black box testing is a method of software testing that examines the


functionality of an application based on the specifications.

It is also known as Specifications based testing. This method of test can be


applied to each and every level of software testing such as Unit,
Integration,
System and Acceptance Testing.
Examining the Specification
Black-Box Testing

There are different techniques involved in Black Box testing.

1. Equivalence Class

2. Boundary Value Analysis

3. Domain Tests

4. Orthogonal Arrays

5. Decision Tables

6. State Models

7. Exploratory Testing

8. All-pairs testing
Examining the Specification
Static and Dynamic Testing
software is tested are static testing and dynamic testing.
Static testing refers to testing something thats not running.
Examining and reviewing it.
Dynamic testing is what you would normally think of as testing.
Running and using the software.
Example:-
Kicking the tires, checking the paint, and looking under the hood are
static testing techniques.

Starting it up, listening to the engine, and driving down the road are
dynamic testing techniques.
Examining the Specification
Static Black-Box Testing: Testing the Specification
Testing the specification is static black-box testing.
The specification is a document, not an executing program, so its
considered static.
Examining the Specification
Performing a High-Level Review of the Specification
The spec must deal with many unknowns, take a multitude of changing
inputs, and attempt to pull them all together into a document that describes
a new product.
Testing the specification isnt to jump in and look for specific bugs.

First Step: Stand back and view it from high level

Better understanding of the Spec why and how


Examining the Specification
Performing a High-Level Review of the Specification
Pretend to Be the Customer
Find out who they are, e.g. research & interview
Gain familiarity of the application field
Customer expectations, quality is measured in terms of these
expectations
Try to understand the spec
Research Existing Standards and Guidelines
Why standards and guidelines?
Terminology and conventions
Industrial/government requirements
Hardware/software interfaces
Graphical User Interface
Industry Requirements.
Make sure correct standards & guidelines are used or applied
Examining the Specification
Performing a High-Level Review of the Specification
Review and test similar software
Similar systems of feel and look efficiency
Competitors products
Issues to review
. Scale: bigger, smaller, similar, etc.
. Complexity
. Testability: can you test such software
. Quality/reliability
Use the software
Examining the Specification
Low-Level Specification Test Techniques
Specification Attributes Checklist
-A good, well-thought-out specification:
Complete
Accurate
Precise, unambiguous, and clear
Consistent
Relevant
Feasible
Code-free: what, but not how
Testable
Examining the Specification
Low-Level Specification Test Techniques
Specification Terminology Checklist
- avoid problem words
. Always, every, all, none, never: absolute
. Certainly, therefore, clearly, obviously,
. Sometimes, often, usually,
. Etc., and-so-on, and-so-forth: no way to test
. Good, fast, cheap, efficient, : not quantified
. Handled, processed, rejected: task not clear
. If then (forget else)
Techniques for Black Box Testing
Requirement Based Testing:-

What is a Requirement?
The requirements are the high-level descriptions about a particular system
services, constraints or to a detailed specification that are generated during
the requirements gathering process.

Requirement Types:
User Requirements - It is a detailed description in natural language along with
diagrams of the services the system provides and its operational constraints. It is
usually developed by end users.

System requirements - It is a structured document detailing the descriptions of the


system's functions, services and operational constraints.

Functional Requirements - It describes the services of the system, how the system
should react to particular inputs and how the system should behave in definite
situations.
Techniques for Black Box Testing
Requirement Types:
Non-functional Requirements - It describes the attributes of the
system.
Domain Requirements - Requirements that arises from the
domain of the application and that reflect characteristics of that
domain. It can be either functional or non-functional
specifications.
Techniques for Black Box Testing
Requirement Based Testing:-

Requirements based testing is a testing approach in which test cases,


conditions and data are derived from requirements.
It includes functional tests and also non-functional attributes such as
performance, reliability or usability.

Stages in Requirements based Testing:


Defining Test Completion Criteria - Testing is completed only when all the
functional and non-functional testing is complete.

Design Test Cases - A Test case has five parameters namely the initial state or
precondition, data setup, the inputs, expected outcomes and actual outcomes.

Execute Tests - Execute the test cases against the system under test and
document the results.
Techniques for Black Box Testing
Stages in Requirements based Testing:

Verify Test Results - Verify if the expected and actual results match
each other.

Verify Test Coverage - Verify if the tests cover both functional and non-
functional aspects of the requirement.

Track and Manage Defects - Any defects detected during the testing
process goes through the defect life cycle and are tracked to resolution.
Defect Statistics are maintained which will give us the overall status of
the project.
Techniques for Black Box Testing
Requirements Testing process:

Testing must be carried out in a timely manner.

Testing process should add value to the software life cycle, hence
it needs to be effective.

Testing the system exhaustively is impossible hence the testing


process needs to be efficient as well.

Testing must provide the overall status of the project, hence it


should be manageable.
Techniques for Black Box Testing
The requirements-based testing (RBT) process addresses two major issues:
first, validating that the requirements are correct, complete, unambiguous,
and logically consistent; and
second, designing a necessary and sufficient (from a black box perspective)
set of test cases from those requirements to ensure that the design and code
fully meet those requirements.
Techniques for Black Box Testing
Positive and Negative Testing:-

What is Positive Testing?


Positive testing is a testing technique to show that a product or
application under test does what it is supposed to do. Positive testing
verifies how the application behaves for the positive set of data.
Positive Testing verifies if the application is Not showing error when it
is not supposed to and showing error when it is supposed to.

Positive testing is the type of testing that can be performed on the system
by providing the valid data as input. It checks whether an application
behaves as expected with the positive input.
This is to test to check the application that does what it is supposed to do
so
Techniques for Black Box Testing
Positive and Negative Testing:-

There is a text box in an application which can accept only numbers.


Entering values up to 99999 will be acceptable by the system and any
other values apart from this should not be acceptable. To do positive
testing, set the valid input values from 0 to 99999 and check whether the
system is accepting the values
Techniques for Black Box Testing
Positive and Negative Testing:-

What is Negative Testing?


Negative testing is performed to ensure that the product or application under test
does NOT fail when an unexpected input is given.
The purpose of Negative testing is to break the system and to verify the
application response during unintentional inputs.

Negative Testing Characteristics:


Negative Testing is carried out to spot the faults that can result in significant
failures.

Negative Testing is performed to expose the software weakness and potential


for exploitation.

It is carried out to show data corruption or security breaches.


Techniques for Black Box Testing
Positive and Negative Testing:-

Negative Testing Techniques:


The following are the negative testing techniques adopted during software
testing:
Embed Single Quote on URL when it tries to query the database.

Skip the Required Data Entry and try to proceed.

Verify each Field Type Test.

Enter large values to test the size of the fields.

Verify the numeric boundary and numeric size test.

Verify the Date Format and its validity.

Verify the web session and check for the performances.


Techniques for Black Box Testing
Positive and Negative Testing:-

Negative Testing Techniques:


Negative Testing is a variant of testing that can be performed on the system
by providing invalid data as input.
It checks whether an application behaves as expected with the negative
input. This is to test the application that does not do anything that it is
not supposed to do so.
Example:-
Negative testing can be performed by testing by entering alphabets
characters from A to Z or from a to z. Either system text box should not
accept the values or else it should throw an error message for these
invalid data inputs.
Techniques for Black Box Testing
Positive and Negative Testing:-
In both the testing, following needs to be considered:
Input data
Action which needs to be performed
Output Result

Testing Technique used for Positive and Negative Testing:

Boundary Value Analysis

Equivalence Partitioning
Techniques for Black Box Testing
Positive and Negative Testing:-
Example of Positive and negative testing scenarios:
If the requirement is saying that password text field should accepts 6 20
characters and only alphanumeric characters.

Positive Test Scenarios:


Password textbox should accept 6 characters
Password textbox should up to 20 characters
Password textbox should accepts any value in between 6-20 chars length.
Password textbox should accepts all numeric & alphabets values.

Negative Test scenarios:


Password textbox should not accept less than 6 characters
Password textbox should not exceeds more than 20 characters
Password textbox should not accept special characters
Techniques for Black Box Testing
Positive and Negative Testing:-

positive and negative testing is equally important for effective testing which
help to improve quality of software.

Negative testing help to find more defects & improve the quality of the

software application under test but it should be done once the positive

testing is completed.

End users can enter any input values, such real life scenarios can be tested

before moving software live.

Purpose of Positive and Negative Testing is to prove that the application

works as per the requirements and specifications.


Techniques for Black Box Testing
Boundary Value Analysis
Techniques for Black Box Testing
Equivalence Partitioning

You might also like