Zephyr details - abeedal/Abeedal GitHub Wiki

Test Script Tab

Test Script When Test script tab is selected the default view is Type: Step-by-Step, we DO NOT use this Type so you must select BDD - Gherkin from the Type Drop Down

This is where the test steps (Gherkin) are added, these test steps follow the exact same rules that exist when adding scenarios to a feature file

Language use

First person “I” must be used rather than 3rd person “user”

Use “I navigated to” rather than “go to” / “am on” / “can see”

Use “Select” rather than “Click” or “Tap” as this is generic across both Web & App

Use CTA rather than “Button” or “Link” as this is generic across both Web & App, and less likely to change should the UI / Design change.

Steps need to always be definititve and use “Will”, “Must”, “Can”, “is” the world “Should” must never be used

Steps define the actions and validations of the test and mirror the Acceptance criteria (AC) of a user story

Given steps define state, i.e. where the app needs be to be to complete the step. This can include Data setup, user navigation, must not duplicate but can override a Background Step (e.g load specific data or Navigate to a new screen) and always assume that the Background step is the starting state of the test

Given "Sweet Leaf" is a non-runner

Given I have navigated to the "12:15" race at 'App Tampa Bay' racecard

Given I have added '3' selections to the betslip

Given I am logged into When steps define an action/interaction that must happen to enable the test to complete. These are always specific and singular, e.g click a button, set a value, navigate to a particular piece of data,

When I select 'Betslip' CTA from the Navigation bar

When I enter an amount into the single bet on the betslip

When the Next Race CTA is Selected When statements can be optional if the Given statement(s) get the to the app/data state required without another specific action

Given I have navigated to the "12:15" race at 'App Tampa Bay' racecar And runner "Sweet Leaf" is a non-runner Then runner 'Sweet leaf" is displayed as a non-runner Then steps define a particular validation(s) that needs to occur (e.g. X data is displayed, X element is in a selected state,, user is return to X Screen)

Then runner "Sweet Leaf" is shown as a non-runner on the racecard

Then the EW returns are correctly calculated

Then the Next race is displayed And steps are expansion of Given / Then steps only and must follow the same rules when applied to each. 'And' Statements must never be used to extend a When step.

Given I have navigated to the "12:15" race at 'App Tampa Bay' racecar And runner "Sweet Leaf" is a non-runner

Then the Next race is displayed And the race time is correct

Zephyr Scale supports BDD fully so you can include Examples tables and Data tables in the same way you can when creating a scenario in a feature file.

Examples Table

You do not need to identify a test as a Scenario Outline when writing it, by including an Examples: table in the script, Scale is able to identify the test as an Outline from this.

When including Examples table you should follow the same guidance that have been defined for feature file creation

Use Examples Table, only if the scenario needs to be repeated for a set of distinct values. All scenario outlines must have an

Given I have added selections in the betslip And selections count are displayed in the betslip And the bet types is displayed as Examples: |number|betType | |1 |Single x1 | |2 |Singles x2| |9 |Singles x9|
Naming Table Row headers Example Tables - All tables rows should be named as though they are a coding variable . This means they need to be clear, be related to the value or data element in the UI and be camelCased

Data Tables

Use Data Tables to include more than one parameter across a scenario

when the test needs very specific data to exist

Given I have navigated to the Horse profile for runner "Sweet Leaf"
And the runner has the following Breeding information
|sire     |dam       |damSire | 
|Solitude |Sugar Leaf |Shergar    |
When...
Then...

when the test needs to validation of a specific Data/UI set to be done on a single screen/page.

Given I have navigated to the "12:15" race at 'App Tampa Bay' racecard And "Sweet leaf" is a runner And horse Profile data for runner "Sweet leaf" exists When I select runner "Sweet Leaf" Then the horse profile screen is displayed And I see the following info for "Sweet Leaf" on the horse profile screen | label | value | | horseAge | 5yo | | horseDateOfBirth | (10 Mar 15) | | horseSex | Gelding | | horseColour | Bay or Brown | Naming Table Row headers Data Tables - All tables rows should be named as though they are a coding variable . This means they need to be clear, be related top the value or data element in the UI and be camelCased

Zephyr Scale will validate Gherkin language and will not allow the test to be saved if the format fails validation

Each test MUST only contain one set of Gherkin steps, this is a requirement to enable us to properly integrate zephyr scale with our automation frameworks and Build pipelines via Jenkins. It also enables us to export tests out of scale directly as feature files.

Add label

