Sunteți pe pagina 1din 70

Tricentis

Design
Specialist 1
(Part 1)

STUDENT EXERCISE WORKBOOK


SURVEY

SURVEY
Tricentis Certified Professional
Student Exercise Workbook
Version 2016_01
Designed to be used with Tricentis Tosca Testsuite version 9.0

Student Exercise Workbook


This exercise workbook is designed to provide a collection of exercises and bonus
detail on the methods and concepts covered in the following Tricentis Certified
Professional training modules:
Project Essentials
Risk Priority Assessment
TestCase-Design
Manual Testing
Automated Testing

Legal Notice
Tricentis GmbH
Leonard-Bernstein-Straße 10
1220 Vienna
Austria

Tel.: +43 (1) 263 24 09


Fax: +43 (1) 263 24 09-15
Email: academy@tricentis.com

Information in this document is subject to change without notice. No part of this


document may be reproduced or transmitted in any form or by any means, electronic or
mechanical, for any purpose without the express written permission of Tricentis GmbH.
© 2016 by Tricentis GmbH
TABLE OF CONTENTS

TABLE OF CONTENTS

1
PREFACE

1 PREFACE
About this workbook

This workbook is specifically designed to supplement the presentation slides of each


of the following Tricentis Design Specialist 1 training modules:

Risk Priority Assessment (RPA)


Test Case Design (TCD)
The workbook is arranged in sections. Each section is named after the
corresponding training module. Each section contains a number of exercises which
give detailed instructions on how to perform it.
Tricentis recommends to complete the exercises of each chapter before continuing
with the following chapter and taking the related online exams in order to create
high impact learning.
For each exercise, Tricentis provides a video online with a sample solution.
This workbook is not aiming to be a complete manual.

What will you learn?

You will learn how to professionally set up a test project, analyze its risks, figure out
the test cases you need and finally create and execute manual and automated test
cases in Tosca Testsuite.
The workbook aims to guide you through each individual step of the workflow so
that you can maximize your efficiency when working on your test project.

Recommended learning material

In addition to this workbook it is necessary to use the following material to complete


the exercises successfully.

Sample web shop application


A sample web shop application is used for most of the exercises. Please use
the link below to start the sample web shop application:
http://demowebshop.tricentis.com/

2
PREFACE

Presentations
The presentations can be viewed from your account in our Learning
Management System. Please log in and take a look at the presentations:

Online exams
The certification exam is offered as online certification exam. Please log on to
the our Learning Management System to take the exam:

Exercise structure

Each exercise contains the following parts.


Objective
The goal that should be achieved upon completion of the exercise.

Why is this important?


The learning effect of the exercise.
Additional explanations and background information.

Instructions
Step-by-step guide which explains what needs to be done.

Hints (where applicable)


Useful recommendations from Tricentis.

Further learning material


Reference to the relevant presentation and solution video by Tricentis.

3
PREFACE

Terminology

This document uses the following conventions.

Description Example Represents


Bold Please note… Emphasized text
TestSheet Tosca Testsuite / application terms
Bold and “quoted text” “Select type of Used label for a field in the
Repository:” application
“Save” A dialog button labeled “Save”
Text with right angle File >> Save Menu and toolbar paths
bracket and italic

Important note
Some terms within the workbook seem to be misspelled, but they are not!
Please note that these terms refer directly to the actual naming convention used for
elements within and relating to Tosca Testsuite. To graphically indicate that the
element in question is a Tosca element, the element’s name will be displayed in bold
type.
Examples: Module, TestCase, ExecutionList

Please note the following naming conventions when working with Tosca Testsuite.

Menu
Menu section

Working pane tab


Column header

Navigation pane

Working pane
Window tab

Menu
This refers to the top menu which allows access to Home, View etc. The default
view is Home.

4
PREFACE

Menu section
Here you will find further information within each specific menu for example Edit,
Go to… etc. etc.

Window tab
To navigate between different sections e.g. TestCases, Modules… if you have
opened a single element using the command Open in new window, you can also
navigate to that window here.

Navigation pane
This is a tree view on the left-hand side of the screen e.g. the TestCases section.
You can drag the centre line to the right to make the navigation pane bigger.

Working pane
Shows Details view, Properties view … the content shown here is dependent on
the element selected in the navigation pane and the tab that is selected in the
Working pane.

Working pane tab


These tabs represent the details or properties of the element selected in the
navigation pane on the left. Here is also where you can see a Test configuration
parameter if one has been set.

Column header
Header of the visible columns for the elements in the Working pane. The columns
represent properties of the element selected in the navigation pane on the left-hand
side of the screen.

5
PREFACE

This page is intentionally left blank.

6
PROJECT ESSENTIALS
RISK PRIORITY ASSESSMENT

2 RISK PRIORITY ASSESSMENT


Table of Contents
Introduction ..................................................................................................................8
Prerequisite...................................................................................................................9
Exercise 1 | First steps - creating a RequirementSet ........................................... 11
Exercise 2 | First steps – creating Requirements ................................................. 13
Exercise 3 | First steps - weighting Requirements ............................................... 15
Exercise 4 | Starting a risk-based testing project ................................................ 17
Exercise 5 | Creating the Requirements structure .............................................. 19
Exercise 6 | Weighting the Requirements ............................................................. 22
Summary .................................................................................................................... 25
Notes ........................................................................................................................... 26

Introduction

The Risk Priority Assessment exercises enable you to familiarize yourself with the
Requirements section in Tosca Commander.

You will learn


How to create and weight a Requirement Structure.
How to create a Requirement Structure for the sample web shop application.
How to carry out a risk priority assessment for Requirements.
The First steps exercises give a short introduction to the most important elements
of the Requirements section. Here you will create your first simple Requirement
Structure.
The subsequent exercises build on this knowledge using the sample web shop
application as a real world example.

Please refer to the Risk Priority Assessment training module, which is available in
our Learning Management System.

Try to solve the exercises before watching the solution videos.

8
RISK PRIORITY ASSESSMENT

Prerequisite

Objective
Create a single-user Workspace, which will be used for this and for all
subsequent training modules in this course.

Why is this important?


To learn about the relationship between the different sections in Tosca
Testsuite, we will focus on testing the sample web shop application. In this
testing project you will be working on your own. A multiuser environment is
therefore not necessary.
This single-user Workspace will be used for all subsequent training module
exercises.

Instructions
1. Download the RPA_Base_Subset from the Learning Management System.
2. Start Tosca Commander.
3. Open the Create new Workspace window.
4. Create a new single-user Workspace:
Choose the Repository type “None (creates single user workspace)”
Use a unique name for the new Workspace: “TCP_Training”
Select the checkbox “Use workspace template”
Click the ellipsis (three dots) next to the edit box for the Workspace templates
path
Select the Subset you downloaded in step 1
Click on “Open”
Click the “Ok” button
Click the “Close” button in the next window

Hints
You will now see the default view of Tosca Commander which shows five (5)
open Window tabs at the bottom of Tosca Commander. You are free to
customize the view as you see fit.
Each window represents a different section within Tosca Commander. In this
training module, the focus is on the Requirements window (yellow themed
area).
The Subset RPA_Base_Subset, which has been used as template during the
creation of the Workspace, contains elements for the Modules section only.
These elements will later be used when doing the Automated Testing exercises.

9
RISK PRIORITY ASSESSMENT

Further learning material


Course section: Risk Priority Assessment
Lesson: 6 | Prerequisites
Video: Prerequisite

10
RISK PRIORITY ASSESSMENT

Exercise 1 | First steps - creating a RequirementSet

Objective
Learn to create a RequirementSet in the Requirements section.

Why is this important?


RequirementSets offer us different views on our testing project depending on
the Requirements they contain.
RequirementSets help us steering a testing project. They contain information
about TestCases, Execution state, …

Instructions

1. Navigate to the Requirements section.


Click on the Requirements Window tab
2. Create a new folder in the Requirements root folder and name it
“RPA | Exercise 1”.
Right-click the Requirements root folder in the Working pane and click on
the “Create Folder” icon in the mini toolbar
Rename the folder “RPA | Exercise 1”
3. Create a new RequirementSet in the “RPA | Exercise 1” folder and name it
“Purchasing criteria for a computer”.
Right-click the “RPA | Exercise 1” folder in the Working pane and click on the
“Create RequirementSet” icon in the mini toolbar
Rename the RequirementSet “Purchasing criteria for a computer”
4. Save your changes.
Click on the “Save” icon in the top left corner next to the Tosca icon

Hints
A RequirementSet is a structural element in the Requirements section which is
used to organize your Requirements structure
There are various methods to create elements in Tosca Testsuite. The most
common is to use shortcuts or to right-click an element and choose a Create
icon from the mini toolbar.
If there is no Create icon present in the mini toolbar, this could mean that it is
not possible to create a sub-element there.

