0% found this document useful (0 votes)
58 views14 pages

Test Levels Exercise 2 - 1 Match Statements With Test Levels

Uploaded by

Nikola Mirkovski
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
58 views14 pages

Test Levels Exercise 2 - 1 Match Statements With Test Levels

Uploaded by

Nikola Mirkovski
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 14

Test Levels Exercise 2_1

Match statements with test levels


In the table below, enter the numbered statements listed in the table at the
bottom of the page. We have done three to get you started.

Test Levels
Component Integration System Acceptance
Test Test Test Test

5) Find defects
in logic of the
Objective
code, detailed
of the test boundary
checking.

Who does
3) Developer
the
or Tester.
testing?

11)
Requirements,
risks, use
Test Basis cases and
functional
design
specification.

Place the rest of the following entries into the table above. You can use the
words or the numbers ( = already placed in the table).

1) Program specification, detailed design, data model


2) Developer or Buddy Developer
 3) Developer or Tester
4) Find defects in interactions between components
 5) Find defects in logic of the code, detailed boundary checking
6) Find defects in end-to-end functionality
7) Give confidence that the system is ready to deploy
8) Architectural design of how the code modules fit together
9) Independent test team (usually)
10) Requirements, risks and acceptance criteria
 11) Requirements, risks, use cases and functional design specification
12) Users, customers, stakeholders

This list is not exhaustive; it gives some examples only.

© Grove, 1998-2015
Training STF151101
content licensed to Fisnik Doko, issued on 24-05-2017, edition 2017 by Semos Education Page 1 of 2
Test Targets Exercise 2_2

Match test targets with test levels


In the table below, enter the numbered statements listed in the table at the
bottom of the page. We have done two to get you started.

Test Test Levels


Type Component Integration System Acceptance
(Target) Test Test Test Test

2) Testing of
field level input
Functional
for each unit or
program.

Non- 11) Testing


Functional that the system
(Quality is usable from
Character- a business
istics) perspective.

5) Menu option
coverage,
Structural navigation
coverage.

Place the rest of the following entries into the table above. You can use the
words or the numbers ( = already placed in the table).

1) Coverage of business rules


 2) Testing of field level input for each unit or program
3) Testing how fast information is transferred between components
4) End to end testing of the whole system
 5) Menu option coverage, navigation coverage
6) Module call coverage, interface coverage
7) Testing reliability of the new system
8) Robustness, look for memory leaks, resource issues and
maintainability
9) Statement coverage, decision outcome coverage
10) Testing to make sure the system does what it says it should do from
a business perspective
 11) Testing that the system is usable from a business perspective
12) Testing the transfer of information between modules and systems

This list is not exhaustive; it gives some examples only.

© Grove, 1998-2015 STF151101


Training content licensed to Fisnik Doko, issued on 24-05-2017, edition 2017 by Semos Education
Page 1 of 2
Reviews Exercise 3_1

Reviews Exercise
Having worked through the characteristics of each type of review (as per the
syllabus), work in groups of 2 or 3 and list the advantages of the various types
of review:
Advantages of an Informal Review

Advantages of a Walkthrough

Advantages of a Technical Review

Advantages of an Inspection

© Grove, 1998-2015 STF151101


Training content licensed to Fisnik Doko, issued Page 1 of 2
on 24-05-2017, edition 2017 by Semos Education
Black Box Exercise 4_1

Analyse the test basis


Read through the specification below and determine which parts of the specification need
further explanation and which parts are ambiguous or are un-testable.

Specification
A new hard-drive recording system is required for households with up to 6 people. Each new
household member will be set up with a unique name (4 – 8 characters), a pin number (4 digits) and
an age category is chosen from a list (0-11, 12-17, 18+).