Traceability Tab

Created by mark.gamble Jul 20, 223 min read 12 people viewed

The Traceability Tab enables us to set the link directly between a test and the Jira Ticket(s) the test is covering.

ALL Tests must link back to a ticket

We only link tests to User Story’s, Tasks and Bugs, this ability to link is generally managed via the Base config, however we need to be aware that the Base config may vary from project to project.

If you have accessed the Create Test form directly from a user story, the traceability will be generated automatically for you by Zephyr Scale

Issues When creating a Issue link there are 2 available options

Create:

Search for existing:

As QA’s we only use the Search for existing option

Once Search for existing is selected you will see a search dialog appear

This enables you to manage what and where you search.

you can set a specific project using the Projects drop down(Defaults to All)

You can run text search

You can search for a Jira Ticket Key (e.g. JP-4018)

You can switch to advanced view and search via JQL (Jira Query Language)

Once you see a list of results / a specific story you select the check box next to the story(s) you wish to create a link to and select add.

This will now display the relevant user ticket in the traceability Issues List

Web Links You can also add a specific web link if the test is relevant to a specif URL, website page etc. This is not an often used option. To do this click on the Search icon

This will open a pretty standard looking Create web link dialog

Enter the relevant URL and a basic description and select Save. This will then add the link to the traceability Web Links list

Add label

Importing tests from CSV

Created by mark.gamble
Last updated: Aug 22, 22
4 min read16 people viewed

Zephyr scale supports the importing of testcases from csv files. This enables us to create lots of test cases in a single location and then import them all at once. This reduces the manual clicks and effort required that might be needed to create many test cases via the create Tests form.

Template

To create an importer for test cases open and save the following Template (XLSX) file

https://docs.google.com/spreadsheets/d/14y_bc7Wy6WANkxUe1CZR_4G8UVlw59zi/edit?usp=sharing&ouid=113762480225117696656&rtpof=true&sd=true - Connect your Google account

open the template above Select File / Create Copy

give the copy a sensible name (e.g. Accounts Tests import.xlsx)

Template Fields

As you will see there are a number of columns that match various fields in the create test case form.

Field Description Example
Project area Specific workstream of the project the test is related to Janus AppPicksWise Web
Feature Area Functional area of the App - needs to match the defined structure here Test case folder structure and naming conventions NavigationAdminBetlslip
User Story ID Jira Key for the User story the test will cover JP-5958AFF-1011
User Story User story Title Ability to search horse name and show results
Folder (auto generated) Sets the location at which the test will be created in the Zephyr scale tests structure, the data in this fields is generated automatically from the previous fields and should never be edited manually N/A
User Story Definition The User story as defined in the Jira Ticket As a Product ownerI want to provide an ability for the user to search for any Horse Profile on Racing Post AppSo that they can quickly view the Horse profile from the Home and Racing Index screen
Scenario Title Scenario Title (as it would be in a feature file) - These MUST be unique per Row The user selects the search icon
Background Preconditional steps Given I am Logged in to a bookmakerAnd I have a valid account Balance
Test Script (BDD) Test Steps to be followed:You can include Exaples tables and data tables here in the same format you would in the create test form or Feature file Given the user is navigated to When the user views the top navigation section on this Then they will see the search icon as per the following designsExamples:|screen||Home||Index|
Automation Tags indicator as to what test suite(s) this test is to be used in - guidance here : Automation Tagging Strategy @SMOKE@INT_GREEN@Manual
Status Initial status of the test on import - Standard is to import as Draft, but if known others can be used too, options are defined in the Test Statuses section of the Base configuration documentation. DraftReadyAutomation CandidateManual
Priority The importance of the test as defined here (TBD) UrgentHigh MediumLow
labels Searchable identifiers to improve ability to search / filter tests when creating test cycles or executing tests. Does not like spaces so keep to single words or replace spaces with '-'  
Approved Boolean value that Indicates test has been reviewed. Should only be true for tests not in Draft state True

It is sensible to create a temp folder in scale to complete the first few imports into so if there are a lot of errors the imported tests can be easily found and either fixed in situ / archived and re-imported. Once import is successful then the tests can be moved to the correct location in the test case structure.

If the Gherkin language is not correctly formatted (i.e. fails Gherkin validation) in the BDD Steps field in the import file, the test will still be imported but the Gherkin will not be added. The import process will throw a list of warnings identifying which tests were imported without steps and these will need to be corrected manually in the test itself. Advise to double check the gherkin steps before completing the import to prevent extra unnecessary effort

 