11
RISK PRIORITY ASSESSMENT

Further learning material


Course section: Risk Priority Assessment
Lesson: 7 | Working in the Requirements section
Video: RPA Exercises 1-3

12
RISK PRIORITY ASSESSMENT

Exercise 2 | First steps – creating Requirements

Objective
Creation of a basic Requirements structure using key elements of the
Requirements section.

Why is this important?


To gain insight into creation of a Requirements structure within a
RequirementSet.

Instructions
1. Duplicate the folder “RPA | Exercise 1”.
Click on the Requirements root folder in the Navigation pane
Right-click the folder “RPA | Exercise 1” in the Working pane and click on
“Copy“
Right-click the root folder “Requirements” in the Working pane and click on
“Paste“
You now have a folder named “RPA | Exercise 2” which contains the already
existing structure
2. Focus on the RequirementSet “Purchasing criteria for a computer” in the folder
“RPA | Exercise 2”.
Expand the Requirements root folder in the Navigation pane
Click on the RequirementSet “Purchasing criteria for a computer” in the
folder “RPA | Exercise 2” in the Navigation pane
The RequirementSet “Purchasing criteria for a computer” is now the root
element in the Working pane
3. Create three (3) new Requirements beneath the RequirementSet “Purchasing
criteria for a computer” and name them “Design”, “Price” and “Technical
Details”.
Right-click on the RequirementSet and click on the “Create Requirement”
icon in the mini toolbar
Rename the new Requirement to “Design”
Right-click on the RequirementSet and click on the “Create Requirement”
icon in the mini toolbar
Rename the new Requirement “Price”
Right-click on the Requirement “Price” and click on the “Create” icon (the
ellipsis), then click on “Create Requirement (after this)” in the mini toolbar
Rename the new Requirement “Technical details”

13
RISK PRIORITY ASSESSMENT

4. Create three (3) new Requirements underneath the Requirement “Technical


details” and name them “CPU”, “RAM” and “HDD”
5. Save your changes.

Hints
While selecting the “Create Requirement” icon in the mini toolbar, please note
“Ctrl+n, Ctrl+r” listed in the brackets. This is a keyboard shortcut which, if
entered in the combination shown, will also create a Requirement, just like
selecting the option from the mini toolbar.
“Ctrl+n, Ctrl+r” is also the shortcut for creating a RequirementSet. If you enter
the shortcut within a RequirementSet, a new Requirement will be created.
Otherwise, you will create a new RequirementSet.
To create a Requirement after the Requirement you just created, use the
shortcut “Ctrl+,”. To create a new folder use “Ctrl+n, Ctrl+f”.
Shortcuts enable you to work more efficiently.
If instructed to click, double-click or right-click on Tosca elements like
Requirements folders, RequirementSets or Requirements, you should always
click on the icon of the element.

Further learning material


Course section: Risk Priority Assessment
Lesson: 7 | Working in the Requirements section
Video: RPA Exercises 1-3

14
RISK PRIORITY ASSESSMENT

Exercise 3 | First steps - weighting Requirements

Objective
Learn how to do a basic weighting of Requirements (risk priority assessment).

Why is this important?


Consider the risk/importance of single Requirements according to other
Requirements.
In our example we will be able to decide (using the “Contribution” column)
which Requirement is the most important one for buying a computer.
In testing projects, the most important Requirement is the Requirement with
the highest risk.

Instructions
1. Duplicate the folder “RPA | Exercise 2”.
Click on the Requirements root folder in the Navigation pane
Right-click on the folder “RPA | Exercise 2” in the Working pane and click on
“Copy“
Right-click on the root folder “Requirements” in the Working pane and click
on “Paste“
You now have a folder named “RPA | Exercise 3” which contains the already
existing structure
2. Focus on the RequirementSet “Purchasing criteria for a computer” in the folder
“RPA | Exercise 3”.
Expand the Requirements root folder in the Navigation pane
Click on the RequirementSet “Purchasing criteria for a computer” in the
folder “RPA | Exercise 3” in the Navigation pane
The RequirementSet “Purchasing criteria for a computer” is now the root
element in the Working pane
3. Remove all Columns besides the Column “Name”.
Click on a Column header you want to remove (e.g. “Description” or
“Execution State”), drag the Column header downwards until an “X” icon
appears, and release it
Repeat this for all Column headers besides the Column header “Name”
4. Add the columns “Contribution”, “Relative Weight” and “Weight”.
Right-click on the Column headers row and select the “Column Chooser”
from the context menu
Double-click on “Contribution”, “Relative Weight” and “Weight

15
RISK PRIORITY ASSESSMENT

5. Close the Column Chooser.


Click on the “X” in the upper right corner of the Column Chooser
6. Expand the Requirement “Technical details” in the Working pane.
7. Add the following values into the “Weight” column.
In subsequent exercises, information like this is shown in the Business
context section of the workbook

Name Weight
Design 2
Price 1
Technical details 3
CPU 1
RAM 3
HDD 2

8. Observe the changes that occur in the “Relative Weight” and the “Contribution”
columns. We will focus on these columns in subsequent exercises.

9. Save your changes.

Hints
By entering values in the Weight column, each Requirement is weighted in the
context of all other Requirements.
In this example we can see that “Technical Details”, with a Weight of 3, is 3 times
more important to us than the Requirement “Price” (weighted at 1).
The Requirement “Design” has the highest contribution followed by “RAM”. The
Requirement “Technical detail” serves as a structural Requirement and
therefore is not relevant when considering the contribution of Requirements.
The Column Chooser can be accessed by right-clicking any header on the
Column headers row.
In the Column Chooser, you can select entries by double clicking on them, or
alternatively dragging an entry towards the Column headers row and dropping
them into the position you wish to place them.

Further learning material


Course section: Risk Priority Assessment
Lesson: 7 | Working in the Requirements section
Video: RPA Exercises 1-3

16
RISK PRIORITY ASSESSMENT

Exercise 4 | Starting a risk-based testing project

Objectives
Create a suggested structure for RequirementSets and folders in the
Requirements section in a risk-based testing project.
The Tricentis sample web shop application is used for our testing project in this
training. The sample web shop application will be discussed in more details later
on in the training.
For training purposes, we are responsible for testing the release candidate
“Order process”. We will therefore create a RequirementSet that reflects the
view in the section of the application that we will be focusing on.

Why is this important?


All further exercises will use the structure created herein, and the structure will
give you an insight on how best to organize your Requirements in any testing
project.

Instructions

1. Create a new folder in the Requirements root folder and name it “RPA |
Exercise 4”.
Click on the Requirements root folder in the Navigation pane
Right-click the Requirements root folder in the Working pane and click on
the “Create Folder” icon in the mini toolbar
Rename the folder “RPA | Exercise 4”
2. Create two (2) new folders in the “RPA | Exercise 4” folder and name them
“Overall system” and “Release candidates”.
3. Create a new RequirementSet in the “Release candidates” folder and name it
“RC4 – Order process”.
Right-click the “Release candidates” folder in the Working pane and click on
the “Create RequirementSet” icon in the mini toolbar
Rename the RequirementSet “RC4 - Order process”
4. Create three (3) new RequirementSets in the “Overall system” folder and
name them “Web shop | Backend”, “Web shop | Frontend” and “Web shop |
Non-functional”.
5. Save your changes.

17
RISK PRIORITY ASSESSMENT

Hints
Having two (2) separate folders for the “Overall system” and the “Release
candidates” allows you to quickly keep track of which Requirements were
added and in which version.
It is important to consider how the entire Project should be structured.
Tricentis recommends the use of the folder structure as outlined here, for other
Projects as well.
The structure used in the Requirements section can also be used in the other
sections (TestCase-Design, TestCases etc.).

Further learning material


Course section: Risk Priority Assessment
Lesson: 8 | Starting a risk-based testing project
Video: RPA Exercises 4-5

18
RISK PRIORITY ASSESSMENT

Exercise 5 | Creating the Requirements structure

Objective
Create a Requirement Structure for the sample web shop application.

Why is this important?


To reflect the Business context and identify the most important risks of the
sample web shop application found at http://demowebshop.tricentis.com,
which is the system under test.
A fitting Requirement Structure is necessary to have an overview of a testing
project and to be able to create useful reports.

Instructions

1. Duplicate the folder “RPA | Exercise 4”.


