Você está na página 1de 101

Tricentis

Certified
Professional

STUDENT EXERCISE WORKBOOK


SURVEY

SURVEY
Tricentis Certified Professional
Student Exercise Workbook
ƒ Version 2015_03_Cross Browser Test Automation
ƒ Designed to be used with Tricentis Tosca Testsuite v.8.3.1

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 courses:
ƒ Project Essentials
ƒ Risk Priority Assessment
ƒ TestCase Design
ƒ Manual Testing
ƒ Automated Testing (Cross Browser Test Automation)

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: training@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.
© 2015 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 Certified Professional training courses:

ƒ Project Essentials (PE)


ƒ Risk Priority Assessment (RPA)
ƒ Test Case Design (TCD)
ƒ Manual Testing (MT)
ƒ Automated Testing (AT)
The workbook is arranged in sections. Each section is named after the
corresponding training course. 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 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://tosca-webshop.azurewebsites.net/

2
PREFACE

Presentations
ƒ The presentations can be downloaded from your account in our Learning
Management System. Please use the link below to download the
presentations:
https://getcertified.tricentis.com/

Solution videos
ƒ Tricentis offers a solution video for each exercise which is most beneficial for
self-paced learning.
ƒ In addition to guiding you through each exercise, each video includes valuable
best practice tips.
ƒ The sample solution videos are accessible on our Learning Management
System.

Online exams
ƒ All certification exams are offered as online certification exams. Please use the
link below to log on to the Tricentis Learning Management System:
https://getcertified.tricentis.com/

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.

Business context (where applicable)


ƒ Additional information which may be needed to understand and complete the
exercise.

Hints (where applicable)


ƒ Useful recommendations from Tricentis.

Further learning material


ƒ Reference to the relevant slides in the presentation by Tricentis.

3
PREFACE

Terminology

This document uses the following conventions.

Description Example Represents


Bold Create a new Emphasized text
Requirement
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 elements in question is a Tosca elements, the
element’s name will be displayed in bold type.
ƒ Examples: Module, TestCase, ExecutionList

4
PROJECT ESSENTIALS
PROJECT ESSENTIALS

2 PROJECT ESSENTIALS
Table of Contents
Introduction ............................................................................................................... 6
Exercise 1 | Creation of a Multiuser Environment ................................................ 7
Exercise 2 | Creation of Users ................................................................................. 8
Exercise 3 | Creation of User groups ...................................................................... 9
Exercise 4 | Creation of passwords....................................................................... 10
Exercise 5 | Connect to an existing Common Repository .................................. 11
Summary .................................................................................................................. 12
Notes ......................................................................................................................... 13

Introduction

Project Essentials exercises give you all the information you require to begin your
work with the Tosca Testsuite.
You will learn
ƒ How to access the Tosca Testsuite once a license has been purchased
ƒ How to install the Tosca Testsuite and activate your license
ƒ The first steps in creating a project as well as best practice tips

Please note that the Project Essentials module is only available as self-paced
training.
It is necessary to watch the videos before completing the below exercises.
Please also download the Project Essentials presentation as a reference.

6
PROJECT ESSENTIALS

Exercise 1 | Creation of a Multiuser Environment

Objective
¾ Creation of a training multiuser environment using Tosca Testsuite.

Why is this important?


¾ This is an accurate reflection of a real world scenario.
¾ Learn and understand how to set up a test project for multiple users.
¾ The multiuser environment will be the basis for all exercises in this section.

Instructions
1. Start Tosca Commander. Start the Tosca Commander (either by double
clicking the shortcut on the desktop, or by selecting it from the Windows Start
menu).
2. Open the New workspace window.
3. Create a new Common Repository and a new workspace using the following
parameters:

¾ Choose the Repository type SQLite


¾ Deselect the checkbox Use existing Repository
¾ Use a unique name for the Common Repository and workspace
¾ Click on Ok, then on Close
¾ Your login credentials are:
¾ Username: Admin
¾ Password: leave the password blank (no password required at the
creation of the workspace)
¾ Click on login

Hints
¾ Use the paths that have been predefined as storage locations (where possible).
¾ Storing a workspace on a shared network drive is never recommended.

Further learning material


 Presentation: Project Essentials
™ Video 3: Setting up your project

7
PROJECT ESSENTIALS

Exercise 2 | Creation of Users

Objective
¾ Creation of four (4) additional Users.

Why is this important?


¾ To manage Users in your test project.
¾ To assign individual access credentials for users working on the project.

Instructions
1. Open the Project window by selecting the menu entry “Window” and then
clicking on “Project”.

2. Select the “Usermanagement” tab of the Project window.

3. Right-click on “All Users” and select “Create>User” and create four Users with
unique employee IDs:

¾ JSmith90
¾ MRamirez72
¾ MSDoni81
¾ VWilliams80
4. Save your changes.

Hints
¾ Each User name must be unique.
¾ Use existing employee IDs, where available.

Further learning material


 Presentation: Project Essentials
™ Video 4: User management

8
PROJECT ESSENTIALS

Exercise 3 | Creation of User groups

Objective
¾ Creation of two (2) different User groups.

Why is this important?


¾ User groups will be created as a basis for further user management in a test
project for multiple users.
¾ Here you will learn how to create User groups to differentiate between different
user roles.

Instructions
1. Open the Project window by selecting the menu entry “Window” and then
clicking on “Project”.

2. Select the “Usermanagement” tab.

3. Right-click on the project root element and select the “Create>UserGroup”


command.

4. Create a second User group.

5. Rename the first group “Test Analysts” and the second one “Testers”.

6. Assign the Users to the appropriate User groups using drag & drop as follows:

¾ VWilliams80 and MSDoni81 belong to the UserGroup “Test Analysts”


¾ MRamirez72 and VWilliams80 belong to the UserGroup “Testers”
7. Save your changes.

Hints
¾ Each User group name must be unique.

Further learning material


 Presentation: Project Essentials
™ Video 4: User management

9
PROJECT ESSENTIALS

Exercise 4 | Creation of passwords

Objective
¾ Passwords are assigned for each User.

Why is this important?


¾ To increase security in your test project.
¾ Here you will set the passwords for each of the newly created Users.

Instructions
1. Open the Project window by selecting the menu entry “Window” and then
clicking on “Project”.

2. Select the “Usermanagement” tab of the Project window.

3. Right-click on one of the Users and choose “Set password” from the context
menu.

4. Now enter the password: 1234

5. Click on “Ok”.

6. Repeat the password: 1234

7. Click “Ok” again.

8. Save your changes and click on “Checkin all”.

9. Please note, do NOT close your workspace as it will be needed for a


subsequent exercise.

Hints
¾ The admin user informs the users of their specific passwords.
¾ It is also possible to use the Active Directory service (AD or else LDAP) for the
user management system in Tosca.

Further learning material


 Presentation: Project Essentials
™ Video 4: User management

10
PROJECT ESSENTIALS

Exercise 5 | Connect to an existing Common Repository

Objective
¾ Connect to existing Common Repository as the newly created User JSmith90.

Why is this important?


¾ To understand the steps necessary to begin working in a project as a normal
user (non admin).

Instructions

1. Start another Tosca Commander instance.

2. Open the New workspace window.

3. Create a new workspace using the following parameters:

¾ Choose the “Repository type” SQLite


¾ Select the checkbox “Use existing Repository”
¾ Enter the path to the existing Repository created in Exercise 1
¾ Use a unique name for the workspace.
¾ Use the following login credentials to log in:
¾ Username: JSmith90
¾ Password: 1234
4. Save your changes.

Further learning material


 Presentation: Project Essentials
™ Video 5: Working in the multiuser environment

11
PROJECT ESSENTIALS

Summary

What have you learned?


¾ How to set up a multiuser project in the role of an administrator.
¾ How to connect to an existing multiuser project as a user.

Objectives achieved

¾ Installation and activation of Tosca Testsuite.

¾ Creation of a multiuser Common Repository.

¾ Creation of a user workspace.

¾ Management of User groups and Users.

What’s next?
1. Test your knowledge by taking the Project Essentials online exam.
2. Continue with the exercises for Risk Priority Assessment.

12
PROJECT ESSENTIALS

Notes

13
PROJECT ESSENTIALS

This page is intentionally left blank.

14
RISK PRIORITY ASSESSMENT
RISK PRIORITY ASSESSMENT

3 RISK PRIORITY ASSESSMENT


Table of Contents
Introduction ............................................................................................................. 16
Exercise 1 | Creating a Single User Workspace ................................................... 17
Exercise 2 | First steps - creating a RequirementSet .......................................... 18
Exercise 3 | First steps - creating Requirements ................................................. 19
Exercise 4 | First steps - weighting Requirements .............................................. 21
Exercise 5 | Starting a risk-based testing project ................................................ 23
Exercise 6 | Creating the Requirements structure .............................................. 24
Exercise 7 | Weighting the Requirements ............................................................ 26
Summary .................................................................................................................. 28
Notes ......................................................................................................................... 29

Introduction

Risk Priority Assessment exercises will allow 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 specifically for a 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 Requirement section. Here you will create your first simple Requirements
structure.
The following exercises will build on this knowledge using a real world example.

Please also download the Risk Priority Assessment presentation as a reference.


Try to solve the exercises before watching the solution videos.

16
RISK PRIORITY ASSESSMENT

Exercise 1 | Creating a Single User Workspace

Objective
¾ Creation of a single user workspace.

Why is this important?


¾ A workspace is necessary for your Tosca project.
¾ This single user workspace will be used for all subsequent training module
exercises.