Add label

Importing tests from CSV

Created by mark.gamble Last updated: Aug 22, 224 min read 16 people viewed Zephyr scale supports the importing of testcases from csv files. This enables us to create lots of test cases in a single location and then import them all at once. This reduces the manual clicks and effort required that might be needed to create many test cases via the create Tests form.

Template To create an importer for test cases open and save the following Template (XLSX) file

https://docs.google.com/spreadsheets/d/14y_bc7Wy6WANkxUe1CZR_4G8UVlw59zi/edit?usp=sharing&ouid=113762480225117696656&rtpof=true&sd=true - Connect your Google account

open the template above Select File / Create Copy

give the copy a sensible name (e.g. Accounts Tests import.xlsx)

Template Fields As you will see there are a number of columns that match various fields in the create test case form.

Field

Description

Example

Project area

Specific workstream of the project the test is related to

Janus App

PicksWise Web

Feature Area

Functional area of the App - needs to match the defined structure here Test case folder structure and naming conventions

Navigation

Admin

Betlslip

User Story ID

Jira Key for the User story the test will cover

JP-5958

AFF-1011

User Story

User story Title

Ability to search horse name and show results

Folder (auto generated)

Sets the location at which the test will be created in the Zephyr scale tests structure, the data in this fields is generated automatically from the previous fields and should never be edited manually

N/A

User Story Definition

The User story as defined in the Jira Ticket

As a Product owner I want to provide an ability for the user to search for any Horse Profile on Racing Post App So that they can quickly view the Horse profile from the Home and Racing Index screen

Scenario Title

Scenario Title (as it would be in a feature file) - These MUST be unique per Row

The user selects the search icon

Background

Preconditional steps

Given I am Logged in to a bookmaker

And I have a valid account Balance

Test Script (BDD)

Test Steps to be followed:

You can include Exaples tables and data tables here in the same format you would in the create test form or Feature file

Given the user is navigated to When the user views the top navigation section on this Then they will see the search icon as per the following designs Examples: |screen| |Home| |Index|

Automation Tags

indicator as to what test suite(s) this test is to be used in - guidance here : Automation Tagging Strategy

@SMOKE

@INT_GREEN

@Manual

Status

Initial status of the test on import - Standard is to import as Draft, but if known others can be used too, options are defined in the Test Statuses section of the Base configuration documentation.

Draft

Ready

Automation Candidate

Manual

Priority

The importance of the test as defined here (TBD)

Urgent

High

Medium

Low

labels

Searchable identifiers to improve ability to search / filter tests when creating test cycles or executing tests. Does not like spaces so keep to single words or replace spaces with '-'

Approved

Boolean value that Indicates test has been reviewed. Should only be true for tests not in Draft state

True

Demo The video below shows this being done as an example in Excel

Creating an Zephyr Scale import file

Once all the test information is entered, make sure the file is saved as a CSV formatted file, save the file locally, giving it a name that's clear to understand and easy to find when you need it.

If you are using Google Docs, the select File -/- Download as and select 'comma separated values (.csv) from, the down load options. This will automatically create a csv version of the file on your local machine

Final Output Below is what the final csv file from the above video looks like

Import the File Once you have a fully populated csv file you can import it directly to zephyr scale to add all the tests

To do this

Open relevant Jira project

Select Zephyr Scale

Select Test Cases

Select the More Button

Select 'Import from File

Follow the flow as per the Wizard (See Demo video) - this uses the demo-output CSV file from above

Unfortunately the quality of the demo video has not turned out as good as I would like so for clarity here are the Data mappings for when they are requested in the wizard

CSV Field

Zephyr Scale Field

Project Area

None

Feature Area

None

User Story ID

Coverage (Issues)

User Story

None

Folder (Auto Generated)

Folder

User Story Definition

Objective

Scenario

Name

Background

Precondition

Test Script (BDD)

Test Script (BDD)

Automation Tags

Automation Tags

Status

Status

Priority

Priority

Labels

Labels

Approved

Approved

It is sensible to create a temp folder in scale to complete the first few imports into so if there are a lot of errors the imported tests can be easily found and either fixed in situ / archived and re-imported. Once import is successful then the tests can be moved to the correct location in the test case structure.

If the Gherkin language is not correctly formatted (i.e. fails Gherkin validation) in the BDD Steps field in the import file, the test will still be imported but the Gherkin will not be added. The import process will throw a list of warnings identifying which tests were imported without steps and these will need to be corrected manually in the test itself. Advise to double check the gherkin steps before completing the import to prevent extra unnecessary effort

