Software Testing Techniques, Test environment description

Software Testing Techniques

Name

Subject/Unit

Instructor’s Name

September 27, 2014

Project Number 1

Test environment description

The test environment comprises of both the hardware and the software components of the system to be used in testing the software. The test hardware requirements of the system comprises of a personal computer with the following specifications;

3.2 GHz Processor

512 MB RAM

40 GB Hard Disk and

Other essential Peripherals like; the keyboard, mouse and the display unit (monitor)

The software component of the test environment comprises of; Windows XP (32-bit) Operating System.

Black Box Test Cases

Black box testing, also sometimes referred to as behavioural testing, is a kind of software testing technique in which it is assumed that the internal design, structure and implementation is not known during the testing exercise. Although the tests are usually functional, there are no restrictions to this as it might involve both functional and non-functional testing of the software.

Test Case 1: Decision Tables

Consider a bank debiting software with the following checks:

A1: The signature matches

A2: The amount of money in the account is sufficient

A3: The given account is correct

B1: Give money

B2: Issue a statement displaying ‘Insufficient funds’

B3: Check for fraud by calling the vigilance

Test Inputs

A1: The signature matches

A2: The amount of money in the account is sufficient

A3: The given account is correct

Expected Output

B1: Give money

B2: Issue a statement displaying ‘Insufficient funds’

B3: Check for fraud by calling the vigilance

The rules for constructing the decision table are:

A1: when signature matches……..

A2: when the amount of money is sufficient………

A3: when the given account number is correct……

Below is the decision table for the above stated rules

Note: The question mark (?) denotes lack of rules denoting the occurrence of that possibility

Condition Entries Account number Money Signature Actions

1 Correct Yes Match A1

2 Correct No Match A2

3 Correct Yes Not match ?

4 Correct No Not match ?

5 Incorrect Yes Match A3

6 Incorrect No Match ?

7 Incorrect Yes Not match ?

8 Incorrect No Not match ?

Test Case 2: State Tables

Consider the star ship modelling software. It has the following drive impulse settings: neutral (n), drive (d) and reverse (r). The actual ship has three possible states: Stopped (s), moving forward (F) and moving backwards (B). The combination of the actual movement of the ship and the impulsive thrusters creates a total of nine steps as shown in the table below

.dF .nF .rF

.dS .nS .rS

.dB .nB .nS

Possible Inputs

r>r, n>n, d>d, d>n, n>d, r>n and n>rPossible Outputs

It is required that one has to go through neutral before getting to reverse or drive

Each and every thruster is turned off in neutral, translating to: d< >n< >r.

State r>rn>nd>dd>n,n>dr>nn>rr>dd>rRB RB NB RS RB NS RF RS NF NB NB DB RB NS NS DS RS NF NF DF RF DB DS NB DS DF NS DF DF NF White Box Test Cases

White testing, also known as structural testing, tests the internal function of the software as seen by the developer by focusing on the internal structure and logic of the program code. It is principally employed in detecting logical errors in software, locating random topological errors, debugging the software and discovering incorrect programming statements.

Test case 1: Statement Coverage Testing

Consider insurance premium calculation software for the drivers as shown in the flow chart below

Age<25 (Male and Married)

AC

Premium=premium+1000

true

Age<25 (Female or married)

False

Premium=premium+100

trueD

Return Premium

Age>=46 and Age<=65

Premium=premium+150

B

E

False

Ftrue

G

The requirement is; each node ought to be traversed at least once as shown in the as shown in the flow graph below

A

G

E

F

D

B

C

The table below contains the test conditions, the input and the expected output for the software.

Test Condition Input Output

1 (Age<=25) && (gender.equals(‘male’) && (!married) Age=20

Gender= ‘male’

Married=false 1300

2 Married || gendere.equal (‘female’) (age >=46 && age<=65) Age=60

Gender=’male’

Married=20 50

Test case 2: Branch Coverage Testing

The second test case uses the specifications of the first test case (insurance premium calculations software) to determine/test branch coverage. The edge traversal is carried out at least once. The outcomes are expected to be true and false. For every decision, the decision coverage determines the decision for the percentage of the sum total of the paths traversed. The test cases condition, inputs and output for the branch coverage is shown in the table below.

Test Condition Input Output

1 (Age<=25) && (gender.equals(‘male’) && (!married) Age=20

Gender= ‘male’

Married=false 1300

2 Married || gendere.equal (‘female’) (age >=46 && age<=65) Age=60

Gender=’male’

Married=20 50

3 Married || gender.equals(‘female’) Age=35

Gender=’female’

Married=false 200

4 Married || gender.equals(‘female’) Age=35

Gender=’male’

Married=false 300

Traceability Matrix

The traceability matrix is represented in the above tables