Instructions
1. Start the Tosca Commander (either by double clicking the shortcut on the
desktop, or by selecting it from the Windows Start menu).

2. Navigate to Workspace >> New in the Tosca menu bar.

3. The field Select type of Repository should be set to None (creates single user
workspace) to create a single user workspace.

4. Enter the name “TCP_Training_Modules” as the name of the Workspace.

5. Click the “Ok” Button.

6. Click the “Close” button in the New Workspace window.

Hints
¾ You will now see the default view of a Tosca Commander Workspace, which
comprises of 5 open tabs (windows), which you are free to customize as you see
fit.
¾ Each window represents a different section in Tosca Commander and contains
a single element known as a root folder.
¾ In this training module, the focus is on the Requirements window (yellow
themed area).

Further learning material


 Presentation: Risk Priority Assessment
™ Video 1: Creating a Singleuser Workspace

17
RISK PRIORITY ASSESSMENT

Exercise 2 | First steps - creating a RequirementSet

Objective
¾ Creation of a basic RequirementSet in the Requirements section.

Why is this important?


¾ To create and structure elements in the Requirements section, using the
example of the requirements necessary when buying a computer.

Instructions

1. Navigate to the (open) Requirements section (yellow themed area) in the


workspace.

2. Right-click the Requirements root folder and choose the command


Create >> Folder in the context menu.

3. Name the newly created folder “Computer”.

4. Right-click the newly created Requirements folder Computer and choose the
command Create >> Folder in the context menu.

5. Name the newly created folder “Exercise 2”.

6. Right-click the folder Exercise 2 and choose the command


Create >> RequirementSet in the context menu.

7. Name the RequirementSet “Buying a computer”.

8. Save your changes.

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. The most common is to
right-click an element and choose the command Create from the top of the
context menu.
¾ If the command Create is not present in the context menu, this could mean that
it is not possible to create a sub-element there.

Further learning material


 Presentation: Risk Priority Assessment
™ Video 2: Creating a RequirementSet

18
RISK PRIORITY ASSESSMENT

Exercise 3 | First steps - creating Requirements

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

Why is this important?


¾ To help gain insight into various key elements in the Requirements section.

Instructions
1. Copy the folder Exercise 2 and paste it into the folder “Computer”.

You now have a folder named Exercise 3 containing the already existing
structure. (This procedure will be followed for each exercise to increase the
traceability of the exercises.)

2. Navigate to the RequirementSet Buying a Computer in the Exercise 3 folder.

3. Create a new Requirement element, by right clicking on the RequirementSet,


and selecting Create >>Δ Requirement from the context menu.

4. Name this Requirement “Price”.

5. Repeat this procedure to create 2 further Requirements.

6. Name these 2 new Requirements “Design” and “Technical Details”.

7. Now create 3 further Requirements under Technical details, by right clicking


on the Technical Details Requirement, and again selecting Create >>
Δ Requirement from the context menu.

8. Name these 3 new Requirements “CPU”, “RAM”, and “HDD”.

9. Save your changes.

Hints
¾ Please consult the notes in the corresponding presentation for more
information required to complete this exercise.
¾ While selecting Create >> Requirement from the context menu, please note
Ctrl+N, Ctrl+R listed next to the word Requirement.
¾ These are keyboard shortcuts, which if entered in the combination shown, will
also create a Requirement, just like selecting the option from the context menu.
¾ Shortcuts enable you to work more efficiently.

19
RISK PRIORITY ASSESSMENT

Further learning material


 Presentation: Risk Priority Assessment
™ Video 3: First steps to creating Requirements

20
RISK PRIORITY ASSESSMENT

Exercise 4 | First steps - weighting Requirements

Objective
¾ Basic weighting of Requirements (risk priority assessment), considering the
importance of single Requirements when buying a computer.

Why is this important?


¾ To understand the simplest method of assessing the importance (risk) of single
requirements in Tosca.

Instructions
1. Copy the folder Exercise 3 and paste it into the folder “Computer”.

You now have a new folder named Exercise 4, containing the already existing
structure.

1. Navigate to the RequirementSet “Buying a Computer” in the Exercise 4


Folder.

2. At the top of the Requirements window, you can find the column headers for
Name, Weight, and so on. These are the column headers in the Detail tab.

3. Remove the Required TestCases column, by clicking and dragging the column
downwards from the column headers, until an “X” icon appears, and then
releasing it.

4. Right click on the column headers and select the Column Chooser from the
context menu.

5. Add the columns Relative Weight and Contribution by double clicking on


these entries in the Column Chooser.

6. Enter the following values in the Weight column for each Requirement:

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

7. Observe the changes in the Relative Weight and the Contribution columns.
We will focus on these columns in subsequent exercises.

8. Save your changes.

21
RISK PRIORITY ASSESSMENT

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 Price requirement (weighted at 1).
¾ The Column Chooser can be accessed by right-clicking the column headers in
the Details tab of your open Requirements window.
¾ In the Column Chooser, you can select entries by double clicking on them, or
alternatively dragging an entry towards the column headers in the detail tab,
and dropping them in the position you wish to place them.

Further learning material


 Presentation: Risk Priority Assessment
™ Video 4: First steps to weighting the Requirements

22
RISK PRIORITY ASSESSMENT

Exercise 5 | Starting a risk-based testing project

Objective
¾ Creation of a suggested folder structure for the requirements in a risk-based
testing project.

Why is this important?


¾ All further exercises will use the folder structure created herein, and the folder
structure will give you an insight on how best to organize your Requirements in
any project.
¾ The project under consideration is the sample web shop application as
mentioned in chapter 1.3 Recommended learning material.

Instructions

1. Navigate to the Requirements root folder.

2. Right-click the Requirements root folder and create a new folder.

3. Name the newly created folder “Web shop”.

4. Create two (2) new folders within the “Web shop” folder.

5. Name one folder “Overall system” and the other folder “Release candidates”.

6. Save your changes.

Hints
¾ Having two (2) separate folders for the overall system and the individual
release candidates allows you to quickly keep track of which requirements were
added 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


 Presentation: Risk Priority Assessment
™ Video 5: Starting a risk based testing project

23
RISK PRIORITY ASSESSMENT

Exercise 6 | Creating the Requirements structure

Objective
¾ Creation of a complete and functional Requirements structure for the sample
web shop application.

Why is this important?


¾ To create a Requirements structure that reflects the business context of the
sample web shop application found under http://tosca-
webshop.azurewebsites.net, which is the system under test.

Instructions

1. Select the newly created folder “Overall system”.

2. Create three (3) new RequirementSets and name them:

“Webshop | Frontend”

“Webshop | Backend”

“Webshop | Non-functional”

3. Use the specifications as given in the Business Context section below, to


create a Requirement structure within the applicable RequirementSets.

4. Save your changes.

Business context
This document contains an overview of the functional volume of the sample web shop
application.

This data comes from the Business Analysts and contains all necessary information
required to weight the requirements.

The description is divided into three (3) parts: the backend functionality - which is used for
customers -, the frontend functionality which is only available for administrators and the
non-functional requirements.

Backend functionality
¾ Manage promotional packages
¾ Generate reports
¾ Administration
Frontend functionality
¾ Customer
The customer can perform the following tasks:

24
RISK PRIORITY ASSESSMENT

¾ Login
¾ Register
¾ Modify customer data
¾ Product
A user is able to order, search and compare products.
¾ Shopping cart
The user is able to manage his/her shopping cart.
Non-functional requirements
¾ User Interface
¾ The colors of the interface should match the visual corporate identity of
the company
¾ It should be possible to select different languages
¾ It should be possible to modify the view
¾ Different browsers should be supported
¾ The performance must adhere to the guidelines in the company’s software
performance document (not part of the training material)

Hints
¾ 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.).

Further learning material


 Presentation: Risk Priority Assessment
™ Video 6: Creating the Requirements structure

25
RISK PRIORITY ASSESSMENT

Exercise 7 | Weighting the Requirements

Objective
¾ Appropriately weighted Requirements.

Why is this important?


¾ To compare Requirements in terms of their risk and to assign a value (Weight)
which will then be entered in Tosca (risk priority assessment).

Instructions

1. Select the newly created “RequirementSet Webshop | Backend”.

2. Display the columns Frequency class, Damage class, Weight, Contribution


and Relative Weight using the Column Chooser.

3. Use the information given in the Business context below and transfer the
specified risk assessment to the corresponding Requirement.

4. Repeat these steps in the other two (2) RequirementSets.

5. Observe the changes in the Contribution and the Relative Weight columns.

6. Save your changes.

Business context
The Business Analysts have provided the following information:
Backend
Requirement Damage Frequency
Promotional packages Very low Very rarely used
Reports Low Rarely used
Administration High Frequently used

Frontend
Requirement Damage Frequency
Customer High Frequently used
Product Very high Very frequently used
Shopping Cart Very high Very frequently used

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

Product
Requirement Damage Frequency

26
RISK PRIORITY ASSESSMENT

Search Low Frequently used


Compare products Very low Very rarely used
Order process Very high Very frequently used

Non-functional requirements
Requirement Damage Frequency
GUI Very high Very frequently used
Browser support Low Frequently used
Performance Very low Rarely used

GUI
Requirement Damage Frequency
Colors Very low Frequently used
Languages Medium Frequently used
View Very high Frequently used

Hints
¾ Enter positive whole numbers, between one (1) and five (5) as values in the
Damage Class and Frequency Class columns, with 1 being the lowest and 5
being the highest.
¾ Weighting is usually done top down. Begin comparing Requirements on the
highest 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


 Presentation: Risk Priority Assessment