Reviewing new test cases

Created by mark.gamble Last updated: Aug 02, 222 min read 9 people viewed Currently Zephyr scale does not have a concept of a formal work flow so we have introduced two fields that can be added to the test case form to show that a test case has been reviewed and is ready to be executed / reviewed for suitability for automation.

Peer Reviewed by: User picker Drop down populated from Jira user list

SDET Reviewed by: User Picker Drop down populated from Jira User list

Approved: Check to signify the test is acceptable and ready for addition to a test cycle

We should not have any tests in any other state than draft without the reviewed by / approved flag set, SDET Review is Optional at this point

Review Steps Create / import Test Cases - Status Draft

Set Reviewed by field to reviewer (e.g. Mark Gamble): Once a reviewer is selected then the creator/reviewer need to alert the relevant person that a review has been requested as these fields are not linked to any notifications

Reviewer picks up Tests assigned via the reviewed by field

Reviewer opens related Story (via the Traceability tab)

Reviewer evaluates all linked tests for coverage

Reviewer evaluates individual tests against the following criteria

Mandatory content : Have all mandatory fields been included as a minimum (Details Tab )

Accuracy of steps: Test is accurately translated from the acceptance criteria

Coverage of functionality: Does the test cover the entirety of the functionality outlined (e.g Data, variations, Examples table etc)

Language: are the correct terms, tense and pronoun are used as per Test Script guidance

Correct use of steps: The test steps are clear, consistent, common as per Test Script guidance

Set SDET Review - If further input is needed then the creator / reviewer of the test case can set the SDET review field.

Once an SDET is selected then the creator/reviewer needs to alert the relevant SDET that a review has been requested as these fields are not linked to any notifications.

  1. Approvals

Approve: Reviewer happy that all criteria are met

Set approved flag

Set status to Ready

Not Approve : Reviewer identifies issues to be resolved

Adds Comment to Comments tab clearly identifying issues

Does not change status

Alerts creator of test that there is work to be done (Slack channel?)

OPTIONAL: review session call

Add label

Be the first to add a reaction

Write a comment… Add label

New test case using the form

Created by mark.gamble Last updated: Jul 20, 222 min read 13 people viewed

Default Create Test Case view

Zephyr scale has an in built standard Create Test case form that can be accessed in two ways

Selecting the Add Test Case button directly in zephyr scale itself.

Selecting the ‘Create Test Case’ button directly from the Jira User Story you wish to create a test for.

To view the ‘Create Test Case’ button on a User Story, Scale needs to be enabled on the Story, this is done by selecting the ‘Zephyr Scale CTA’ on the user Story itself , This can be found directly under the Story title.

Both methods open the same test case form, Using the second option directly from the Jira Story will automatically generate the traceability link.

The form itself contains a number of tabs that are available to us when creating a New Testcase; the tab will always open in the Details Tab by default

Details Tab

Test Script Tab

Traceability Tab

Attachments Tab

Comments Tab

There are also a number of Tabs that are not needed during the creation procces

Execution Tab: Shows The execution history of the test you are looking at it. This includes, last run, last result, related test cycles etc.

History Tab: this shows the Edit / update history of the test you are looking at

Make sure you save frequently as Zephyr scale doesn’t always warn you of unsaved data when you navigate away from the form

Add label

Be the first to add a reaction

Write a comment…

Details Tab

Created by mark.gamble
Last updated: Jul 21, 22
2 min read12 people viewed

This is the form tab that contains the general test information. Some of the information must be considered mandatory and has an equivalent entry in a feature file .