2. Focus on the RequirementSet “Web shop | Backend” in the folder
“RPA | Exercise 5” within the folder “Overall system”.
3. Create the Requirements according the Business context for the “Backend”
functionality.
Right-click the created RequirementSet “Web shop | Backend” and click on
the “Create Requirement” icon in the mini toolbar
Rename the new Requirement “Manage promotional packages”
Right-click on the RequirementSet, and click on the “Create Requirement”
icon in the mini toolbar
Rename the new Requirement “Generate reports”
Right-click on the Requirement “Generate reports”, and click on the “Create”
icon and afterwards on “Create Requirement (after this)” in the mini toolbar
Rename the new Requirement “Administration”
4. Focus on the RequirementSet “Web shop | Frontend” in the folder
“RPA | Exercise 5” within the folder “Overall system”.
5. Create the Requirements according the Business context for the “Frontend”
functionality.
6. Focus on the RequirementSet “Web shop | Non-functional” in the folder
“RPA | Exercise 5” within the folder “Overall system”.
7. Create the Requirements according the Business context for the “Non-
functional” Requirements.
8. Focus on the RequirementSet “RC4 - Order process” in the folder
“RPA | Exercise 5/Release candidates”.

19
RISK PRIORITY ASSESSMENT

9. Create the Requirements according to the Business context for the


Requirement “Order process” (Sub-Requirement of the “Frontend”
functionality).
10. Save your changes.

Business context
This document contains an overview of the Requirements of the sample web shop
application.
This data comes from the business analysts and contains all necessary information to
create the Requirement Structure.
The description is divided into three (3) parts:
The backend functionality which is only available for administrators.
The frontend functionality which is used for customers.
The non-functional Requirements which are recognized by customers.

Backend functionality
Manage promotional packages
Generate reports
Administration

Frontend functionality
The customer can perform the following specific tasks:
Login
Register
Modify customer data
The customer is able to handle products in the web shop by:
Product configuration
Modify products view
Compare products
Search for products
During purchasing in the web shop customers use the shopping cart to:
Add products to shopping cart
Apply discounts
Use cash gift cards
Manage products in the shopping cart
The order process for products is complex and will be divided in sub-processes.
This process is also the focus for our release.
Execute checkout

20
RISK PRIORITY ASSESSMENT

Add billing and shipping address for order


Calculate shipping costs
Use different payment methods

Non-functional Requirements
The application shall support different browsers
The layout and corporate identity needs to fit
Different languages shall be supported
The application must pass performance and stress testing criteria
The usability of the application shall be intuitive

Hints
In this training we will focus on the RequirementSet “RC 4 - Order process”.
It is important to have a consistent and reasonable Requirement Structure.
Use short descriptive names for Requirements.
A non-functional Requirement is a Requirement that specifies criteria that can
be used to judge the operation of a system, rather than specific behaviors (e.g.
performance, compliance, reliability…). This should be contrasted with
functional requirements that define specific behaviors or functions.
Tricentis recommends to set up and uphold the Requirement Structure in
collaboration with the appropriate business unit, if available.
This structure can be reused in other sections of Tosca (TestCase-Design,
TestCases etc.).
Use shortcuts to create RequirementSets and Requirements.

Further learning material


Course section: Risk Priority Assessment
Lesson: 8 | Starting a risk-based testing project
Video: RPA Exercises 4-5

21
RISK PRIORITY ASSESSMENT

Exercise 6 | Weighting the Requirements

Objective
Weight the Requirements according to the business analyst’s information.

Why is this important?


To identify the risks and the Requirements that need to be tested first.
To compare Requirements in terms of their risk.

Instructions

1. Duplicate the folder “RPA | Exercise 5”.


2. Focus on the RequirementSet “Web shop | Backend” in the folder “RPA |
Exercise 6” within the folder “Overall system”.
3. Add the columns “Damage class” and “Frequency class”.
Right-click on the Column headers row and select the “Column Chooser”
from the context menu
Double-click on “Damage class” and “Frequency class”
4. Close the Column Chooser.
Click on the “X” in the upper right corner of the Column Chooser
5. Weight the Requirements according to the Business context.
Enter “1” as Damage class and “1” as Frequency class for “Manage
promotional packages”
Enter “2” as Damage class and “2” as Frequency class for “Generate reports”
Enter “4” as Damage class and “4” as Frequency class for “Administration”
6. Focus on the RequirementSet “Web shop | Frontend” in the folder “RPA |
Exercise 6” within the folder “Overall system”.
7. Weight the Requirements according to the Business context.
8. Focus on the RequirementSet “Web shop | Non-functional” in the folder “RPA
| Exercise 6” within the folder “Overall system”.
9. Weight the Requirements according to the Business context.
10. Focus on the RequirementSet “RC4 - Order process” in the folder “RPA |
Exercise 6” within the folder “Release candidates”.
11. Weight the Requirements according the Business context.
12. Observe the changes in the columns “Contribution” and “Relative Weight”.
13. Save your changes.

22
RISK PRIORITY ASSESSMENT

Business context
The business analysts have provided the following information:
Backend
Requirement Damage Frequency
Manage promotional Very low Very rarely used
packages
Generate reports Low Rarely used
Administration High Frequently used

Frontend
Requirement Damage Frequency
Customer tasks Medium Frequently used
Handle products High Frequently used
Shopping cart Very high Very frequently used
Order process Very high Very frequently used

Customer tasks
Requirement Damage Frequency
Register process High Occasionally used
Login process High Very frequently used
Modify customer data Low Occasionally used

Handle products
Requirement Damage Frequency
Product configuration Very high Occasionally used
Modify products view Low Frequently used
Compare products Very low Very rarely used
Search for products Low Frequently used

Shopping cart
Requirement Damage Frequency
Add products Very high Occasionally used
Discounts High Occasionally used
Gift cards High Occasionally used
Manage shopping cart High Occasionally used

Order process
Requirement Damage Frequency
Execute checkout Very high Occasionally used
Billing and shipping
Very high Rarely used
address
Calculate shipping costs Very high Very frequently used
Payment methods Very high Very frequently used

Non-functional
Requirement Damage Frequency
Support different
Low Frequently used
browsers

23
RISK PRIORITY ASSESSMENT

Layout and corporate


Low Very frequently used
identity
Different languages Medium Rarely used
Performance and stress
High Occasionally used
testing
Usability Very high Very frequently used

Hints
The weighting for the order process has to be done two (2) times. Within the
RequirementSet “Web shop | Frontend” as part of the overall system and
within the RequirementSet “RC4 - Order process” as part of our release
candidate.
Enter positive whole numbers, between zero (0) and ten (10) as values in the
Damage Class and Frequency Class columns. Tricentis recommends to use one
(1) being the lowest and five (5) being the highest number.
Weighting is usually done top down. Begin comparing Requirements at the top
level. Then assign weights on the lower levels.
The Relative Weight is the weight of one Requirement when compared to
another Requirement on the same hierarchical level.
The Contribution is the weight of one Requirement in the context of the entire
RequirementSet.

Further learning material


Course section: Risk Priority Assessment
Lesson: 9 | Weighting the Requirements
Video: RPA Exercises 6

24
RISK PRIORITY ASSESSMENT

Summary

What have you learned?


How to assess risk priority and risk coverage optimization of the functional areas
of the sample web shop application.

Objectives achieved
Structuring of elements in the Requirements section using folders and
RequirementSets.

Weighting of Requirements in terms of risk priority using the columns


“Weight”, “Damage class” and “Frequency class”.

Understanding the relevance of risk priority assessment in the context of the


testing project.

Understanding the usage of RequirementSets.

What’s next?
1. Test your knowledge by taking the Risk Priority Assessment online assessment.
2. Continue the training with the online presentation and exercises for TestCase-
Design.

25
RISK PRIORITY ASSESSMENT

Notes

26
RISK PRIORITY ASSESSMENT

TESTCASE-DESIGN

27
INTRO TO TESTCASE-DESIGN

3 INTRO TO TESTCASE-DESIGN
Table of Contents
Introduction ............................................................................................................... 28
Prerequisite................................................................................................................ 30
Exercise 1 | First steps – creating a TestSheet ..................................................... 32
Exercise 2 | First steps – creating Attributes ........................................................ 34
Exercise 3 | First steps – creating Instances ......................................................... 36
Exercise 4 | Purchasing in the sample web shop application ............................ 39
Exercise 5 | Structure from base elements .......................................................... 41
Exercise 6 | Preconditions ....................................................................................... 43
Exercise 7 | Basic Workflow structure – Attributes ............................................. 45
Exercise 8 | Basic Workflow structure – Instances .............................................. 47
Exercise 9 | Combine first logical Attribute level ................................................. 50
Exercise 10 | Combine second logical Attribute level ......................................... 53
Exercise 11 | Combinatorial generation on TestSheet level .............................. 55
Exercise 12 | TestCase specification ...................................................................... 56
Exercise 13 | Add the Verifications ........................................................................ 59
Exercise 14 | Integration of new Attributes .......................................................... 61
Exercise 15 | TestCase Substitute Links ................................................................ 64
Summary .................................................................................................................... 66
Notes ........................................................................................................................... 67

