Top Banner
BLACK BOX TESTING K.KARTHIKEYAN
31

BLACK BOX TESTING K.KARTHIKEYAN. Black box testing technique Random testing Equivalence and partitioning testing Boundary value analysis State transition.

Jan 03, 2016

Download

Documents

Joanna Wilson
Welcome message from author
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
Page 1: BLACK BOX TESTING K.KARTHIKEYAN. Black box testing technique Random testing Equivalence and partitioning testing Boundary value analysis State transition.

BLACK BOX TESTING

K.KARTHIKEYAN

Page 2: BLACK BOX TESTING K.KARTHIKEYAN. Black box testing technique Random testing Equivalence and partitioning testing Boundary value analysis State transition.

Black box testing technique

• Random testing • Equivalence and partitioning testing • Boundary value analysis • State transition testing • Cause and effect graphing • Error guessing

Page 3: BLACK BOX TESTING K.KARTHIKEYAN. Black box testing technique Random testing Equivalence and partitioning testing Boundary value analysis State transition.

Random testing

All of the test inputs are generated randomly (often using a tool).

İt is a black box testing

Page 4: BLACK BOX TESTING K.KARTHIKEYAN. Black box testing technique Random testing Equivalence and partitioning testing Boundary value analysis State transition.

Why we use RT ?

• Random testing gives us an advantage of easily estimating software reliability from test outcomes. Test inputs are randomly generated according to an operational profile, and failure times are recorded

• The data obtained from random testing can then be used to estimate reliability. Other testing methods cannot be used in this way to estimate software reliability

• Use of random test inputs may save some of the time and effort that more thoughtful test input selection methods require.(domain is well-structured)

Page 5: BLACK BOX TESTING K.KARTHIKEYAN. Black box testing technique Random testing Equivalence and partitioning testing Boundary value analysis State transition.

How we use RT?

Random Testing can be summarized as a four-step procedure

1. The input domain is identified

2. Test inputs are selected independently from the domain

3. The system under test is executed on these inputs. This inputs constitude a random test set.

4. The results are compared to the system spesification. The test is a failure if any input leads to incorrect results; otherwise it is a success.

Page 6: BLACK BOX TESTING K.KARTHIKEYAN. Black box testing technique Random testing Equivalence and partitioning testing Boundary value analysis State transition.

Main types of random testing techniques:

1. Random input data generation

2. Random sequence of data input (sometimes called as stochastic testing)

3. Random data selection from existing database

It is possible to combine all the above testing techniques.

Page 7: BLACK BOX TESTING K.KARTHIKEYAN. Black box testing technique Random testing Equivalence and partitioning testing Boundary value analysis State transition.
Page 8: BLACK BOX TESTING K.KARTHIKEYAN. Black box testing technique Random testing Equivalence and partitioning testing Boundary value analysis State transition.

• To provide an approach to design test case

• Understand how to apply equivalence partitioning

and boundary analysis to design test case

Purpose

Equivalence and partitioning testing

Page 9: BLACK BOX TESTING K.KARTHIKEYAN. Black box testing technique Random testing Equivalence and partitioning testing Boundary value analysis State transition.

9

What is EP?

Input, output domain

Equivalence classes

Page 10: BLACK BOX TESTING K.KARTHIKEYAN. Black box testing technique Random testing Equivalence and partitioning testing Boundary value analysis State transition.

Advantages of EP

- To reduce the number of test cases to a necessary minimum

- To select the right test cases to cover all possible scenarios ( of course not to be absolutely sure)

Page 11: BLACK BOX TESTING K.KARTHIKEYAN. Black box testing technique Random testing Equivalence and partitioning testing Boundary value analysis State transition.

How to use to design testcase

Test case design by EP proceeds into 2 steps:

- Identify equivalence classes

- Define the test cases

Page 12: BLACK BOX TESTING K.KARTHIKEYAN. Black box testing technique Random testing Equivalence and partitioning testing Boundary value analysis State transition.

12

• Input, output: clue from requirement• Equivalence classes are of 2 types: valid and

invalid• Ex: identify equivalence classes for this

requirement “ if a pupil has total score >= 75, he will pass the exam, otherwise will fail (total score is an integer)”

Identify equivalence classes

Page 13: BLACK BOX TESTING K.KARTHIKEYAN. Black box testing technique Random testing Equivalence and partitioning testing Boundary value analysis State transition.

Identify equivalence classes

Total score Error messageSystem

Fail

Pass

Page 14: BLACK BOX TESTING K.KARTHIKEYAN. Black box testing technique Random testing Equivalence and partitioning testing Boundary value analysis State transition.

14

Valid equivalence classes

Invalid equivalence classes

Total score 1. >=75 2. <753. Null4. String

Result of the exam

5. Pass6. Fail7. Error message

Identify equivalence classes

Page 15: BLACK BOX TESTING K.KARTHIKEYAN. Black box testing technique Random testing Equivalence and partitioning testing Boundary value analysis State transition.

• Assign a unique number to each equivalence class• For valid case: until all valid equivalence classes have

been covered by test case, write a new test case covering as many uncover valid equivalence classes as possible.

• For invalid case: until all invalid equivalence classes have been covered by test case, write a new test case that cover one, and only one, of the uncovered invalid equivalence classes.

Define test cases

Page 16: BLACK BOX TESTING K.KARTHIKEYAN. Black box testing technique Random testing Equivalence and partitioning testing Boundary value analysis State transition.