Label Description Feature File equivalent Mandatory Example
Name This is the Summary of the test as derived from the A/C scenario the test is related to . Scenario: YES Changing the ‘Odds shown’ to a new bookmaker (not logged-in)
Objective This is the Story Definition of the over all test case that is being tested by this scenariothis doesn’t have a scenario specific equivalent but is the overall story definition Feature Description YES As a DIU StakeholderI want the ‘Bet Basket Created’ event triggered in Segment & Firebase off the correct eventsSo that we can track the number of unique betslips created on the Janus applications
Precondition Any common set up steps needed to ensure the app/data is in the right place for the test to be executed - Use Gherkin format Background: NO Given I have logged into a Bookmaker accountAnd I have added ONE selection to the betslip
Status The status of the test as defined in the Test Statuses section of the Base configuration. Default is Draft N/A YES N/A
Priority The importance of the test as defined here (TBD) N/A YES N/A
Component Identifies the specific component a test is related to. List is populated directly from the Jira Project component list - this is a single select list, so pick best match if test covers more than one component N/A NO WebAppCommon
Owner Person that wrote the test (this is not always who executes the test) and may be the best person to contact if clarification is needed - List is populated directly from Jira User listThis field will not get populated during an import, but information can be found on owner from History Tab N/A YES Mark Gamble
Estimated Time This define how long it is estimated to execute this test - We do not use this field but it cannot be hidden N/A NO N/A
Folder The location the test will live in the testing structure. This is defined here: Base Folder Structure - This is populated directly from the Zephyr Folders no direct feature file entry but as per guidance will match the automation framework structure YES /Mobile/Features/Navigation/JP-4018-navigation-betslip-hide-bookmaker-balance-when-bookmaker-is-not-selected
Labels Searchable identifiers to improve ability to search / filter tests when creating test cycles or executing tests. Does not like spaces do keep to single words or replace spaces with '-' N/A NO BetslipNavigation Horse-profile
Automation Tags indicator as to what test suite(s) this test is to be used in - guidance here : https://racingpost.atlassian.net/wiki/spaces/QA/pages/822935688 TAGS NO @BAT @SMOKE @INT_GREEN @TABLET @MOBILE @DESKTOP
Original Issue Key (Squad Import) This field is specific to Affiliates project only and is a reference back to the key of the test before it was imported to Scale as part of the affiliates migration to the shared Jira instance - This was populated automatically during import N?A NO N/A
Add label
Be the first to add a reaction

Details Tab

Created by mark.gamble Last updated: Jul 21, 222 min read 12 people viewed

This is the form tab that contains the general test information. Some of the information must be considered mandatory and has an equivalent entry in a feature file .

Label

Description

Feature File equivalent

Mandatory

Example

Name

This is the Summary of the test as derived from the A/C scenario the test is related to .

Scenario:

YES

Changing the ‘Odds shown’ to a new bookmaker (not logged-in)

Objective

This is the Story Definition of the over all test case that is being tested by this scenario

this doesn’t have a scenario specific equivalent but is the overall story definition

Feature Description

YES

As a DIU Stakeholder I want the ‘Bet Basket Created’ event triggered in Segment & Firebase off the correct events So that we can track the number of unique betslips created on the Janus applications

Precondition

Any common set up steps needed to ensure the app/data is in the right place for the test to be executed - Use Gherkin format

Background:

NO

Given I have logged into a Bookmaker account

And I have added ONE selection to the betslip

Status

The status of the test as defined in the Test Statuses section of the Base configuration. Default is Draft

N/A

YES

N/A

Priority

The importance of the test as defined here (TBD)

N/A

YES

N/A

Component

Identifies the specific component a test is related to. List is populated directly from the Jira Project component list - this is a single select list, so pick best match if test covers more than one component

N/A

NO

Web

App

Common

Owner

Person that wrote the test (this is not always who executes the test) and may be the best person to contact if clarification is needed - List is populated directly from Jira User list

This field will not get populated during an import, but information can be found on owner from History Tab

N/A

YES

Mark Gamble

Estimated Time

This define how long it is estimated to execute this test - We do not use this field but it cannot be hidden

N/A

NO

N/A

Folder

The location the test will live in the testing structure. This is defined here: Base Folder Structure - This is populated directly from the Zephyr Folders

no direct feature file entry but as per guidance will match the automation framework structure

YES

/Mobile/Features/Navigation/JP-4018-navigation-betslip-hide-bookmaker-balance-when-bookmaker-is-not-selected

Labels

Searchable identifiers to improve ability to search / filter tests when creating test cycles or executing tests. Does not like spaces do keep to single words or replace spaces with '-'

N/A

NO

Betslip

Navigation

Horse-profile

Automation Tags

indicator as to what test suite(s) this test is to be used in - guidance here : https://racingpost.atlassian.net/wiki/spaces/QA/pages/822935688

TAGS

NO

@BAT @SMOKE @INT_GREEN @TABLET @MOBILE @DESKTOP

Original Issue Key (Squad Import)

This field is specific to Affiliates project only and is a reference back to the key of the test before it was imported to Scale as part of the affiliates migration to the shared Jira instance - This was populated automatically during import

N?A

NO

N/A

Add label

Be the first to add a reaction

⚠️ **GitHub.com Fallback** ⚠️