™ Video 7: Weighting the Requirements

27
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 Requirement section.

¾ Weighting of Requirements in terms of risk priority.

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


test project.

What’s next?
1. Test your knowledge by taking the Risk Priority Assessment online exam.
2. Continue with the exercises for Test Case Design.

28
RISK PRIORITY ASSESSMENT

Notes

29
RISK PRIORITY ASSESSMENT

This page is intentionally left blank.

30
RISK PRIORITY ASSESSMENT

TESTCASE DESIGN

31
TESTCASE DESIGN

4 TESTCASE DESIGN
Table of Contents
Introduction ............................................................................................................. 32
Exercise 1 | First steps – creating a TestSheet ..................................................... 33
Exercise 2 | First steps – creating Attributes ........................................................ 35
Exercise 3 | First steps – creating Instances ........................................................ 37
Exercise 4 | Purchasing in the web shop.............................................................. 39
Exercise 5 | Structure from base elements.......................................................... 40
Exercise 6 | Preconditions...................................................................................... 41
Exercise 7 | Equivalence classes............................................................................ 43
Exercise 8 | Combinatorics .................................................................................... 45
Exercise 9 | Combination level .............................................................................. 47
Exercise 10 | Verifications ...................................................................................... 48
Exercise 11 | Combinatorial generation on TestSheet level .............................. 50
Exercise 12 | Integration of new Attributes ......................................................... 51
Exercise 13 | TestCase Substitute Links ............................................................... 53
Summary .................................................................................................................. 54
Notes ......................................................................................................................... 55

Introduction

The Test Case Design exercises will guide you through the process of creating a test
case design for a 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
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.

32
TESTCASE DESIGN

Exercise 1 | First steps – creating a TestSheet

Objective
¾ Creation of a TestSheet.

Why is this important?


¾ A TestSheet is the core element to organize all 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_Modules” created in the Risk Priority
Assessment training module exercises.

2. Ensure that the Default view is active (menu item Window >> Perspectives >>
Default).

3. Navigate to the (open) TestCase Design section (red themed area) in the
workspace.

4. Right-click the TestCase Design root folder and choose the command Create
>> Folder in the context menu.

5. Name the newly created folder “Computer”.

6. Right-click the newly created TestCase Design folder Computer and again
choose the command Create >> Folder in the context menu.

7. Name the newly created folder “Exercise 1”.

8. Right-click the folder Exercise 1 and choose the command Create >> TestSheet
in the context menu.

9. Name the TestSheet “Assembling a computer”.

10. Save your changes.

Hints
¾ A TestSheet is a fundamental element of the TestCase Design section.
¾ Tricentis recommends that one TestSheet covers one Requirement.
¾ The Default window layout is the five (5) open tabs that you initially see, when
creating a workspace.

33
TESTCASE DESIGN

Further learning material


 Presentation: TestCase Design
™ Video 1: Creating a TestSheet

34
TESTCASE DESIGN

Exercise 2 | First steps – creating Attributes

Objective
¾ Creation of three (3) Attributes in a TestSheet.

Why is this important?


¾ To learn how to create and structure Attributes in the TestCase Design section,
using the example of assembling a computer.

Instructions
1. Copy the folder Exercise 1 and paste it into the folder “Computer”.

You now have a folder named Exercise 2 containing the already existing
structure. (This procedure will be followed for each exercise to increase the
traceability of the exercises.)

2. Navigate to the TestSheet Assembling a computer in the Exercise 2 folder.

3. Create a new Attribute element, by right clicking on the TestSheet, and


selecting Create >> Attribute from the context menu.

4. Name this Attribute “CPU”.

5. Repeat this procedure to create two (2) further Attributes according to the
information given in the Business context below.

6. Save your changes.

Business context
In order to assemble a computer, several computer parts (e.g. processor, memory, hard
disk, video card, etc.) are available with different characteristics to offer a large number of
configurations.
The three (3) most important parts are:
¾ CPU (processor)
¾ Memory
¾ Hard Drive

Hints
¾ An Attribute is a structural element which represents different characteristics of
a specific object.
¾ Hair color is an example of such an element (see TCD presentation).

35
TESTCASE DESIGN

¾ 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


 Presentation: TestCase Design
™ Video 2: Creating Attributes

36
TESTCASE DESIGN

Exercise 3 | First steps – creating Instances

Objective
¾ Creation of Instances for the newly created Attributes.

Why is this important?


¾ Instances represent the possible data variants of the attributes in our system.

Instructions
1. Copy the folder Exercise 2 and paste it into the folder “Computer”.

You now have a folder named Exercise 3 containing the already existing
structure.

2. Navigate to the Attribute CPU.

3. Create a new Instance element, by right clicking on the Attribute, and selecting
Create >> Instance from the context menu.

4. Name this Instance “2.9 GHz Quad-core”.

5. Repeat this procedure to create two (2) further Instances.

6. Name these Instances “3.2 GHz Quad-core” and “3.4 GHz Quad-core”.

7. Repeat this procedure to create additional Instances for the final two (2)
Attributes using the information given in the Business context below.
8. Save your changes.

Business context
In order to assemble a computer several computer parts (e.g. processor, memory, hard
disk, video card, etc.) are available with different characteristics to offer a large number of
configurations.
The three (3) available variants for each computer part are:
¾ CPU (processor)
¾ 2.9 GHz Quad-core
¾ 3.2 GHz Quad-core
¾ 3.4 GHz Quad-core
¾ Memory
¾ 8 GB
¾ 16 GB
¾ 32 GB

37
TESTCASE DESIGN

¾ Hard Drive
¾ 1 TB Drive
¾ 500 GB Drive
¾ 250 GB Drive