Introduction

The TestCase-Design exercises will guide you through the process of creating a test
case design for the sample web shop application.

You will learn


How to create and maintain a TestCase-Design structure
How to use and understand different combinatorial methods
How to utilize TestCase-Design to create an optimized framework for the test
cases you will need in your test project

28
INTRO TO TESTCASE-DESIGN

The “First steps” exercises give a short introduction to the most important elements
in the TestCase-Design section. Here you will create your first simple TestCase-
Design structure.
The following exercises will build on this knowledge using a real world example.

29
INTRO TO TESTCASE-DESIGN

Prerequisite

Objective
Registration of a working personalized user in the sample web shop application.

Why is this important?


As mentioned in the Risk Priority Assessment we will test the order process in
the sample web shop application. Because “Calculate shipping costs” and
“Payment methods” have the highest Contribution, we are going to test those
Requirements first. To test those functionalities we need an existing customer
with an existing address.
This user should help you to become familiar with the sample web shop
application to have a better understanding of the Attributes and Instances that
are being created during this training module.

Instructions
1. Start the sample web shop application in Internet Explorer.
http://demowebshop.tricentis.com
2. Register a new account.
Click on “Register” (red link, upper right)
Fill in the fields with the data provided below in the Business context
Click on “Register”
3. Add a new address for your newly created account.
Navigate to your account by clicking on the Email you just provided (red link,
upper right)
Click on Addresses (in the My Account menu on the left hand side)
Click on “Add new”
Fill in the fields with the data provided below in the Business context
Click on “Save”
4. Log out of the sample web shop application
Click on “Logout” (red link, upper right).

Business context (mandatory for automated test execution)


We will need a new user with one (1) billing and shipping address to enable us to run all the
TestCases we are building during the upcoming training modules.

User data:
Gender: ................. < your gender >
First name: ........... < your first name >

30
INTRO TO TESTCASE-DESIGN

Last name: ............ < your last name >


E-mail address: ..... Test-FirstName.LastName@training.com
(i.e. if your name is Paul Schmidt you will enter: Test-Paul.Schmidt@training.com)
Password: ............. Tosca1234!
Confirm password: Tosca1234!

User address:
First name: ............ < your first name >
Last name: ............ < your last name >
E-mail address: ..... Test-FirstName.LastName@training.com
Country: ................ Austria
City: ........................ Vienna
Address 1: ............. Viennastreet
Zip: ......................... 1234
Phone: ................... 00 11 22 33 44 55

Hints
This user is not mandatory for defining TestCases within the TestCase-Design
section, but is necessary when running TestCases later on. For defining the
TestCases within TestCase-Design it would be sufficient to receive a detailed
Business context containing the information which data variants can be entered
into the application.
Tricentis recommends to use Internet Explorer. During this training, Subsets
and explanations will focus on this browser.
Tricentis recommends to use the naming convention and password provided in
the Business context.

Further learning material


Course section: TestCase-Design
Lesson: 10 | Prerequisites
Video: TCD Prerequisites

31
INTRO TO TESTCASE-DESIGN

Exercise 1 | First steps – creating a TestSheet

Objective
Learn to create a TestSheet in the TestCase-Design section.

Why is this important?


A TestSheet is the core element to organize all of your test data and will be used
to create links to other sections.
To learn how to create and structure elements in the TestCase-Design section,
using the example of assembling a computer.

Instructions
1. Open the Workspace “TCP_Training” created in the Risk Priority Assessment
training module exercises.
This is only necessary if you closed the Workspace after the last exercise in
the Risk Priority Assessment training module
2. Ensure that the “Default” perspective is active.
Click on the “Select” icon within the Menu section “Perspectives” in the
“VIEW” Menu
Click on “Default”
3. Navigate to the TestCase-Design section.
Click on the TestCaseDesign Window tab
4. Make the “HOME” Menu active
Click on the “HOME” Menu
5. Create a new folder in the TestCase-Design root folder and name it “TCD |
Exercise 1”.
6. Create a new TestSheet in the “TCD | Exercise 1” folder and name it
“Assembling a computer”.
Right-click the “TCD | Exercise 1” folder in the Working pane and click on the
“Create TestSheet” icon in the mini toolbar
Rename the TestSheet to “Assembling a computer”
5. Save your changes.

Hints
The “Default” perspective is useful if you closed different windows or opened
too many windows. You are also able to define your own perspectives.
The “Default” perspective is the five (5) open tabs that you initially see when
creating a Project.

32
INTRO TO TESTCASE-DESIGN

A TestSheet is a fundamental element of the TestCase-Design section.


Tricentis recommends that one TestSheet covers one Requirement.
When we advise to click, double-click or right-click on Tosca elements like
TestCase-Design folder, TestSheets, Attributes or Instances you should always
click on the icons next to the label.

Further learning material


Course section: TestCase-Design
Lesson: 11 | Working in the TestCase-Design section
Video: TCD Exercises 1-3

33
INTRO TO TESTCASE-DESIGN

Exercise 2 | First steps – creating Attributes

Objectives
Learn how to create Attributes in a TestSheet.
Have a basic idea what Attributes can be used for.

Why is this important?


Attributes are used to structure the input possibilities from your SUT (software
under test).
A clear Attributes structure is necessary to maximize the benefits of doing test
case design.

Instructions
1. Duplicate the folder “TCD | Exercise 1”.
2. Focus on the TestSheet “Assembling a computer” in the folder
“TCD | Exercise 2”.
3. Create three (3) new Attributes beneath the TestSheet “Assembling a
computer” and name them “Processor”, “RAM” and “HDD” as described in the
Business context.
Right-click on the TestSheet in the Working pane and click on the “Create
Attribute” icon in the mini toolbar
Rename the new Attribute to “Processor”
Right-click on the TestSheet in the Working pane and click on the “Create
Attribute” icon in the mini toolbar
Rename the new Attribute to “RAM”
Right-click on the Attribute “RAM” in the Working pane and click on the
“Create” icon and afterwards on “Create Attribute (after this)” in the mini
toolbar
Rename the new Attribute to “HDD”
4. Save your changes.

Business context
In order to assemble a computer, several computer parts are available with different
characteristics to offer a large number of configurations.
The three (3) parts that we are able to select in our case are:
Processor
RAM
HDD

34
INTRO TO TESTCASE-DESIGN

For more details please visit: http://demowebshop.tricentis.com/


Navigate to COMPUTERS >> Desktops >> Build your cheap own computer

Hints
An Attribute is a structural element which represents different characteristics of
a specific object.
Hair color is an example of such an element for a person (see TestCase-
Design presentation).
The identification of Attributes (structural elements) within your system under
test, and the representation of them in Tosca, is the first task when constructing
a test case design.
Shortcuts enable you to work more efficiently.

Further learning material


Course section: TestCase-Design
Lesson: 11 | Working in the TestCase-Design section
Video: TCD Exercises 1-3

35
INTRO TO TESTCASE-DESIGN

Exercise 3 | First steps – creating Instances

Objectives
Learn how to create Instances for the Attributes you just created.
Have a basic idea what Instances can be used for.

Why is this important?


Instances represent the possible data variants of the Attributes in our system.

Instructions
1. Duplicate the folder “TCD | Exercise 2”.
2. Focus on the TestSheet “Assembling a computer” in the folder “TCD | Exercise
3”.
3. Create Instances for the Attribute “Processor” and name them according to the
Business context.
Right-click on the Attribute “Processor” in the Working pane and click on the
“Create Instance” icon in the mini toolbar
Rename the new Instance to “2.2 GHz”
Right-click on the Attribute “Processor” in the Working pane and click on the
“Create Instance” icon in the mini toolbar
Rename the new Instance to “2.5 GHz”
Right-click on the Instance “2.5 GHz” in the Working pane, click on the
“Create” icon, then click on “Create Instance (after this)” in the mini toolbar
Rename the new Instance to “3.0 GHz”
4. Create Instances for the Attributes “RAM” and “HDD” according to the Business
context.
5. Create an Instance for the TestSheet “Assembling a computer” and name it “My
first assembled computer”.
6. Remove all Columns besides the Column “Name” and the Instance created in
step 5.
Click on a Column header of a Column you want to remove (e.g.
“Description” or “Instance Usage”), drag the Column header downwards
until an “X” icon appears and release it
7. Collapse all three (3) Attributes.
Right-click on the Attribute “Processor” in the Working pane and click on the
“Collapse all” icon in the mini toolbar
Repeat this procedure for Attributes “RAM” and “HDD”

36
INTRO TO TESTCASE-DESIGN

8. Assemble your first computer by selecting Instances for the Attributes