The age category of the member restricts the viewing for that particular member. 0-11 years can only
watch “child” programmes, 12-17 years can watch “child” and “teenager” programmes only and 18+
years can watch all programmes (including “adult”). These restrictions limited to systems being used
in Europe. Upon login the member is presented with a menu screen and programmes displayed (that
relate to that member's age category) for selection.

Once a member is logged onto the system they can watch or record the allowable programme by
using the buttons on the remote. When the member selects a programme they can either play or
record by pressing the relevant button, a green or red light will display showing the status of the
programme. Pressing the “stop” button will return the member to the menu screen. The programme
can be paused (when playing or recording) by pressing the “pause” button. The relevant light will
flash indicating that the programme has been paused. To resume play or record then the “pause”
button is pressed again. When the programme is in a record/pause state it can be stopped by
pressing the “stop” button.

© Grove, 1998-2016 STF160717 Page 1 of 6

Training content licensed to Fisnik Doko, issued on 24-05-2017, edition 2017 by Semos Education
Equivalence Partitioning & Boundary Value Analysis Exercise 4_2

For each of the following examples identify the equivalence partitions and boundary
values where possible. (Use the 2-value BVA approach.) Note any questions or
assumptions you have made with each of the scenarios. The first one is completed
already as an example.

Specification Equivalence Partitions and Boundary


Values
The cardholders name on a credit Cardholder Name: number of characters
card processing payment screen
0 1 32 33
can accept up to 32 characters. It
cannot be left blank. The field can Invalid Valid Invalid
only accept the following set of
characters: A to Z inclusive, a to z Valid: A-Z a-z Invalid: any other
inclusive and space. space characters

A financial company decides to


offer their customers a credit card
based on annual salary. If the
customer earns 35,000 euros or
more, then they will be accepted
for a gold card, if they earn 60,000
euros or more then they will
receive platinum, otherwise they
will be rejected for the offer.

In order to pass an exam you need


to achieve 60% or more. However,
if you achieve 80% or more you will
be awarded a distinction.

A thermostat display shows the


temperature to the nearest degree
Celsius from -10 to 30. When the
temperature is below zero then the
message ‘Too cold’ is displayed.
When the temperature exceeds 20
degrees the message ‘Too Hot’ is
displayed.

© Grove, 1998-2016 STF160314 Page 1 of 4

Training content licensed to Fisnik Doko, issued on 24-05-2017, edition 2017 by Semos Education
Exercise 4_2 Equivalence Partitioning & Boundary Value Analysis

Specification Equivalence Partitions and Boundary


Values
Phone calls are charged according
to the time of day the call is made.
If a call is made from 08:00 then it
will be charged at 1 euro per
minute. If it is made from 13:00
calls are charged at 1.50 euro per
minute; calls from 17:00 to 22:59
inclusive are charged at 2 euro per
minute. All other times will incur no
charge.
An on-line system charges the
following shipping costs. For orders
of up to 3 books the shipping cost
is 5% of the total cost. Orders of 4
to 6 books inclusive are charged a
4% shipping cost and orders of 7
or more books are charged a 3%
shipping cost.
A barman will serve you alcohol if
you are at least 18 years of age.
Anyone under this age will be
offered a soft drink only.

The types of loyalty card available


will be determined by the points
accrued on the reward scheme. All
customers start on a blue card.
After accruing 25,000 points they
will receive a red card and after a
further 30,000 points they will be
eligible for a silver card.
An application requires a telephone
number comprising only digits to
be entered. A minimum of 6 digits
and a maximum of 18 digits are
accepted.

Page 2 of 4 STF160314 © Grove, 1998-2016

Training content licensed to Fisnik Doko, issued on 24-05-2017, edition 2017 by Semos Education
Decision Table Exercise 4_3

Scenario
A simple mobile phone will connect calls but only if the number is valid. Some of the
calls will be chargeable, whilst others will be free (e.g. emergency number). However
if the call is chargeable then a check to see if the account is in credit needs to be
done. If the account has credit and the call is chargeable then the account is debited.

Exercise
Step 1: Complete the decision table for the above scenario.

Condition

Action

Tags:

Step 2: Can the decision table be rationalised? Which columns could be removed
and why?

Step 3: From the rationalised decision table, choose your top 2 tests, create the test
cases and explain your choice.

© Grove, 1998-2015
Training STF151101
content licensed to Fisnik Doko, issued on 24-05-2017, edition 2017 by Semos Education Page 1 of 2
State Transition Exercise 4_4

The following simplified State Transition diagram shows the process for ordering a
cup of tea or coffee from a vending machine.

Write out test cases using the tags to show the events and the states you go through
(e.g. S1 – tea - S2 – sugar – S5 etc.) for the following:

a) A test case for a typical transaction.

b) A test case that will go through every state.

c) A test case that will exercise every transition.

d) Complete the following State Table and identify any invalid transitions.

tea coffee clear sugar milk vend dispensed take


drink
S1
selection
S2
extras
S3
serve
drink
S4
milk
S5
sugar

© Grove, 1998-2015
Training STF151101
content licensed to Fisnik Doko, issued on 24-05-2017, edition 2017 by Semos Education Page 1 of 2
Structural Techniques Exercise 4_5

1. For the following:


IF you buy a cheap-day return ticket THEN
catch a train after 9.30am
ELSE
catch any train
ENDIF
Buy a coffee
Read the newspaper
Enjoy the train journey

a) What is the minimum number of test cases that are


required to achieve 100% Statement Coverage?
b) What is the minimum number of test cases that are
required to achieve 100% Decision Coverage?
c) How much decision coverage have I achieved if I
buy a “cheap-day-return” ticket only?

2. For the following pseudo code:


Read A
Read B
IF B = A THEN
Print “they are the same”
ELSE
Print “they are different”
ENDIF
Print “End of processing”

Generate a minimum set of tests (values of A and B) that achieve 100%


statement and 100% decision coverage

3. For the following :