Hints
¾ Instances are elements which represent data variants for a specific object.
¾ Brown, blonde and red are possible data variants for hair color (see TCD
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.

Further learning material


 Presentation: TestCase Design
™ Video 3: Creating Instances

38
TESTCASE DESIGN

Exercise 4 | Purchasing in the web shop

Objective
¾ Familiarity with 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 the training modules.

Instructions
1. Open the sample web shop application http://tosca-webshop.azurewebsites.net/
and have a look at the purchasing process.

2. Try to analyze the application before starting with the TestCase Design.
Here are a few questions that you will try to answer step by step in test case
design:
ƒ What is the process you are testing? How do you go about purchasing a
product?
ƒ What is your starting point for the process?
ƒ What are the individual steps of your process?
ƒ Do you need preconditions in order to test properly?
ƒ What is your test focus?

Hints
At a later stage, you will define data variations necessary to test a requirement and
what should be verified with these data variations.
In this example, we want to test the ordering process. 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?

Further learning material


 Presentation: TestCase Design
™ Video 4: Purchasing in the web shop

39
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. Right-click the TestCase Design root folder and choose the command Create >>
Folder in the context menu.

2. Name the newly created folder “Web shop”.

3. Right-click the newly created TestCase Design folder Web shop and again
choose the command Create >> Folder in the context menu.

4. Name the newly created folder “Exercise 5”.

5. In this folder, create a TestSheet called “Product order”.

6. Create the required Attributes in the TestSheet Product order. You can find
the required information in the Business context section below.

7. Change the value of the Property BusinessRelevant from the Attribute


“Verifications” to “Result”.

8. Save your changes.

Business context
Our base structure will contain the following Attributes:
¾ Precondition
¾ Purchasing process
¾ Verifications

Hints
¾ Tricentis recommends creating elements using the available keyboard
shortcuts.

Further learning material


 Presentation: TestCase Design
™ Video 5: Structure from base objects

40
TESTCASE DESIGN

Exercise 6 | Preconditions

Objective
¾ Creation of a basic Attribute structure below the Attribute Precondition.

Why is this important?


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

Instructions
1. Copy the folder Exercise 5 and paste it into the folder “Web shop”.

You now have a folder named Exercise 6 containing the already existing
structure.

2. Create an Attribute beneath Precondition and name it “Customer”.

3. Create two (2) new Instances underneath Customer for “Existing Customer”
and “Guest Account”.

4. Mark the Instance Existing Customer as a StraightThrough using the [F7]


button.

5. Mark the Instance Guest Account as a valid Instance using the [F7] button.

As this Attribute Customer is a precondition for the purchasing process, there


are no invalid Instances.

6. Save your changes.

Business context
In order to make a valid check out, a customer (existing or guest) needs to complete the
order.
The focus in this TestCase Design is not to test the creation of a customer.
Thus, the Attribute Precondition presents only one characteristic, namely Customer.
More information will then be filled out for the Customer itself.

Hints
¾ 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.

41
TESTCASE DESIGN

¾ 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 TCD presentation.

Further learning material


 Presentation: TestCase Design
™ Video 6: Preconditions

42
TESTCASE DESIGN

Exercise 7 | Equivalence classes

Objective
¾ Construction of an extended Attribute structure for the purchasing process.

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.

Instructions
1. Copy the folder Exercise 6 and paste it into the folder “Web shop”.

You now have a folder named Exercise 7 containing the already existing
structure.

2. Create two (2) Attributes under the Attribute Purchasing process and name
them “Product Selection” and “Order details”.

3. Create an Attribute structure under the Attributes Product Selection and


Order details using the information described in the Business context section
below.

4. Assign each Instance, where applicable, the correct values for the properties
Character and Position (e.g. Valid, Invalid, and Boundary Instances etc.).

5. Save your changes.

Business context
¾ All of the information is considered "business relevant" for the purchasing process, since
it influences the total amount to be paid (each piece of data has a direct impact on the
total sum).
¾ The Attribute Product Selection will contain the following:
¾ Several product types are available (It is possible to purchase several product
types at once)
¾ Cell phones (most people buy a cell phone in the web shop)
¾ Notebooks
¾ Digital downloads (the price of the downloads are always around $5)
¾ Total price of selection (the price influences the shipping costs)

43
TESTCASE DESIGN

¾ Value range: $1-$50 Æ no discount to the shipping cost


¾ Value range: > $50 Æ no shipping costs
¾ The regular price for a cell phone is $100
¾ The Attribute Order details will contain the following:
¾ Billing address
¾ In the sample web shop application, the billing address must be selected
before the shipping address.
¾ The billing address can either be a completely new address or an existing
address. In most cases an existing address will be used.
¾ Shipping address
¾ The shipping address can be the same as the billing address, it can be
another already existing address or it can be a completely new address.
¾ A shipping address cannot be selected if only Digital Downloads are
purchased (dependency).
¾ In most cases, the billing and shipping address is the same.
¾ Additional options
¾ The customer may optionally enter a discount code or gift card codes.
¾ Only valid codes will be accepted.

Hints
¾ 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.

Further learning material


 Presentation: TestCase Design
™ Video 7: Equivalence Classes I

44
TESTCASE DESIGN

Exercise 8 | Combinatorics

Objective
¾ Data combinations at the level of the Attributes Order Details and Product
Selection.

Why is this important?


¾ To learn how to create data combinations using the Linear Expansion method.

Instructions
1. Copy the folder Exercise 7 and paste it into the folder “Web shop”.

You now have a folder named Exercise 8 containing the already existing
structure.

2. Create an Instance underneath the Attribute Additional Options and then


delete it, leaving an Instance folder. (The Attribute Additional Options should
have been created under the Attribute Order Details in the last exercise).

3. Mark the Attributes to be combined from a business perspective and select


the command Generate Instances >> Linear Expansion.

4. Create an Instance directly underneath the Attribute Order Details and then
delete it, leaving an Instance folder.

5. Mark the Attributes to be combined from a business perspective and select


the command Generate Instances >> Linear Expansion.

6. Create an Instance underneath the Attribute Product Selection and then


delete it, leaving an Instance folder.

7. Mark the Attributes to be combined from a business perspective and select


the command Generate Instances >> Linear Expansion.

8. Save your changes.

45
TESTCASE DESIGN

Hints
¾ There are different possibilities of structuring Attributes and Instances.
¾ The proposed solution is just one way of doing this and might differ from the
one you’ve chosen.
¾ In order to generate Instances automatically with Tosca, you first need to specify
where you want to create Instances (by creating an Instance folder, see
Appendix of TCD presentation) and then selecting the Attributes you want to
combine.
¾ All Instances must be marked properly before generating Instances
automatically.

Further learning material


 Presentation: TestCase Design
™ Video 8: Equivalence Classes II

46
TESTCASE DESIGN

Exercise 9 | Combination level

Objective
¾ Combinatorial generation on the level of the Attribute.

Why is this important?


¾ To learn about where and how to combine test data.

Instructions
1. Copy the folder Exercise 8 and paste it into the folder “Web shop”.

You now have a folder named Exercise 9 containing the already existing
structure.

2. Use the information described in the Business context section below to add
any further Instances and/or Attributes where applicable.

3. Combine the Attributes Product selection and Order details at the level of the
Attribute Purchasing process using the linear expansion method.

4. Delete duplicates where applicable.

5. Save your changes.

Business context
¾ If a Digital Download is selected, it is not possible to provide a shipping address.

Hints
¾ When considering dependencies it is important to incorporate them into the
already created Instances. This may result in an increase or decrease in the
number of expected Instances.
¾ Whenever there is a dependency you will need to check all created Instances to
see if they still reflect the information in the requirements document.

Further learning material


 Presentation: TestCase Design
™ Video 9: Level of Combinations

47
TESTCASE DESIGN

Exercise 10 | Verifications

Objective
¾ A set of verifications.

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. Copy the folder Exercise 9 and paste it into the folder “Web shop”.

You now have a folder named Exercise 10 containing the already existing
structure.

2. Create the necessary Attributes underneath the Attribute Verification.

3. Add relevant Instances within the Attributes to reflect the business context
information.

4. Save your changes.

Business context
¾ Identify the possible verifications.
¾ Has the order been placed successfully? Did the order process fail? Is this relevant?
¾ Is an error message visible? Are confirmation messages visible?
¾ Are there shipping costs? Should there be no shipping costs, then this must also be
tested.
¾ Ensure that only relevant information is verified.
¾ The expected error messages are:
¾ The coupon code you entered couldn't be applied to your order
¾ First name is required
¾ Wrong email
¾ The expected confirmation messages are:
¾ Your order has been successfully processed
¾ The coupon code was applied
¾ The shipping costs are:
¾ $10.00 without discount

48
TESTCASE DESIGN

Hints
¾ The Attribute type “Result” must be used.
¾ Each test case should have a unique test focus, which makes it clear what needs
to be verified.

Further learning material


 Presentation: TestCase Design
™ Video 10: Verification

49
TESTCASE DESIGN

Exercise 11 | Combinatorial generation on TestSheet level

Objective
¾ Creating data combinations (Instances) at the level of the TestSheet.

Why is this important?


¾ To combine all data at the level of the TestSheet and create all necessary logical
test cases.

Instructions
1. Copy the folder Exercise 10 and paste it into the folder “Web shop”.

You now have a folder named Exercise 11 containing the already existing
structure.

2. Combine the Attributes Precondition and Purchasing Process using the linear
expansion method.

Check: Are the created data combinations correct from a business perspective?
Are there dependencies?

Check: How many Instances will you get using the Linear Expansion method?

3. Fill in the values of the necessary verifications after combination.

4. Save your changes.

Business context
¾ If the new Billing Address is empty, the expected message will be “First name is required
¾ If the new Billing Address is invalid, the expected message will be “Wrong email”
¾ If the total price is 0, the expected message will be “You cannot complete your purchase”

Hints
¾ The column Filter (selected by right-clicking the column header via the Column
Chooser) can be used to filter for specific Instances on the Attribute level (e.g.
in case of dependencies).

Further learning material


 Presentation: TestCase Design
™ Video 11: Combinatorial generation on TestSheet level

50
TESTCASE DESIGN

Exercise 12 | Integration of new Attributes

Objective
¾ A complete and finalized Attribute structure with data combinations.

Why is this important?


¾ This is important from a maintenance perspective as you will learn how to
integrate new data into existing TestSheets.

Instructions
1. Copy the folder Exercise 11 and paste it into the folder “Web shop”.

You now have a folder named Exercise 12 containing the already existing
structure.

2. The specification of the Attribute Purchasing Process is extended by a new


version of the web shop.

3. Create two new Attributes “Shipping method” and “Payment method” under
the Attribute Order Details.

4. Complete the Attributes with the relevant Instances as outlined in the


Business context section below. Also consider other Attributes (e.g. Shipping
Address).

Check: Do any changes have to be made?

5. Go to the Attribute Order Details.

Check: How do the new Attributes need to be integrated into the existing
structure, in order to cover the combinations required from a business
perspective using linear expansion?

6. Integrate the new Instances into the Attribute Purchasing Process.

Check: Did you incorporate all Instances?

7. Go to the Test Sheet Product Order.

Check: How many new Instances will you have to create at the level of the
TestSheet using linear expansion?

8. Now integrate the new Instances into the TestSheet Product Order.

9. Consider dependencies on the level of the TestSheet.

10. Use the Filter function in order to integrate dependencies.

11. Save your changes.

51
TESTCASE DESIGN

Business context
¾ Order Details
¾ Shipping method
ƒ The customer can choose to ship by air (same day or second day), by
ground or to pick the order up in store.
ƒ If the order should be picked up in store, it will not be possible to specify
a shipping address.
ƒ In most cases, orders will be shipped by ground.
¾ Payment method
ƒ An existing customer can pay by credit card or purchase order.
ƒ A guest is not allowed to pay by purchase order.
ƒ The corresponding error message is: “You need to log in to use a
purchase order.”
ƒ It is rare that customers pay by purchase order.

Further learning material


 Presentation: TestCase Design
™ Video 12: Integration of new Attributes

52
TESTCASE DESIGN

Exercise 13 | TestCase Substitute Links

Objective
¾ TestCase Design Instances linked to the relevant Requirement.

Why is this important?


¾ Learn how to track the test progress in the Requirements section.

Instructions
1. Select a window layout where you can see the risk-weighted Requirement
structure Webshop as well as the TestSheet Product order.

2. Compare the Requirement structure with the Instances from the TestSheet.
Which Instances test which Requirement?

3. Drag and drop the Instances (or the entire TestSheet) onto the appropriate
Requirement. See how TestCase Substitute Links are created.

4. 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.

Further learning material


 Presentation: TestCase Design
™ Video 13: TestCase Substitute Links

53
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.

¾ Identification and combination of relevant test data using different


combinatorial methods.

¾ 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 Test Case Design online exam.
2. Continue with exercises for Manual Testing.

54
TESTCASE DESIGN

Notes

55
TESTCASE DESIGN

This page is intentionally left blank.

56
MANUAL TESTING
MANUAL TESTING

5 MANUAL TESTING
Table of Contents
Introduction ............................................................................................................. 58
Prerequisite .............................................................................................................. 59
Exercise 1 | Create a manual test case ................................................................. 60
Exercise 2 | ActionMode Verify (manual) 1 .......................................................... 62
Exercise 3 | ActionMode Verify (manual) 2 .......................................................... 63
Exercise 4 | Link manual TestCases to Requirements ........................................ 64
Exercise 5 | Creating an ExecutionList.................................................................. 65
Exercise 6 | Link ExecutionList to RequirementSet ............................................. 66
Exercise 7 | Executing an ExecutionList ............................................................... 67
Exercise 8 | Print a report ...................................................................................... 68
Summary .................................................................................................................. 69
Notes ......................................................................................................................... 70

Introduction

The Manual Testing exercises will guide you through the process of creating and
executing manual test cases in the TestCases and ExecutionLists section.
You will learn
ƒ How to create manual test cases
ƒ How to link the test cases to the corresponding Requirements in the Requirement
section
ƒ How to execute the manual test cases in the ExecutionList section
ƒ How to interpret the test results and create a basic report in the ExecutionList
section

58
MANUAL TESTING

Prerequisite

Objective
¾ Fully prepared workspace.

Why is this important?


¾ To enable you to use Tosca to test the web shop sample application manually.

Instructions
1. Open Tosca Commander.

2. Open your training workspace.

3. Click on the Import Subset Icon (in the menu bar).

4. Choose and Import the Subset BaseStructureSubset.

5. Move all imported elements out of the Import folder, in order to only see the
folder structure beneath.

6. Save your changes.

Hints
¾ During the Risk Priority Assessment Module of our TCP Training we have built a
complete Requirement Structure for our project.
¾ We prioritized our Requirements and saw that the Requirement View inside of
the RequirementSet Webshop | Non-functional had the highest contribution.

Further learning material


 Presentation: Manual Testing
™ n/a

59
MANUAL TESTING

Exercise 1 | Create a manual test case

Objective
¾ Creation and execution of a TestCase containing only manual TestSteps.

Why is this important?


¾ This exercise gives an overview of the structures and elements used in the
TestCase section in Tosca Testsuite

Instructions
1. Familiarize yourself with the ordering process by choosing products according
to the business context below.

2. Go to the folder Webshop | Frontend > Product > Order process > Manual.

3. Create a TestCase called Frontend | Order process | 2 products.

4. It is only necessary to place items in the shopping cart and not complete the
whole order process.

5. Empty the shopping cart at the end of your TestCase.

6. Create the applicable TestSteps and TestStepValues within the TestCase to


reflect this process. Use TestStepFolders to organize your TestSteps from a
business perspective.

7. Save your changes.

Business context
¾ Add the item “Blue Jeans” to your Shopping cart twice. (Quantity: 2) This product is in
the category “Apparel & Shoes”.
¾ Also add the item “Casual Golf Belt” to your Shopping cart twice. This product is also in
the category “Apparel & Shoes”.

Hints
¾ The use of short and precise descriptions for test instructions (e.g. name of
Manual TestStepValue, entry in Value field) is advised.
¾ When running a TestCase in the Scratchbook, do not change the default values
in the Execution Settings.
¾ When using multiselect to select multiple TestSteps for Scratchbook execution,
be careful to select the TestSteps in the correct sequence of execution.
¾ Using the format {CLICK} in the Value field for instructing the tester when to click
in a TestStep is a handy way of getting used to the Tosca syntax.

60
MANUAL TESTING

Further learning material


 Presentation: Manual Testing
™ Video 1: Create elements manually

61
MANUAL TESTING

Exercise 2 | ActionMode Verify (manual) 1

Objective
¾ Creation of a TestCase which verifies the total quantity of chosen products.

Why is this important?


¾ This exercise introduces the ActionMode Verify and you will see how to make a
comparison between a current value (value in system under test) and an
expected value (value in Tosca).

Instructions
1. Change the TestCase that was created in the previous exercise by adding a
TestStep which will verify the correct quantity of products (4) is displayed in the
shopping cart.

2. Run the TestCase in the Scratchbook.

3. Save your changes.

Further learning material


 Presentation: Manual Testing
™ Video 2: ActionMode Verify (manual) 1

62
MANUAL TESTING

Exercise 3 | ActionMode Verify (manual) 2

Objective
¾ Creation of multiple TestCases which verify changes in the GUI of the sample
web shop application.

Why is this important?


¾ This exercise enhances your knowledge and practical application of the
ActionMode Verify.

Instructions
1. In the folder Webshop | Non-functional > GUI > View > Manual, create two
new TestCases. Name the first one: Webshop | View | # Products. Name the
second one: Webshop | View | Price: Low to High.

2. In the TestCase Webshop | View | # Products, change the number of products


displayed from default (“8”) to “12”.

3. Verify if the display changes accordingly.

4. In the TestCase Webshop | View | Price: Low to High, change how the
products are sorted from default (“Position”) to “Price: Low to High”.

5. Verify if the sorting has been changed and the products are arranged
accordingly.

6. Save your changes.

Further learning material


 Presentation: Manual Testing
™ Video 3: ActionMode Verify (manual) 1

63
MANUAL TESTING

Exercise 4 | Link manual TestCases to Requirements

Objective
¾ Creation of TestCase Links between TestCases and Requirements.

Why is this important?


¾ This exercise shows how to track the test process in the Requirements section.

Instructions
1. Organize the Tosca Commander view in such a way that you can see both the
Requirements and the TestCase sections.

2. Drag and Drop the TestCases created in the previous exercise to the
corresponding Requirement in the RequirementSet Webshop | Non-
functional.

3. Add the Column Coverage Specified via the Column Chooser and observe the
results.

4. Toggle through the TestCaseWorkstates (PLANNED, IN_WORK, COMPLETED) of


your TestCases in the Properties tab of each corresponding TestCase.

5. Observe the impact on the results in the Column Coverage Specified in the
Requirements section.

6. Make sure the TestCaseWorkstate of each TestCase is COMPLETED.

7. Save your changes.

Hints
¾ The user is responsible to specify the TestCaseWorkState.
¾ The TestCaseWorkStates are calculated (with regards to the Coverage
Specified) as follows:
¾ PLANNED: 20%
¾ IN_WORK: 50%
¾ COMPLETED: 100%
¾ Coverage Specified is calculated using the formula: TestCaseWorkstate [%] x
Relative Weight [%].

Further learning material


 Presentation: Manual Testing
™ Video 4: Link TestCases to Requirements

64
MANUAL TESTING

Exercise 5 | Creating an ExecutionList

Objective
¾ Creation of an ExecutionList.

Why is this important?


¾ This gives an overview of the structures and elements used in the ExecutionList
section.

Instructions
1. Organize the Tosca Commander view in such a way that you can see both the
TestCases and the ExecutionLists sections.

2. In the ExecutionListFolder Webshop | Non-functional >> GUI >> Manual create


an ExecutionList and name it “View”.

3. Add the TestCases already linked to the Requirements to the ExecutionList


using drag and drop and analyze what happens.

4. Save your changes.

Hints
¾ All test data is contained in the TestCases section.
¾ The ExecutionEntry is a direct link to a TestCase (Jump to TestCase) and will use
applicable test data, as defined in the TestCase during execution.
¾ It is possible to temporarily disable ExecutionEntries within an ExecutionList.
This can be done using the [F7] button.

Further learning material


 Presentation: Manual Testing
™ Video 5: Building an ExecutionList

65
MANUAL TESTING

Exercise 6 | Link ExecutionList to RequirementSet

Objective
¾ ExecutionList linked to the corresponding RequirementsSet.

Why is this important?


¾ This exercise shows you how to project execution results onto the Requirements
section.
¾ The significance of the Requirements section becomes apparent as all results
can be viewed here.

Instructions
1. Drag and Drop the ExecutionList View onto the corresponding
RequirementSet Webshop | Non-functional in the Requirements Section.

2. Add the Columns Execution State and Coverage Executed in preparation for
the next exercise.

3. Save your changes.

Hints
¾ It is only possible to link an ExecutionList to a RequirementSet.
¾ Multiple ExecutionLists can be linked to a single RequirementSet.

Further learning material


 Presentation: Manual Testing
™ Video 6: Link ExecutionLists to RequirementSets

66
MANUAL TESTING

Exercise 7 | Executing an ExecutionList

Objective
¾ Running an ExecutionList.

Why is this important?


¾ Here you will see how the test results will be displayed and their significance.

Instructions
1. Select the ExecutionList View and select the command Run as Manual
TestCase in the context menu.

2. After execution, analyze the results at the level of the ExecutionList View.

3. Also observe the results at the level of the RequirementSet Webshop | Non-
functional within the Requirements section.

4. Save your changes.

Hints
¾ Test results within the ExecutionLists section will automatically update the
results of linked ExecutionEntries in the Requirements section.
¾ The weight of a Requirement and TestCase Link is crucial when interpreting the
results displayed in the Requirements section.

Further learning material


 Presentation: Manual Testing
™ Video 7: Executing an ExecutionList

67
MANUAL TESTING

Exercise 8 | Print a report

Objective
¾ Creation of a report from the ExecutionList section and a report from the
Requirements section as two separate pdf files.

Why is this important?


¾ This exercise shows you a simple way of creating Reports, which is a standard
task that will often be required in your test project.

Instructions
1. Expand the ExecutionList View to show all of the ExecutionEntries.

2. Click on the printer symbol on the top right corner of the window in the
ExecutionLists section.

3. Choose “Adobe PDF Format” in the Print Options dialog.

4. View the pdf.

5. Switch to the Requirements section.

6. Expand the RequirementSet Webshop | Non-functional you have connected


the ExecutionList to.

7. Click on the printer symbol on the top right corner of the window of the
Requirements section.

8. Choose Print as pdf in the Print options dialogue.

9. View the pdf.

Hints
¾ In such case that a pdf reader is not installed on the computer, please choose
Preview as the preferred output format.
¾ Tosca also includes a license for the List & Label Report Designer, which can be
started directly from the Tosca Commander.
¾ For further information on creating custom reports please contact Tricentis.

Further learning material


 Presentation: Manual Testing
™ Video 8: Print a report

68
MANUAL TESTING

Summary

What have you learned?


¾ How to create and execute manual test cases in the TestCases and ExecutionList
section.
¾ How to generate a basic report containing the test results.

Objectives achieved
¾ Creation of manual test cases for the web shop sample application.

¾ Linking the TestCases to their corresponding Requirements.

¾ Execution of manual test cases using the Checklist.

¾ Generation of basic reports containing the test results.

What’s next?
1. Test your knowledge by taking the Manual Testing online exam.
2. Continue with exercises for Automated Testing.

69
MANUAL TESTING

Notes

70
AUTOMATED TESTING
AUTOMATED TESTING

6 AUTOMATED TESTING
Table of Contents
Introduction ............................................................................................................. 72
Prerequisite .............................................................................................................. 74
Exercise 1 | Creation of a Module ......................................................................... 76
Exercise 2 | Creation of a TestCase....................................................................... 78
Exercise 3 | Use of the ActionMode Buffer .......................................................... 80
Exercise 4 | Use of the ActionMode Verify 1 ........................................................ 81
Exercise 5 | Use of the ActionMode Verify 2 ........................................................ 82
Exercise 6 | Use of Dynamic Values 1 ................................................................... 84
Exercise 7 | Use of Dynamic Values 2 ................................................................... 85
Exercise 8 | Templates 1 ........................................................................................ 86
Exercise 9 | Templates 2 ........................................................................................ 88
Exercise 10 | Link TestCases to Requirements .................................................... 90
Exercise 11 | Building an Execution List ............................................................... 92
Exercise 12 | Link ExecutionList to RequirementSet........................................... 93
Exercise 13 | Executing an Execution List ............................................................ 94
Exercise 14 | Print a Report ................................................................................... 95
Exercise 15 | Final Exercise – all Sections ............................................................. 96
Summary .................................................................................................................. 97
Notes ......................................................................................................................... 98

Introduction

The Automated Testing exercises will guide you through the process of creating
automated test cases.
You will use Cross Browser Test Automation for creating those TestCases. Some of
the already prepared Modules that you will use have been created using the
Browser Engine – you can mix those two kinds of Module as necessary.
You will learn
ƒ How to scan the sample web shop application and define the basis for steering
the sample application
ƒ How to create automated test cases with and without a test case design
structures

72
AUTOMATED TESTING

ƒ How to link the test cases to the corresponding Requirements in the Requirement
section
ƒ How to execute the automated test cases in the ExecutionLists section
ƒ How to interpret the test results and create a basic report in the ExecutionLists
section

73
AUTOMATED TESTING

Prerequisite

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

Why is this important?


¾ Enable us to use Tosca for automated testing the web shop sample application.
¾ We are going to add a new user in the web shop sample application which we
are going to use for test automation in the training. For this user we are going to
add a total of two shipping addresses.

Instructions
1. Start the web shop sample application in Internet Explorer.

2. Click on “Register” (red button, on the top right corner of the page). You are
now redirected to the “Register” page.

3. Fill in the mandatory fields with the data provided below in the business
context.

4. Click on “Register” and go to your account, by clicking on the E-mail-Address


you just provided (red button, on top).

5. Add a new address by clicking on Addresses>>Add new.

6. Fill in the same data in the address as the one provided for registering, adding
the information required, detailed in the Business context below.

7. Save the new address.

8. Create a second address to your account by clicking on “Add new” and


repeating the steps 6 and 7.

This time use another first name: “Tosca-First Name”.

9. Click on “Logout” (red button, on the top middle/right).

Business context (mandatory for automated test execution)


We will need one new user with two shipping addresses to enable us to run all the
TestCases we are building during this training.
It is very important to follow the naming convention provided hereafter. Otherwise the
TestCases will fail.
ƒ Gender: ................. female
ƒ First name: ............ Test
ƒ Last name: ............ enter your name

74
AUTOMATED TESTING

ƒ 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!
ƒ Country: ................ Austria
ƒ City: ........................ Vienna
ƒ Address 1: ............. Viennastreet
ƒ Zip: ......................... 1234
ƒ Phone: ................... 00 11 22 33 44 55

Further learning material


 Presentation: Automated Testing (Cross Browser Test Automation)
™

75
AUTOMATED TESTING

Exercise 1 | Creation of a Module

Objective
¾ A Module, which allows to steer certain controls in the sample web shop
application automatically, is available.

Why is this important?


¾ This exercise will show you the basic functionality of the Tosca XScan and
enhance your understanding of the principles of test automation with Tosca.
¾ The Tosca XScan will be used to scan the Login screen of the web shop sample
application.

Instructions
1. Open the web shop sample application.

2. Navigate to the Login screen.

3. Start the Tosca XScan by right-clicking on the folder Customer >> Login in the
Modules section and choosing Scan Application >> Browser.

4. In the XScan window, select the tab where the Login screen is open and click
on start.

5. Select and rename the necessary controls as seen in the screenshot below.
Use names that correspond to the business function of the controls.

6. Rename the root element of the Module Login page.

7. Click on save to save your Module.

8. Close the XScan window.

9. Save your changes.

Hints
¾ On the right-hand side of your open XScan window you can check the various
control states of a control once it has been selected. For example, you can view
if a control is enabled or visible at the time of scanning.
¾ If you do not see the property you are looking for, click on load all properties.

76
AUTOMATED TESTING

Further learning material


 Presentation: Automated Testing (Cross Browser Test Automation)
™ Video 1: Creation of a Module

77
AUTOMATED TESTING

Exercise 2 | Creation of a TestCase

Objective
¾ Have a technically sound and working TestCase.

Why is this important?


¾ This exercise will enable you to create TestCases in Tosca by using modules in
the right order and the usage of the ActionModes DoNothing and Input.
¾ The modules in the workspace are used to create a single TestCase that will run
through the complete order process of the web shop sample application as a
basis for our future automation process.

Instructions
1. Create a TestCase called Webshop Order | Basic in the folder Webshop |
Frontend >> Product >> Order Process >> Automated.
2. Go to the Tab Test Configuration
3. Right click on the TestCase and choose Create>>Test configuration parameter
4. For the Test configuration parameter Name, enter: ”Browser”
5. For the Test configuration parameter Value, enter: ”InternetExplorer”
6. Please follow the path through the application as follows:
¾ Log in to the application
¾ Put the smartphone to the shopping cart
¾ Go to the shopping cart
¾ Complete the checkout process
¾ Look at the order details
¾ Log out of the application
7. Use the following Modules to get started with building the TestCase:
¾ Navigation | Top Menu Æ Click on “login”.
¾ Login page Æ Fill in “username” and “password”, click on “login”.
¾ Navigation | Product Choice Tabs Æ Click on “electronics”.
¾ Electronics Page Æ Click on “cell phones”.
¾ Cell Phone Page Æ Add “smartphone” to cart.
¾ Navigation | Top Menu Æ Click on “shopping cart”.
¾ Shopping Cart | Physical Objects Æ Check “terms of service agreement”,
click on “checkout”.

78
AUTOMATED TESTING

8. Organize all TestSteps in TestStep folders, in order to have a better overview of


the TestCase.
9. Complete your TestCase by using the data combinations provided in the
business context section below.
10. Run your TestCase in the Scratchbook to check it´s functionality.
11. Set the TestCaseWorkstate at the properties of your TestCase to In_Work.
12. Save your changes.

Business context
¾ Product: Smartphone
¾ Payment method: Credit Card
¾ Shipping method: by ground
¾ Billing and Shipping address: leave blank in Tosca (this automatically chooses the
default value of a drop-down list)
¾ Card type: Visa
¾ Cardholder name: Steven Bowen
¾ Expiration date: next month, next year
¾ Card number: 4485564059489345
¾ Card code: 123

Hints
¾ Modules are assigned to a TestCase by Drag&Drop (this creates a TestStep).
¾ By using the command Run in Scratchbook you can always check if your
TestCase is working so far even while you are building it. This is a very powerful
tool during the creation of TestCase – but it does not save any results!
¾ At the properties of a TestCase you can set the TestCaseWorkstate to three
different states. This influences the Test Coverage shown in the Requirements
section when conncted. The three workstates are:
¾ PLANNED
¾ IN_WORK
¾ COMPLETED

Further learning material


 Presentation: Automated Testing (Cross Browser Test Automation)
™ Video 2: Creation of a TestCase

79
AUTOMATED TESTING

Exercise 3 | Use of the ActionMode Buffer

Objective
¾ Save a value from the web shop sample application for later use.

Why is this important?


¾ This exercise will show you the basic functionality of the ActionMode Buffer to
enable you to use it whenever necessary in Tosca.
¾ The already created TestCase will be modified to buffer the price of the
smartphone on the cell phone page.

Instructions
1. Copy the TestCase Webshop Order | Basic and name the copy “Webshop Order
| Buffer”.

2. Buffer the price of the smartphone on the cell phone page.

3. Add TestSteps if necessary.

4. Change the ActionMode of the relevant TestStepValue to Buffer.

5. Change the Value of the same TestStepValue to Price | Cell phone.

6. Run the TestCase in the Scratchbook.

7. Check if the Buffer was saved correctly.

8. Save your changes.

Hints
¾ You can look up all the buffered values currently in your system by going to Tools
>> Settings >> Engine.
¾ If you are buffering a value from a table, the name of the buffer must be written
into the TestStepSubValue Action.

Further learning material


 Presentation: Automated Testing (Cross Browser Test Automation)
™ Video 3: Use of the ActionMode Buffer

80
AUTOMATED TESTING

Exercise 4 | Use of the ActionMode Verify 1

Objective
¾ Have a TestCase that uses the previously created buffer to verify a
corresponding value.

Why is this important?


¾ This exercise will show you the basic functionality of the ActionMode Verify and
the principles of the Tosca table steering.
¾ The already created TestCase will be modified to verify the product’s price added
to the shopping cart.

Instructions
1. Make sure the shopping cart is empty before running the TestCase.

2. Copy the TestCase Webshop Order | Buffer and name the copy “Webshop
Order | Verify 1”.

3. Verify the price of the product in the shopping cart. This can be found in the
table Price, row Sub-total, column #2. The required ActionProperty is
InnerText.

4. Add TestSteps if necessary.

5. Change the ActionMode of the relevant TestStepValue to Verify.

6. Change the TestStepSubValues accordingly.

7. Run the TestCase.

8. Save your changes.

Business context
¾ The price is displayed again in the shopping cart.

Hints
¾ Always remember to set the ActionProperty.
¾ Stored buffer values can be used at any stage during test execution:
{B[name of saved variable]}.

Further learning material


 Presentation: Automated Testing (Cross Browser Test Automation)
™ Video 4: Use of ActionMode Verify 1

81
AUTOMATED TESTING

Exercise 5 | Use of the ActionMode Verify 2

Objective
¾ Have a TestCase that verifies the control properties (e.g. visibility, colour,
existence…) of a given control.

Why is this important?


¾ This exercise will enable you to verify if a certain control’s properties are as
expected.
¾ The already created TestCase will be modified to verify if the checkbox for
agreeing to the web shops terms of service has certain predefined properties.

Instructions
1. Copy the TestCase Webshop Order | Basic and name the copy “Webshop Order
| Verify 2| Button”.

2. Copy the TestStepValue Agreement Button three times.

3. Change the ActionMode of all three TestStepValues to Verify.

4. Check the business context section below for all the properties that need to be
verified.

5. Run the TestCase.

6. Save your changes.

Business context
¾ The control “I agree with the terms of service and I adhere to them unconditionally” on
the shopping cart page must be:
¾ Enabled
¾ Visible
¾ Not checked (not selected)

Hints
¾ The following values need to be set to verify if the control is enabled:
¾ ActionProperty: Enabled
¾ Value: True
¾ The values entered in the fields ActionProperty and Value are case sensitive.

82
AUTOMATED TESTING

Further learning material


 Presentation: Automated Testing (Cross Browser Test Automation)
™ Video 5: Use of ActionMode Verify 2

83
AUTOMATED TESTING

Exercise 6 | Use of Dynamic Values 1

Objective
¾ Have a TestCase that automatically sets a new and random numeric value at a
given place every times it runs.

Why is this important?


¾ This exercise will show you the basic functionality and principles of Dynamic
Values in Tosca.
¾ The basic TestCase will be modified to always set the zip code on the shopping
cart page to a random 4 digit number.

Instructions
1. Copy the TestCase Webshop Order | Basic and name the copy “Webshop Order
| RND“.
2. Set the zip code on the shopping cart page to a random 4 digit number.
3. Add TestSteps if necessary.
4. Change the value of the relevant TestStep to {RND[4]}.
5. Run the TestCase.
6. Save your changes.

Hints
¾ It is possible to combine this with set values or other dynamic values. For
example, 001 {RND[3]} {RND[6]} will give you an U.S. American phone number
with a 3 digit prefix and a 6 digit number.

Further learning material


 Presentation: Automated Testing (Cross Browser Test Automation)
™ Video 6: Use Of Dynamic Values 1

84
AUTOMATED TESTING

Exercise 7 | Use of Dynamic Values 2

Objective
¾ Have a TestCase that automatically sets a date a given amount of time in the
future – always calculated from the day your test runs.

Why is this important?


¾ This exercise will enable you to create time independent TestCases in Tosca.
¾ An already existing TestCase will be modified to always set the expiration date
of a credit card to the future, to enable said TestCase to run at a later date
without modifying the credit card’s expiration date any more.

Instructions
1. Copy the TestCase Webshop Order | RND and name the copy “Webshop Order
| Expiration date“.
2. At the time of the checkout, set the expiration date of a credit card to 2 months
and 3 years in the future with the help of dynamic values.
3. Add TestSteps if necessary.
4. Change the value of the relevant TestSteps by using the command {DATE[][][]}
5. Run the TestCase.
6. Save your changes.

Hints
¾ You can add or subtract Years (y), Months (M) or Days (d) from any given date
function in Tosca. This calculation is always based on your system date.

Further learning material


 Presentation: Automated Testing (Cross Browser Test Automation)
™ Video 7: Use Of Dynamic Values 2

85
AUTOMATED TESTING

Exercise 8 | Templates 1

Objective
¾ A basic Template connected to a TestSheet to build on in further exercises.

Why is this important?


¾ This exercise will enable you to use data provided in a TestSheet for your
TestCase – making them data driven TestCases.
¾ A Template will be used to create several new TestCases filled with data provided
by the previously created TestSheet.

Instructions
1. Copy the TestCase Webshop Order | Expiration date and name the copy
“Webshop Order | Template 1“.
2. Set the TestCaseWorkstate to COMPLETED.
3. Use the command convert to Template out of the context menu.
4. Arrange the Tosca windows in a way that you can see both the TestCase and the
TestCase Design sections.
5. Go to the TestSheet Webshop | Frontend | Order process in the folder
Webshop | Frontend >> Product.
6. Connect the TestSheet to the Template.
7. In your TestSheet, navigate to the Attribute: Precondition >> Customer >>
Customer Data. Change the email address that is currently written in the Sub-
Attribute Value | Username to the email address you used when registering.
8. Link the corresponding Attributes / Instances to the TestStepValues and
TestStepSubValues in your TestSheet. Please note, that if a value field is already
populated, the value should first be deleted:

TestCase Design Attribute TestStepValue

Precondition > Customer > TestStep Login page TestStepValue


Customer Data > Value | Username Email

Precondition > Customer > TestStep Login page TestStepValue


Customer Data > Value | Password Password

Purchasing process > Order Details TestStep Checkout | Billing Address


> Billing Address > Values > TestStepValue Select billing address
Address Name

Purchasing process > Order Details TestStep Checkout | Shipping


> Shipping Address > Value Address TestStepValue Select
shipping address

86
AUTOMATED TESTING

9. The process is however not yet complete. Complete this process for all
remaining TestStepValues in your Template.

The corresponding Attributes of your TestSheet are the values under:


Purchasing process >> Order Details >> Shipping Method, Purchasing process >>
Order Details >> Payment method and the Verifications.

10. Check your Template by using the Check Template command out of the
context menu.

11. Use the command Create > TemplateInstances to create your TestCases.

12. Have a look at your InstanceFolder and the TestCases inside.

13. Run the first two them in the Scratchbook.

14. As you see, only the first TemplateInstance is able to run through the
application – how to solve this problem will be shown in the next exercise.

15. Save your changes.

Hints
¾ For connecting a TestSheet to a Template you have to drag & drop the
TestSheet to a Template. Only one TestSheet can be connected to one
Template. A TestSheet may however be connected to several Templates.
¾ When connecting a TestSheet to a Template you might get a message about
ambiguous names. This message tells you that there are several Attributes on
the TestSheet with the same name, meaning Tosca cannot connect them
automatically.
¾ The imported TestSheet is based on the TestSheet you’ve created in the TCD
module. It has been detailed by the business unit of the company in order to
have all the necessary information inside.
¾ Always use Check Template before creating TemplateInstances.
¾ You can either link the Attributes by using drag & drop operations from the
TestSheet to the Template or link them manually by using the syntax:
{XL[Attribute]} – [XL[Verifications.Messages]}.
¾ The TestCase Design gives you a unique test focus, which is reflected in your
verifications. Building a TestCase without any verifications will most likely not
fulfill your test focus.

Further learning material


 Presentation: Automated Testing (Cross Browser Test Automation)
™ Video 8: Templates 1

87
AUTOMATED TESTING

Exercise 9 | Templates 2

Objective
¾ Have a Template that uses conditions to cover different branches in the
application.

Why is this important?


¾ This exercise will enhance your knowledge of Templates in Tosca, enabling you
to combine more Instances of your TestSheet into a single Template – helping
you to keep your workspace smaller and easier to maintain.
¾ The previously built Template will be modified by using conditions, reflecting
the process for ordering a notebook.

Instructions
1. Copy the Template Webshop Order | Template 1 and name the copy “Webshop
Order | Template 2“.

2. Modify your Template, to also reflect the order process for ordering a notebook.
You can find information / data about this process in the TestSheet.

3. The Instance reflecting this process is called Notebook.

4. Set conditions on the TestSteps or TestStepfolders where necessary:

¾ Instantiation == "Exercise 9" on the Template

¾ 'Purchasing process.Product Selection.First product type' == "Cell phone"


on the TestSteps / TestStepFolders regarding the order of a smartphone

Complete this process by setting all necessary Conditions.

5. Check your Template.

6. Create the TemplateInstances and have a look at your InstanceFolder and the
TestCases inside.

7. Run them in the Scratchbook.

8. Save your changes.

Hints
¾ To set a condition, add the column condition via the column chooser. A
condition is set by dragging & dropping an Instance from the connected
TestSheet column into the row of your TestStep / TestStepFolder within the
Template.

88
AUTOMATED TESTING

¾ You can also set conditions manually, by using the syntax:


“<BusinessObject/Attribute><Boolean operator><Value>.
¾ i.e. ‘City’==“Vienna” or ‘Address.City’==“Vienna”.

Further learning material


 Presentation: Automated Testing (Cross Browser Test Automation)
™ Video 9: Templates 2

89
AUTOMATED TESTING

Exercise 10 | Link TestCases to Requirements

Objective
¾ TestCaseLinks at the correct Requirements.

Why is this important?


¾ This exercise will increase your understanding of the relationship between the
different sections within the Tosca Testsuite.
¾ The TestCases automatically created in the previous exercise, will be linked to
the corresponding Requirement.

Instructions
1. Arrange the Tosca windows in a way that you can see both the Requirements
and the TestCase sections.

2. Drag and Drop the TestCases out of your second TemplateInstance folder
created in Exercise 9 onto the Requirement Webshop | Frontend >> Product >>
Order Process in the Requirements Section.

3. Add the Column Coverage Specified.

4. View the Coverage.

5. Change the TestCaseWorkstates of your TestCases to see what changes.

6. Set the TestCaseWorkstates back to COMPLETED.

7. Save your changes.

Hints
¾ The TestCaseWorkStates are weighted (in regard to the Coverage Specified) as
follows:
¾ PLANNED: .... 20%
¾ IN_WORK: ..... 50%
¾ COMPLETED: 100%
¾ Coverage Specified is calculated by the formula: TestCase Workstate [%] x
Relative Weight [%].
¾ The TestCaseWorkState can be changed at the properties tab of any given
TestCase or Template. A TemplateInstance will inherit the Template´s
Workstate.

90
AUTOMATED TESTING

¾ In the Column Required TestCases you are shown the number of TestCases you
need to create for every Requirement – based on the Instances built and
connected from the TestCaseDesign section.

Further learning material


 Presentation: Automated Testing (Cross Browser Test Automation)
™ Video 10: Link TestCases to Requirements

91
AUTOMATED TESTING

Exercise 11 | Building an Execution List

Objective
¾ Creation of a ready-to-run ExecutionList.

Why is this important?


¾ This exercise will enable you to use the Execution List section of Tosca.
¾ The previously built TestCases will be used to create an ExecutionList.

Instructions
1. Arrange the Tosca windows in a way that you can see both the TestCases and
the ExecutionLists sections.

2. Switch to the ExecutionLists section and within the section select the folder
Webshop | Frontend >> Product >> Automated.

3. Create a new ExecutionList and name it ”Webshop Order | Basic Order”.

4. Go to the tab Test configuration.


5. Right-click on the ExecutionList and choose Create >> Test configuration
parameter.
6. For the Test configuration parameter Name, enter Browser.
7. For the Test configuration parameter Value, enter InternetExplorer.

8. Add the TestCases created in Exercise 9 to the ExecutionList, using drag &
drop.

9. Save your changes.

Hints
¾ You can always disable ExecutionEntries inside your ExecutionLists by using the
command Disable or the key [F7], if you don´t want to run them without
deleting them from the ExecutionList.
¾ If you do not set a Test configuration parameter for the ExecutionList, the
parameter that was set for the TestCase will be the one used.

Further learning material


 Presentation: Automated Testing (Cross Browser Test Automation)
™ Video 11: Building an Execution List

92
AUTOMATED TESTING

Exercise 12 | Link ExecutionList to RequirementSet

Objective
¾ Connect the ExecutionList to the corresponding RequirementsSet

Why is this important?


¾ This exercise will increase your understanding of the relations between the
different sections within the Tosca Testsuite and allow you to interpret the
results of your test.
¾ The previously built ExecutionList will be linked to the corresponding
RequirementSet.

Instructions
1. Drag and Drop the ExecutionList onto the corresponding RequirementSet in
the Requirements Section.
2. Save your changes.

Further learning material


 Presentation: Automated Testing (Cross Browser Test Automation)
™ Video 12: Link ExecutionList to RequirementSet

93
AUTOMATED TESTING

Exercise 13 | Executing an Execution List

Objective
¾ Running an ExecutionList to analyze and report the execution results.

Why is this important?


¾ This exercise will enable you to run ExecutionLists in Tosca, using the different
options in the exception handling for whatever purpose at hand.
¾ Run the ExecutionList built in Exercise 12 while setting the exception handling in
a way that ensures us to be able to leave the computer alone.

Instructions
1. Run the ExecutionList.
2. View the results.
3. Go back to the Requirements Section.
4. Add the Columns Execution State and Coverage Executed.
5. View both.
6. Save your changes.

Hints
¾ The results you see in the column Execution State differ from the results you
see in the ExecutionList section because the risk assessment / weight of the
Requirements is taken into account.
¾ When using more than one ExecutionList for a RequirementSet, you can
change the Result Aggregation at the Properties of the RequirementSet. You
have two options:
¾ First: will take only the first ExecutionList into account.
¾ Each: will combine the results.
¾ This only applies for ExecutionEntries that are in more than one of those lists.
If you have ExecutionEntries only in one of those lists, they will be taken into
account no matter what.

Further learning material


 Presentation: Automated Testing (Cross Browser Test Automation)
™ Video 13: Executing an ExecutionList

94
AUTOMATED TESTING

Exercise 14 | Print a Report

Objective
¾ Have a report of the ExecutionList section and a report of the Requirement
section printed as pdf files.

Why is this important?


¾ This exercise will enable you to print a report from the execution list section as
well as from the requirements section.
¾ Using the Tosca Reporting Function to create two reports of our web shop
testing project – one purely to show the results of the ExecutionList we ran and
one of the weighted results in the Requirements section.

Instructions
1. Expand the ExecutionList to show the ExecutionEntries.
2. Click on the printer symbol on the top right of the ExecutionList section.
3. Print as pdf, take a look at the pdf.
4. Switch to the Requirements section.
5. Expand the RequirementSet you have connected the ExecutionList to.
6. Click on the printer symbol on the top right of the Requirements section.
7. Print as pdf, take a look at the pdf.
8. Compare both reports.
9. Save your changes.

Hints
¾ Tosca also includes a license for the List & Label Report Designer, which you
can start directly from the Tosca Commander. We suggest to contact Tricentis
for building custom reports.

Further learning material


 Presentation: Automated Testing (Cross Browser Test Automation)
™ Video 14: Print a Report

95
AUTOMATED TESTING

Exercise 15 | Final Exercise – all Sections

Objective
¾ Have an increased test portfolio, created out of the already existing Template.

Why is this important?


¾ Making you proficient in using the TestCase Section of Tosca and sharpen your
understanding of the relations between all sections of the Tosca Testsuite.
¾ Modifying the existing Template to include all the necessary steps to reflect 2
additional Instances, running them and analyzing the result.

Instructions
1. Copy the Template Webshop Order | Template 2 and name the copy ”Webshop
Order | Template Final”.
2. Modify your Template, to reflect the order of a digital download, as well as the
order of a product that costs between $2 and $49. You can find information /
data about this process in the TestSheet in the Instances Digital Download and
Price (1,50) or Price 2-49. These two Instances are marked, at the Attribute
Instantiation, as Exercise 15.
3. Modify the template Webshop Order | Template Final by using all necessary
modules and conditions to cover the two cases.
4. Create the TemplateInstances.
5. Connect them to corresponding Requirement.
6. Update your ExecutionList.
7. Run the ExecutionList.
8. Review the results.

Business context
¾ Digital Download
¾ Pay attention to this TestCase, as the the way through the checkout will differ to the
one we’ve seen so far.
¾ Price (1,50)
¾ With this TestCase, we want to make sure that the shipping costs are applied. You
can verify the shipping costs in your shopping cart.

Further learning material


 Presentation: Automated Testing (Cross Browser Test Automation)
™ Video 15: Final Exercise

96
AUTOMATED TESTING

Summary

What have you learned?


¾ How to create and execute automated test cases - with and without test case
design structures - in the TestCases and ExecutionList section.
¾ How to generate a basic report containing the test results.

Objectives achieved
¾ Creation of Modules using the Tosca XScan as a basis for automated testing.

¾ Understanding of different techniques of creating automated test cases.

¾ Creation of automated test cases for the web shop sample application.

¾ Linking the TestCases to their corresponding Requirements.

¾ Execution of automated test cases in the ExecutionLists section.

¾ Generation of basic reports containing the test results.

CONGRATULATIONS!
You have completed all exercises required to become a professional Tosca user!

What’s next?
1. Test your knowledge by taking the Automated Testing (Cross Browser) online
exam.
2. Should you wish to increase your Tosca skills, Tricentis offers you the possibility
of doing additional exercises which can be found in the Student Case Scenario
Workbook available for download on our learning platform.

97
AUTOMATED TESTING

Notes

98
GLOSSARY

7 GLOSSARY
Frontend User interface (presentation layer) between the
user and the back end

Backend Data access layer

The front end faces the user, and the back end
launches the programs of the operating system in
response.

99

Você também pode gostar