“Processor”, “RAM” and “HDD”. Select the values “2.5 GHz”, “8 GB” and “320 GB”.
Click in the Working pane into the cell from the row “Processor” and column
“My first assembled computer”
Click on the downward arrow and select “2.5 GHz ” from the drop down menu
Repeat this procedure for the rows “RAM” and “HDD” and the values “8 GB”
and “320 GB”
9. Save your changes.

Business context
In order to assemble a computer, several computer parts are available with different
characteristics to offer a large number of configurations.
To identify the Instances please visit http://demowebshop.tricentis.com/ and navigate to
COMPUTERS >> Desktops >> Build your cheap own computer
The Instances found in the sample web shop application are:
Processor
2.2 GHz
2.5 GHz
3.0 GHz
RAM
2 GB
4 GB
8 GB
HDD
320 GB
400 GB

Hints
Instances are elements which represent data variants for a specific object.
Brown, blonde and red are possible data variants for hair color (see TestCase-
Design presentation).
The identification of possible Instances (data variants) within your system under
test, and the representation of them in Tosca, is a very important task when
constructing a test case design.
Instances cannot be broken down into smaller elements (it is not possible to
have a sub-instance).
Shortcuts enable you to work more efficiently.

37
INTRO TO TESTCASE-DESIGN

Further learning material


Course section: TestCase-Design
Lesson: 11 | Working in the TestCase-Design section
Video: TCD Exercises 1-3

38
INTRO TO TESTCASE-DESIGN

Exercise 4 | Purchasing in the sample web shop application

Objective
As explained in previous exercises we are responsible for testing the release
candidate “Order process” during this training. Therefore we need to familiarize
with the process of ordering in the sample web shop application.

Why is this important?


Get to know the functional areas of the application which will be used as the
system under test for this training.
Being able to identify Attributes and their Instances in the sample web shop
application.

Instructions
1. Open the sample web shop application using the Internet Explorer.
Navigate to http://demowebshop.tricentis.com/
2. Log in into the sample web shop application.
Click on the “Log in” link in the upper right corner
Enter your credentials from the account you created during the Prerequisite
Click on “Log in”
3. Add a “Polk Dot” to the shopping cart and navigate to the shopping cart.
Navigate to APPAREL & SHOES >> 50's Rockabilly Polka Dot Top JR Plus Size
Click on “Add to cart”
Click on the “Shopping cart(1)” link on the upper right corner
4. Buy the “Polka Dot”.
Check the “terms of service” checkbox and click on “Checkout”
Click on “Continue” five (5) times
Click on “Confirm”
Click on “Continue”
5. Log out of the sample web shop application.
Click on “Log out”

Hints
At a later stage, you will define data variations necessary to test the
Requirement “Calculate shipping costs” and what should be verified with these
data variations. Some of the questions that need to be answered include:
What steps need to be taken in order purchase an item?
Is there anything you need before you can order?

39
INTRO TO TESTCASE-DESIGN

Further learning material


Course section: TestCase-Design
Lesson: 12 | Purchasing in the web shop
Video: TCD Exercise 4

40
INTRO TO TESTCASE-DESIGN

Exercise 5 | Structure from base elements

Objective
Knowledge of the basic Tosca elements.

Why is this important?


To become familiar with the Tosca TestCase-Design section.

Instructions
1. Create a new folder in the TestCase-Design root folder and name it “TCD |
Exercise 5” and focus on this folder.
2. Create a new TestSheet in the “TCD | Exercise 5” folder and name it “Calculate
shipping costs”.
Right-click the “TCD | Exercise 5” folder in the Working pane and click on
the “Create TestSheet” icon in the mini toolbar
Rename the TestSheet to “Calculate shipping costs”
3. Create the required Attributes in the TestSheet “Calculate shipping costs” as
described in the Business context.
4. Change the value of the Property BusinessRelevant from the Attribute
“Verifications” to “Result”.
Focus on the Attribute “Verifications” you just created
Click on the Working pane tab “Properties”
Change the value in the column Value from the Property
“BusinessRelevant” from “Yes” to “Result” by selecting “Result” from the
drop down menu
Click on the Working pane tab “Details”
5. Save your changes.

Business context
Our base structure will contain the following Attributes:
Precondition
Workflow
Verifications

Hints
The structure created in this exercise is a base structure that can be used in
nearly every TestSheet that you will ever going to create. It can be extended by

41
INTRO TO TESTCASE-DESIGN

an Attribute “Administration” with the Property “BusinessRelevant” “No” that


contains information like creator, date of creation, Template to use, …
Tricentis recommends creating elements using the available keyboard
shortcuts.

Further learning material


Course section: TestCase-Design
Lesson: 13 | Structure from base elements
Video: TCD Exercise 5

42
INTRO TO TESTCASE-DESIGN

Exercise 6 | Preconditions

Objective
Creation of a basic Attribute structure containing an Instance.

Why is this important?


Enhance your skills of creating structures which will later be used in test data
combinations.

Instructions
1. Duplicate the folder “TCD | Exercise 5”.
2. Focus on the Attribute “Precondition” in the TestSheet “Calculate shipping
costs” in the folder “TCD | Exercise 6”.
3. Create the required three (3) Attributes as described in the Business context.
4. Create an Instance beneath the Attributes “Customer” and “Address” as
described in the Business context.
5. Mark both Instances as a StraightThrough
Click on the Instance “Existing customer”
Press the [F7] button two times
Click on the Instance “Existing address”
Press the [F7] button two times
6. Save your changes.

Business context
As seen in Exercise 4 an existing customer with an existing address is necessary to test the
order process. The focus in this TestCase-Design is not to test the creation of a user.
Thus, the Attribute “Precondition” presents the following Attributes structure:
“Precondition”
“User”
“Customer”
“Address”
The Attribute “Customer” has the Instance (data variant):
“Existing customer”
The Attribute “Address” has the Instance (data variant):
“Existing address”

Hints

43
INTRO TO TESTCASE-DESIGN

If something is specified as a Precondition, this means that the whole process


of this specific item will not be tested. We only specify which exact characteristic
of the item is needed for later use in tests.
The items in the Precondition are not part of the test focus.
A StraightThrough Instance must be a valid Instance and is usually associated
with the highest risk (in case of failure) and minimal functionality.
StraightThrough is a value for the property Character of an Instance.
Other values are Valid (default) and Invalid. The Character can be set using the
[F7] button.
More information on Instance Properties can be found in the TestCase-Design
presentation.

Further learning material


Course section: TestCase-Design
Lesson: 14 | Preconditions
Video: TCD Exercise 6

44
INTRO TO TESTCASE-DESIGN

Exercise 7 | Basic Workflow structure – Attributes

Objective
Construction of an extended Attribute structure for the order process in the
sample web shop application.

Why is this important?


Equivalence partitioning is a software testing technique that divides the numeric
input data of a software unit into partitions of equivalent data from which test
cases can be derived.
In principle, test cases are designed to cover each partition at least once.
An advantage of this approach is reduction in the time required for testing a
software due to lesser number of test cases as well as a specific test focus for
each test case.

Instructions
1. Duplicate the folder “TCD | Exercise 6”.
2. Focus on the Attribute “Workflow” in the TestSheet “Calculate shipping costs”
in the folder “TCD | Exercise 7”.
3. Create the required six (6) Attributes as described in the Business context.
4. Save your changes.

Business context
When purchasing products in the web shop we realize that shipping costs depend on the
ordered product (e.g. for digital downloads no shipping costs apply) and the value of the
orders sub-total (with an order sub-total of more than $50 no shipping costs apply).
To reflect this behavior the Attribute “Workflow” should be structured as followed:
“Order details”
“Ordered digital download (price)”
“Ordered physical product (price)”
“Ordered physical product and digital download (price)”
“Addresses”
“Shipping address”

45
INTRO TO TESTCASE-DESIGN

Hints
Depending on the ordered product, a shipping address has to be selected or
not. Therefore this addresses has to be added to the Attribute structure as well
as the ordered product.
The selection of the shipping method changes the shipping costs as well. Due to
trainings purpose we are going to add this later on to show how to integrate an
Attribute into an existing TestSheet after all TestCases have been defined.
The Instances of these Attributes will be added in the next exercise.

Further learning material


Course section: TestCase-Design
Lesson: 15 | Basic Workflow structure
Video: TCD Exercises 7-8

46
INTRO TO TESTCASE-DESIGN

Exercise 8 | Basic Workflow structure – Instances

Objective
Adding the necessary Instances to the Attributes created in Exercise 7.

Why is this important?


Equivalence partitioning is a software testing technique that divides the numeric
input data of a software unit into partitions of equivalent data from which test
cases can be derived.
In principle, test cases are designed to cover each partition at least once.
An advantage of this approach is reduction in the time required for testing a
software due to lesser number of test cases as well as a specific test focus for
each test case.