16

• Example: write test case for “ if a pupil has total score >= 75, he will be past the exam, otherwise will fail ”, using equivalence partitioning.

Define test cases

Conditions Valid equivalence class

Invalid equivalence class

Total score 1. >=75 2. <753. Null4. String

Result of the exam

5. Pass6. Fail7. Error message

Test case:

• 1, 5

• 2, 6

• 3, 7

• 4, 7

Page 17: BLACK BOX TESTING K.KARTHIKEYAN. Black box testing technique Random testing Equivalence and partitioning testing Boundary value analysis State transition.

17

Page 18: BLACK BOX TESTING K.KARTHIKEYAN. Black box testing technique Random testing Equivalence and partitioning testing Boundary value analysis State transition.

Boundary analyze and EP

Boundary values

Page 19: BLACK BOX TESTING K.KARTHIKEYAN. Black box testing technique Random testing Equivalence and partitioning testing Boundary value analysis State transition.

Boundary analyze and EPBoundary value analysis?- Is to use input variable value at the

minimum, just above minimum, just below minimum, normal, at the maximum, just below maximum, just above maximum

Page 20: BLACK BOX TESTING K.KARTHIKEYAN. Black box testing technique Random testing Equivalence and partitioning testing Boundary value analysis State transition.

20

Boundary analyze and EP

Example:• “ if a pupil has total score >= 75, he will pass the exam, otherwise will

fail (total score is an integer)”

Conditions Valid equivalence classes

Invalid equivalence classes

Total score 1. >=75 2. <753. Null4. String

Result of the exam

5. Pass6. Fail7. Error message

Test case:1. 1, 52. 2, 63. 3, 74. 4, 7

Data to test:1a. 75, pass1b. 76, pass 2. 74, fail 3. Null, error

message 4a. A, error message 4b. I am a tester of

EW and I love this job, error message

Page 21: BLACK BOX TESTING K.KARTHIKEYAN. Black box testing technique Random testing Equivalence and partitioning testing Boundary value analysis State transition.

21

Page 22: BLACK BOX TESTING K.KARTHIKEYAN. Black box testing technique Random testing Equivalence and partitioning testing Boundary value analysis State transition.

22

Page 23: BLACK BOX TESTING K.KARTHIKEYAN. Black box testing technique Random testing Equivalence and partitioning testing Boundary value analysis State transition.

What is State Transition Testing?

• State Transition testing, a black box testing technique, in which outputs are triggered by changes to the input conditions or changes to 'state' of the system. In other words, tests are designed to execute valid and invalid state transitions.

Advantages•Allows testers to familiarize with the software design and enables them to design tests effectively.•It also enables testers to cover the unplanned or invalid states

Page 24: BLACK BOX TESTING K.KARTHIKEYAN. Black box testing technique Random testing Equivalence and partitioning testing Boundary value analysis State transition.
Page 25: BLACK BOX TESTING K.KARTHIKEYAN. Black box testing technique Random testing Equivalence and partitioning testing Boundary value analysis State transition.

Tests Test 1 Test 2 Test 3

Start State Off On On

Input Switch ON Switch Off Switch off

Output Light ON Light Off Fault

Finish State ON OFF On

Page 26: BLACK BOX TESTING K.KARTHIKEYAN. Black box testing technique Random testing Equivalence and partitioning testing Boundary value analysis State transition.

Cause and Effect Graph Testing

Cause-Effect Graph graphically shows the connection between a given outcome and all issues that manipulate

A “Cause” stands for a separate input condition that fetches about an internal change in the system. An “Effect” represents an output condition, a system transformation or a state resulting from a combination of causes.

Page 27: BLACK BOX TESTING K.KARTHIKEYAN. Black box testing technique Random testing Equivalence and partitioning testing Boundary value analysis State transition.

The Cause-Effect Diagram can be used under these Circumstances:•To determine the current problem so that right decision can be taken very fast.•To narrate the connections of the system with the factors affecting a particular process or effect.•To recognize the probable root causes, the cause for a exact effect, problem, or outcome.

Page 28: BLACK BOX TESTING K.KARTHIKEYAN. Black box testing technique Random testing Equivalence and partitioning testing Boundary value analysis State transition.

Benefits of making cause-Effect Diagram •It finds out the areas where data is collected for additional study. •It motivates team contribution and uses the team data of the process. •Uses synchronize and easy to read format to diagram cause-and-effect relationships. •Point out probable reasons of difference in a process. It enhances facts of the procedure by helping everyone to learn more about the factors at work and how they relate. •It assists us to decide the root reasons of a problem or quality using a structured approach.

Page 29: BLACK BOX TESTING K.KARTHIKEYAN. Black box testing technique Random testing Equivalence and partitioning testing Boundary value analysis State transition.
Page 30: BLACK BOX TESTING K.KARTHIKEYAN. Black box testing technique Random testing Equivalence and partitioning testing Boundary value analysis State transition.
Page 31: BLACK BOX TESTING K.KARTHIKEYAN. Black box testing technique Random testing Equivalence and partitioning testing Boundary value analysis State transition.

ERROR GUESSING

The Error guessing is a technique where the experienced and good testers are encouraged to think of situations in which the software may not be able to cope.Error guessing is a testing technique that makes use of a tester's skill, intuition and experience in testing similar applications to identify defects that may not be easy to capture by the more formal techniques. It is usually done after more formal techniques are completed.