IF the vending machine is not working THEN
call repair centre to fix
ELSE
Insert money
WHILE there is not enough money
Display message “insert money”
Insert more money
ENDWHILE
Select a drink
Wait for drink to be dispensed
Enjoy the drink!
Collect any change
ENDIF

a) Calculate the minimum number of tests required


to achieve 100% statement coverage
b) Calculate the minimum number of tests required
to achieve 100% decision coverage

© Grove, 1998-2015 STF151101


Training content licensed to Fisnik Doko, issued on 24-05-2017, edition 2017 by Semos Education
Page 1 of 4
Exercise 4_5 Structural Techniques

4. Given the following pseudo code:


Read P
Read Q
IF P+Q > 100 THEN
Print "Large"
ELSE
IF P+Q > 50 THEN
Print "Medium"
ENDIF
ENDIF

a) What is the minimum number of test cases that are


required to achieve 100% Statement Coverage:
b) What is the minimum number of test cases that are
required to achieve 100% Decision Coverage
c) Provide values for P and Q that will achieve 100%
Statement Coverage

d) Will these same values achieve 100% Decision


Coverage

5. For the following pseudo code:


Read (Gross Pay)
Read (Allowances)
Taxable Pay = Gross Pay - Allowances
IF Taxable Pay > 30,000 THEN
Tax Due = Taxable Pay * 40%
ELSE
IF Taxable Pay > 15,000 THEN
Tax Due = Taxable Pay * 23%
ELSE
Tax Due = Taxable Pay * 10%
ENDIF
ENDIF

a) What is the minimum number of test cases that are


required to achieve 100% Statement Coverage:
b) What values are required for Gross Pay and Allowances to achieve 100% Decision
Coverage?

Page 2 of 4 STF151101 © Grove, 1998-2015


Training content licensed to Fisnik Doko, issued on 24-05-2017, edition 2017 by Semos Education
Incident Exercise 5_1

Electronic slider puzzle game


This application allows you to play the well known slider puzzle on your computer. After
opening the application, click on “New Game” and you will see the game start by the
numbers moving around the grid to new positions.

The object of the game is to move the numbers back to their original place in order,
starting with number 1 in the top left hand corner and the blank in the bottom right hand
corner. You can only move a number next to a blank field. To move it, click on that
number and continue until all the numbers are in their correct sequence.

Exercise
Complete the game and identify up to three incidents, using the incident forms
provided. Observe what happens when someone else is playing (i.e. testing) the game,
and make suggestions for other things to try, even if you haven’t been able to test it
directly yourself.

When filling in the form, complete what you can and decide what the severity and
priority should be, based on your own judgement.

Hint: we know of one major bug already!

© Grove, 1998-2015 STF151101 Page 1 of 5

Training content licensed to Fisnik Doko, issued on 24-05-2017, edition 2017 by Semos Education
Exercise 5_1 Incident

Incident Report
Incident ID: Test ID: Software Version:

Incident Description. Include actual and expected results: Severity:


1 = Critical or Testing
Stopped
2 = Major or Test
Impeded
3 = Minor
4 = Cosmetic / Query /
Comment

Priority:
High
Medium
Low

Attachments:
Name: Date:

Investigation results: Cause Code:

Name: Date:

Resolution: Status:
Open
In development
In testing
Closed

Name: Date:

Closed By: Date:

Page 2 of 5 STF151101 © Grove, 1998-2015

Training content licensed to Fisnik Doko, issued on 24-05-2017, edition 2017 by Semos Education
Incident Exercise 5_1

Incident Report
Incident ID: Test ID: Software Version:

Incident Description. Include actual and expected results: Severity:


1 = Critical or Testing
Stopped
2 = Major or Test
Impeded
3 = Minor
4 = Cosmetic / Query /
Comment

Priority:
High
Medium
Low

Attachments:
Name: Date:

Investigation results: Cause Code:

Name: Date:

Resolution: Status:
Open
In development
In testing
Closed

Name: Date:

Closed By: Date:

© Grove, 1998-2015 STF151101 Page 3 of 5

Training content licensed to Fisnik Doko, issued on 24-05-2017, edition 2017 by Semos Education
Exercise 5_1 Incident

Incident Report
Incident ID: Test ID: Software Version:

Incident Description. Include actual and expected results: Severity:


1 = Critical or Testing
Stopped
2 = Major or Test
Impeded
3 = Minor
4 = Cosmetic / Query /
Comment

Priority:
High
Medium
Low

Attachments:
Name: Date:

Investigation results: Cause Code:

Name: Date:

Resolution: Status:
Open
In development
In testing
Closed

Name: Date:

Closed By: Date:

Page 4 of 5 STF151101 © Grove, 1998-2015

Training content licensed to Fisnik Doko, issued on 24-05-2017, edition 2017 by Semos Education

You might also like