Instructions
1. Duplicate the folder “TCD | Exercise 7”.
2. Focus on the Attribute “Order details” within the Attribute “Workflow” in the
TestSheet “Calculate shipping costs” in the folder “TCD | Exercise 8”.
3. Create the required Instances for the Attribute “Ordered digital download
(price)” as described in the Business context.
Click on the Instance “N/A” and press the [F7] button two times to mark it as
StraightThrough
Click on the Instance “DD = $1” and press the [F8] button once to mark it as
Boundary
4. Create the required Instances for the other two (2) physical Attributes within
the Attribute “Order details” as described in the Business context.
5. Focus on the Attribute “Addresses” within the Attribute “Workflow” in the
TestSheet “Calculate shipping costs” in the folder “TCD | Exercise 8”.
6. Create the required Instances for the Attribute “Shipping address” as described
in the Business context.
7. Save your changes.

Business context
When testing the order process we have to consider that ordering a digital download is
possible, but not necessary for all TestCases we will create. In fact, in most of our TestCases
no digital download will be ordered.
Due to the fact that no shipping costs apply for digital downloads we have to create two (2)
Instances for the prices and one (1) Instance if no digital download has been ordered.
The Attribute “Ordered digital download (price)” contains the following Instances:

47
INTRO TO TESTCASE-DESIGN

Attribute “Ordered digital download (price)”


“N/A” (StraightThrough)
“DD > $1”
“DD = $1” (Boundary)
If a physical product is ordered (what happens most of the time but not always) shipping
costs apply if a product costs up to $50 (what actually happens most of the time).
For more expensive products the shipping costs are $00.00. Finally it is also possible to
order both product types and depending on the order sub-total and price of the physical
products shipping costs may apply.
The Attributes ” Ordered physical product (price)” and ” Ordered physical product and
digital download (price)” contain the following Instances:
Attribute “Ordered physical product (price)”
“PP = $2-$49” (StraightThrough)
“PP > $51”
“N/A”
“PP = $1” (Boundary)
“PP = $50” (Boundary)
“PP = $51” (Boundary)
Attribute “Ordered physical product and digital download (price)”
“N/A” (StraightThrough)
“PP+DD <= $50”
“PP+DD >$50 and PP < $50”
As already mentioned, the Attribute “Shipping address” depends on the ordered products.
Because the addresses are tested in a different Requirement we only have two (2)
Instances when testing the Requirement “Calculate shipping costs”. As the
StraightThrough we select the address we created during the registration for the sample
web shop application:
Attribute “Shipping address”
“Existing shipping address” (StraightThrough)
“No shipping address”

Hints
When defining the Instances you have to think about what kind of Attribute
(floating or non-floating) they belong to. Afterwards equivalence classes have to
be defined as explained in the presentation.
To simplify testing the order process, we only take whole numbers for the
Instances. A more accurate testing (e.g. taking $50.00 and $50.01 as boundaries)
should be done in a real-world example, but is not necessary for this training.

48
INTRO TO TESTCASE-DESIGN

There can only be one StraightThrough Instance per Attribute.


Arrange the Instances logically – i.e. an order that is easy for you to understand.
Empty, invalid and boundary values must be taken into account when creating
Instances.
When testing the Requirement “Calculate shipping costs” we realize that no Attribute
contains an invalid Instance which means we will not have any TestCases that lead to
an error. Missing negative tests for Requirements are not common, but possible.

Further learning material


Course section: TestCase-Design
Lesson: 15 | Basic Workflow structure
Video: TCD Exercises 7-8

49
INTRO TO TESTCASE-DESIGN

Exercise 9 | Combine first logical Attribute level

Objective
Learn how to create data combinations to specify the Instances for logical
Attributes by using the Linear Expansion method.

Why is this important?


Combining data on the level of logical Attributes is useful to identify the data
combinations that need to be tested step by step.
Learn how Linear Expansion method creates Instances.

Instructions
1. Duplicate the folder “TCD | Exercise 8”.
2. Focus on the Attribute “User” within the Attribute “Precondition” in the
TestSheet “Calculate shipping costs” in the folder “TCD | Exercise 9”.
3. Create an empty Instance folder beneath the Attribute “User”.
Right-click on the Attribute “User” in the Working pane and click on the
“Create Instance” icon in the mini toolbar
Click on the just created Instance “User” in the Column header row
Press the [DEL] button which leaves the Instance folder beneath the
Attribute “User”, but deletes the newly created Instance
4. Combine the Attributes “Customer” and “Address” to the next level.
Click on the Attribute “Customer”, push and hold the [Ctrl] button and click
on the Attribute “Address”
Right-click on any of the selected Attributes (e.g. “Customer”)
In the context menu click on Generate Instances >> Linear expansion
5. Rename the newly created Instance “StraightThrough” to “Existing customer
with address”.
Click in the Working pane in the first cell below the Column header row and
column “StraightThrough”
Delete the text and enter “Existing customer with address”
Press the [Enter] button
6. Focus on the Attribute “Addresses” within the Attribute “Workflow” in the
TestSheet “Calculate shipping costs” in the folder “TCD | Exercise 9”.
7. Create an empty Instance folder beneath the Attribute “Addresses”.
Right-click on the Attribute “Addresses” in the Working pane and click on the
“Create Instance” icon in the mini toolbar

50
INTRO TO TESTCASE-DESIGN

Click on the just created Instance “Addresses” in the Column header row
Press the [DEL] button which leaves the Instance folder beneath the
Attribute “Addresses”, but deletes the newly created Instance
8. Combine the Attribute “Shipping address” to the next level.
Click on the Attribute “Shipping address”
Right-click on the selected Attribute
In the context menu click on Generate Instances >> Linear expansion
9. Rename the newly created Instance “StraightThrough” to “Existing shipping
address”.
In the column StraightThrough mark the Instance name in the first cell below
the Column header row
Delete the text and enter “Existing shipping address”
Press the [Enter] button
10. Focus on the Attribute “Order details” within the Attribute “Workflow” in the
TestSheet “Calculate shipping costs” in the folder “TCD | Exercise 9”.
11. Create an empty Instance folder beneath the Attribute “Order details”.
12. Combine the Attributes “Ordered digital download (price)”, “Ordered
physical product (price)” and “Ordered physical product and digital
download (price)” to the next level.
13. Rename the newly created Instance “StraightThrough” to “PP = $2-$49”.
14. Correct the data combinations you created for the Attribute “Order details”
and merge the Instance duplicates.
Focus on the Attribute “Order details”
In the column “DD > $1” change the Instance used for “Ordered physical
product (price)” from “PP = $2-$49” to “N/A”
In the column “DD = $1” change the Instance used for “Ordered physical
product (price)” from “PP = $2-$49” to “N/A”
In the column “N/A” change the Instance used for “Ordered digital
download (price)” from “N/A” to “DD > $1”
In the column “PP+DD <= $50” change the Instance used for “Ordered
digital download (price)” from “N/A” to “DD > $1”
In the column “PP+DD > $50 and PP < $50” change the Instance used for
“Ordered digital download (price)” from “N/A” to “DD > $1”
Right-click on the Attribute “Order details” and click on Merge Instance
Duplicates in the context menu
15. Save your changes.

51
INTRO TO TESTCASE-DESIGN

Hints
Empty Instance folders are necessary to create data combinations.
After generating the Linear expansion, all automatically generated Instances
are displayed in columns. Within the Columns header row you find the name of
the Instances.
After using the Linear expansion every data combination has a single test focus.
Due to dependencies between Attributes it is sometimes necessary to change
StraightThroughs to receive a valid test case (e.g. the data combination “DD >
$1”).
In order to generate Instances automatically with Tosca, you first need to specify
where you want to create Instances (by creating an Instance folder) and then
selecting the Attributes you want to combine.
All Instances must be marked (StraightThrough, boundary, invalid, valid)
properly before generating Instances automatically.

Further learning material


Course section: TestCase-Design
Lesson: 16 | Combining Attributes
Video: TCD Exercise 9

52
INTRO TO TESTCASE-DESIGN

Exercise 10 | Combine second logical Attribute level

Objective
Prepare the TestSheet for combining on the highest level.

Why is this important?


Combining data on the level of logical Attributes is useful to identify the data
combinations that need to be tested step by step.

Instructions
1. Duplicate the folder “TCD | Exercise 9”.
2. Focus on the Attribute “Precondition” in the TestSheet “Calculate shipping
costs” in the folder “TCD | Exercise 10”.
3. Create an empty Instance folder beneath the Attribute “Precondition”.
4. Combine the Attribute “User” to the next level.
5. Rename the newly created Instance “StraightThrough” to “Existing customer
with address”
6. Focus on the Attribute “Workflow” in the TestSheet “Calculate shipping costs”
in the folder “TCD | Exercise 10”.
7. Create an empty Instance folder beneath the Attribute “Workflow”.
8. Combine the Attributes “Order details” and “Addresses” to the next level.
9. Rename the newly created Instance “StraightThrough” to “PP = $2-$49 with
existing shipping address”.
10. Correct the data combinations you created for the Attribute “Workflow” and
merge the Instance duplicates.
Focus on the Attribute “Workflow”
In the column “DD > $1” change the Instance used for “Addresses” from
“Existing shipping address” to “No shipping address”
In the column “DD = $1” change the Instance used for “Addresses” from
“Existing shipping address” to “No shipping address”
In the column “No shipping address” change the Instance used for “Order
details” from “PP = $2-$49” to “DD > $1”
Right-click on the Attribute “Workflow” and click on Merge Instance
Duplicates in the context menu
11. Save your changes.

53
INTRO TO TESTCASE-DESIGN

Further learning material


Course section: TestCase-Design
Lesson: 17 | Combining at TestSheet level
Video: TCD Exercises 10-11

54
INTRO TO TESTCASE-DESIGN

Exercise 11 | Combinatorial generation on TestSheet level

Objective
Creating data combinations (Instances) at the level of the TestSheet. Those data
combinations are also called logical TestCases.

Why is this important?


To define the test cases that have to be built in the TestCases section.
An advantage of this approach is reduction in the time required for testing a
software due to lesser number of test cases as well as a specific test focus for
each test case.

Instructions
1. Duplicate the folder “TCD | Exercise 10”.
2. Focus on the TestSheet “Calculate shipping costs” in the folder
“TCD | Exercise 11”.
3. Combine the Attributes “Precondition” and “Workflow” to the final level.
4. Save your changes.

Hints
No empty Instance folder is necessary when combining on TestSheet level.

Further learning material


Course section: TestCase-Design
Lesson: 17 | Combining at TestSheet level
Video: TCD Exercises 10-11

55
INTRO TO TESTCASE-DESIGN

Exercise 12 | TestCase specification

Objective
Learn how to provide data for test cases in a TestSheet.

Why is this important?


To specify physical values (values we enter into the sample web shop
application) for the Instances that have been created.
This is the foundation for using TestSheets as data sources for automated
testing with Tosca.

Instructions
1. Duplicate the folder “TCD | Exercise 11”.
2. Focus on the “Attribute “User” within the Attribute “Precondition” in the
TestSheet “Calculate shipping costs” in the folder “TCD | Exercise 12”.
3. Add the values (Username and Password) required for the Instance “Existing
customer with address “of the Attribute “User” to your TestSheet.
Right-click on the Attribute “User” in the Working pane and click on the
“Create Attribute” icon in the mini toolbar
Rename the new Attribute to “Value | Username”
Click in the Working pane into the cell from the row “Value | Username” and
column “Existing customer with address”
Enter the e-mail you registered in the Prerequisite (e.g. “Test-
FirstName.LastName@training.com”) into the cell

Right-click on the Attribute “User” in the Working pane and click on the
“Create Attribute” icon in the mini toolbar
Rename the new Attribute to “Value | Password”
Click in the Working pane into the cell from the row “Value | Password” and
column “Existing customer with address”
Enter the password you registered in the Prerequisite (e.g. “Tosca1234!”) into
the cell
4. Focus on the “Attribute “Order details” within the Attribute “Workflow” in the
TestSheet “Calculate shipping costs” in the folder “TCD | Exercise 12”.
5. Add the Attributes for the values (SKU DD, Quantity DD, SKU PP and Quantity
PP) required for the Instances of the Attribute “Order details” to your TestSheet
as mentioned in the Business context.
Right-click on the Attribute “Order details” in the Working pane and click on
the “Create Attribute” icon in the mini toolbar

56
INTRO TO TESTCASE-DESIGN

Rename the new Attribute to “Value | SKU DD”


Repeat these steps for the other three (3) Attributes
6. Add the Filter to the TestSheet.
Right-click on the Column headers row and select the “Column Chooser”
from the context menu
Double-click on “Filter”
7. Add the values for the Attributes you just created (“Value | SKU DD”, “Value |
Quantity DD”, “Value | SKU PP” and “Value | Quantity PP”) as mentioned in the
Business context.
Click in the Working pane into the cell from the row “Ordered digital
download (price)” and column “Filter”, uncheck “All”, check “DD > $1” and
“DD = $1” and then click in the Working pane
Right-click on the Attribute “Value | SKU DD” and click on Fill empty Values >>
Specific in the context menu
Enter “3rdAlbum” in the pop-up and click on “OK”
Fill in the values for the Attribute “Value | Quantity DD” manually according
to the Business context
”DD > $1”: 12; ”DD = $1”: 1; ”PP+DD <= $50”: 12; ” PP+DD > $50 and PP <
$50”: 34
Right-click on the Attribute “Order details” and click on Reset Instance Filter in
the context menu
Continue entering the values by using the Filter function and the information
provided in the Business context
8. Save your changes.

Business context
For testing purpose, two (2) products (one digital download and one physical product)
which cost $1.00 each, have been created in the sample web shop application. To receive a
certain sub-total we change the quantity of the ordered product.
The physical product that should be used for testing has the stock keeping unit (SKU)
“PolkaDot” and can be found in the category Apparel & Shoes.
The digital download that should be used for testing has the SKU “3rdAlbum” and can be
found in the category Digital downloads.
Use the following values for the Instances of the Attribute “Order details”:
Instance “PP = $2-$49”
SKU DD: {NULL}; Quantity DD: {NULL}; SKU PP: PolkaDot; Quantity PP: 27
Instance ”DD > $1”

57
INTRO TO TESTCASE-DESIGN

SKU DD: 3rdAlbum; Quantity DD: 12; SKU PP: {NULL}; Quantity PP: {NULL}
Instance ”DD = $1”
SKU DD: 3rdAlbum; Quantity DD: 1; SKU PP: {NULL}; Quantity PP: {NULL}
Instance ”PP > $51”
SKU DD: {NULL}; Quantity DD: {NULL}; SKU PP: PolkaDot; Quantity PP: 68
Instance ”PP = $1”
SKU DD: {NULL}; Quantity DD: {NULL}; SKU PP: PolkaDot; Quantity PP: 1
Instance ”PP = $50”
SKU DD: {NULL}; Quantity DD: {NULL}; SKU PP: PolkaDot; Quantity PP: 50
Instance ”PP = $51”
SKU DD: {NULL}; Quantity DD: {NULL}; SKU PP: PolkaDot; Quantity PP: 51
Instance ”PP+DD <= $50”
SKU DD: 3rdAlbum; Quantity DD: 12; SKU PP: PolkaDot; Quantity PP: 27
Instance ”PP+DD > $50 and PP < $50”
SKU DD: 3rdAlbum; Quantity DD: 34; SKU PP: PolkaDot; Quantity PP: 27

Hints
TestCase specification uses actual physical data that will later be used in the
TestCases we are creating.
It is advised to use the prefix Value | or something similar for the name of the
specification Attributes, to differentiate them from your normal structure.
SKU is the abbreviation for stock keeping unit.
When adding values to Instances we add content to Attributes without creating
Instances. This is possible because we enter only one specific value in every cell.

Further learning material


Course section: TestCase-Design
Lesson: 18 | Specifications and verifications
Video: TCD Exercises 12-13

58
INTRO TO TESTCASE-DESIGN

Exercise 13 | Add the Verifications

Objective
Add verifications to your TestSheet.

Why is this important?


To identify what should be verified and understand how to deal with
verifications in the Tosca TestCase-Design section.

Instructions
1. Duplicate the folder “TCD | Exercise 12”.
2. Focus on the “Attribute “Verifications” in the TestSheet “Calculate shipping
costs” in the folder “TCD | Exercise 13”.
3. Add the Attributes for the values (Sub-total, Shipping costs, Order total and
Message) required for the defined test cases to the Attribute “Verifications”
Business context.
4. Focus on the TestSheet “Calculate shipping costs” in the folder “TCD | Exercise
13”.
5. Add the values for the Attributes you just created (“Value | Sub-total”, “Value |
Shipping costs”, “Value | Order total” and “Value | Message”) as mentioned in
the Business context.
Enter the values by using the Filter and Fill empty Values function (if
applicable) and the information provided in the Business context
Right-click on the Attribute “Value | Message” and click on Fill empty Values
>> Specific in the context menu
Enter “Your order has been successfully processed!” in the pop-up and click
on “OK”
Click in the Working pane into the cell from the row “Value | Sub-total” and
column “StraightThrough”
Enter the value “27.00” into the cell (we ordered 27 PolkaDot and each costs
$1)
Click in the Working pane into the cell from the row “Value | Shipping costs”
and column “StraightThrough”
Enter the value “10.00” into the cell (we ordered a physical product that costs
not more than $50 so shipping costs apply)
Click in the Working pane into the cell from the row “Value | Order total” and
column “StraightThrough”

59
INTRO TO TESTCASE-DESIGN

Enter the value “37.00” into the cell (we ordered 27 PolkaDot and each costs
$1 and we have $10.00 shipping costs)
Continue to add the values manually into the other cells and keep in mind
that when ordering only digital downloads the shipping costs value has to be
“Not required”
6. Save your changes.

Business context
During the TestCase we want to verify for the following:
The expected order sub-total.
Depending on the quantity of the ordered products (each product costs $1.00) the
sub-total amounts are different.
The shipping costs for the ordered product(s).
The shipping costs are either “10.00” (if they apply), “0.00” (if the order sub-total is
large than $50.00) or “Not required” (for ordering only digital downloads).
The order total.
Depending on the quantity of the ordered products and the applied shipping costs
the order total costs are different.
The success message after the order has been confirmed.
In all cases we receive the success message:
“Your order has been successfully processed!”

Hints
The Attribute type “Result” must be used for Attributes beneath the Attribute
“Verifications”. This property passes on from the Attribute “Verifications” to all
Attributes beneath.
Each test case should have a unique test focus, which makes it clear what needs
to be verified.
To simplify the process of calculating the sub-total, the shipping costs and the
order total, you can expand the Attribute “Order details” within the Attribute
“Workflow” to take a look at the ordered quantities of the product.

Further learning material


Course section: TestCase-Design
Lesson: 18 | Specifications and verifications
Video: TCD Exercises 12-13

60
INTRO TO TESTCASE-DESIGN

Exercise 14 | Integration of new Attributes

Objective
Learn how to integrate new Attributes to an existing TestSheet.

Why is this important?


New releases often contain new functionalities that have to be added to existing
TestSheets.
In case of the sample web shop application we realize that the order costs also
depend on the selected shipping method. This shipping method has not taken
in account by now so we have to add a new Attribute.

Instructions
1. Duplicate the folder “TCD | Exercise 13”.
2. Focus on the Attribute “Workflow” within the TestSheet “Calculate shipping
costs” in the folder “TCD | Exercise 14”.
3. Create a new Attribute beneath the Attribute “Workflow” and name it
“Shipping method”.
Right-click on the Attribute “Workflow” in the Working pane and click on
the “Create Attribute” icon in the mini toolbar
Rename the new Attribute to “Shipping method”
4. Create four (4) Instances (“Ground” (this Instance is our StraightThrough),
“Next Day Air”, “2nd Day Air” and “In-Store Pickup”) for the Attribute
“Shipping method” according to the Business context.
5. Create another Instance (“N/A”) for the Attribute “Shipping method”. This
Instance has to be used when ordering only digital downloads.
6. Integrate the new Attribute and its Instances into the existing data
combinations of the Attribute “Order details”.
Right-click on the Attribute “Shipping method”
In the context menu click on Complete Instances >> Linear expansion
7. Correct the data combinations you created for the Attribute “Workflow” and
merge the Instance duplicates.
Focus on the Attribute “Workflow”
In the column “DD > $1” change the Instance used for “Shipping method”
from “Ground” to “N/A”
In the column “DD = $1” change the Instance used for “Shipping method”
from “Ground” to “N/A”

61
INTRO TO TESTCASE-DESIGN

In the column “In-Store Pickup” change the Instance used for “Addresses”
from “Existing shipping address” to “No shipping address”
In the column “N/A change the Instance used for “Order details” from “PP =
$2-$49” to “DD > $1” and for “Addresses” from “Existing shipping address”
to “No shipping address”
Right-click on the Attribute “Workflow” and click on Merge Instance
Duplicates in the context menu
8. Focus on the TestSheet “Calculate shipping costs” in the folder “TCD |
Exercise 14”.
9. Integrate the new Instances from the Attribute “Workflow” to the final level.
Right-click on the Attribute “Workflow”
In the context menu click on Complete Instances >> Linear expansion
No data combinations need to be corrected
10. Collapse the Attribute “Shipping method” and expand the Attributes “Order
details” and “Verifications” in the Working pane.
11. Add the values for the Attributes (“Value | Sub-total”, “Value | Shipping
costs”, “Value | Order total” and “Value | Message”) as mentioned in the
Business context and according to the ordered quantity of the products for
the three (3) new created Instances in step 9.
12. Save your changes.

Business context
The calculation of the shipping costs also depends on (besides the price of the ordered
product) the selected shipping method during the checkout process. The following shipping
methods are possible:
The customer can choose to ship by Ground ($10.00), by Next Day Air ($40.00), by
2nd Day Air ($20.00) or by In-Store Pickup ($0.00).
In most cases, orders will be shipped by Ground.
If the shipping method In-Store Pickup should be chosen, it will not be possible to
specify a shipping address.
The limit for the sub-total of $50.00 after which the shipping costs are set to $0.00
also applies to the shipping methods Next Day Air and 2nd Day Air.

Hints
You will be provided with necessary data for the payment method when
automating the TestCases.

62
INTRO TO TESTCASE-DESIGN

Further learning material


Course section: TestCase-Design
Lesson: 19 | Integration of new Attributes
Video: TCD Exercises 14

63
INTRO TO TESTCASE-DESIGN

Exercise 15 | TestCase Substitute Links

Objective
Learn how to link the logical TestCases you defined in the previous TestCase-
Design exercises (the Instances on TestSheet level) to the relevant
Requirement.

Why is this important?


Learn how to track the test progress in the Requirements section.
The Requirements section is used by test managers to have a quick overview of
the testing project.

Instructions
1. Select a window layout where you can see the Requirements section as well as
the TestCase-Design section.
Click on the Requirements Window tab and drag and drop it away from the
other Window tabs. Tosca creates a new window. You can dock this window
into Tosca Commander by using the docking plus in the center of the Tosca
Commander window.
2. Focus on the new window in the RequirementSet “Web shop | Frontend” within
the “Overall system” folder in the folder “RPA | Exercise 6” in the Requirements
section.
3. Focus on the second window in the TestSheet “Calculate shipping costs” in the
folder “TCD | Exercise 14” in the TestCase-Design section.
4. Link the logical TestCases with the Position “Inner” to the Requirement
“Calculate shipping costs”.
In the Requirements window Working pane, expand the Requirement
“Order process”
In the TestCase-Design window Working pane, expand the ”Instances” folder
Press the Ctrl button and select the Instances “StraightThrough”, “DD > $1”,
“PP > $51”, “PP+DD <= $50”, “PP+DD > $50 and PP < $50”, “Next Day Air”,
“2nd Day Air” and “In-Store Pickup”
Drag and drop the Instances you just selected onto the Requirement
“Calculate shipping costs”
See how TestCase substitute links are created
5. In the Requirements window, focus on the RequirementSet “RC4 - Order
process” within the “Release candidates” folder in the folder “RPA | Exercise 6”.
6. Link the TestSheet to the Requirement “Calculate shipping costs”.

64
INTRO TO TESTCASE-DESIGN

Drag and drop the TestSheet “Calculate shipping costs” onto the
Requirement “Calculate shipping costs”
7. See how TestCase substitute links are created.
8. Save your changes.

Hints
By linking your TestCase-Design, the results will be projected onto the
Requirements section.
Tricentis recommends to use one TestSheet to cover one Requirement.
TestCase substitute links cannot contain further, subordinate elements.
Possibilities of how to arrange the Window tabs are shown in the solution video.
A release candidate usually contains all the TestCases that you defined, while
the overall system usually only contains the most important processes or use
cases. For our sample web shop application, we decided that all eight logical
TestCases (the Instances on TestSheet level) are important.

Further learning material


Course section: TestCase-Design
Lesson: 20 | Linking Instances
Video: TCD Exercises 15

65
INTRO TO TESTCASE-DESIGN

Summary

What have you learned?


How to create and maintain a TestCase-Design structure in the TestCase-Design
section.
How to use combinatorics to design the optimal number of test data
combinations that will be required to test your Requirements.

Objectives achieved
Structuring of elements in the TestCase-Design section.

Identifying Attributes and Instances in an SUT.

Identification and combination of relevant test data using the Linear


expansion method.

Store physical values for testing in your TestCase-Design.

Application of all methods learned to create a framework for test cases for the
sample web shop application.

Understanding the relevance of test case design in the context of the test
project.

What’s next?
1. Test your knowledge by taking the TestCase-Design online assessment.
2. Continue the training with the online presentation and exercises for Manual
Testing.

66
INTRO TO TESTCASE-DESIGN

Notes

67
INTRO TO TESTCASE-DESIGN

This page is intentionally left blank.

68

S-ar putea să vă placă și