Test Management System (TMS) using JIRA Customization

Post on 21-Jan-2018

237 views 2 download

Transcript of Test Management System (TMS) using JIRA Customization

TMS using JIRA CustomizationYagnanarayana Dande

Project/Component/Story-Feature

• In JIRA Project will be top level entity

• Every Project will be having several Components

• Example - Project-1 is a Project and Comp-1,Comp-2 are

components

• Stories will be created per Project and will be associated with

one or more Components

Test Case

New IssueType called Test Case added into JIRA with CFs

Template

Test

Summar

y

Test Steps

Expected Results

Automatio

n Status Test Group

Componen

ts

Requirem

ent

Issue

Type

Affects

Version

Create

….

*Test Steps*

1….

2 ….

3….

*Expected Results*

1…..

2…. Manual Smoke Comp-1 Project1-1

Test

Case v1.3.0

Sample Test Case

Requirement Traceability

Test Case should be linked to Requirement

This allows Requirement Traceability

No. of Test Cases added in Latest Release

Test cycle creation

Assign Test Cases for Execution

Using JQL and Bulk Upload

Test cycle execution assignments

User Dashboard

Test Execution

Test progress in a Test cycle

Test progress at Component level

Test progress at Feature Level

Test execution report with teststeps

Test Cases for Different Platforms(OS)

Test Cases for Different Platforms(OS)

• Create Test Case for a Platform and upon review Clone them if

Test Steps are same for all the Platforms

• Create Different Test Cases for different Platforms if they are

platform dependent Test Cases

• Link a Test Case of different Environments

Creation of Automation Tasks using CSV upload

Test case assignment for automation

• Change Automation Status as “To be Automated” in Test Case

• Create a Sub-Task for Test Case

• Add to appropriate Test Cycle

• Assign it to a QA Engineer

Automation Activity

• QA Engineer looks at User Dashboard for Automation Activities

• QA Engineer will put it in Progress

• Complete it and mark it as Done

• Change Automation Status as “Automated” in Test Case

• Update “Automation Code” with Fully Qualified Class Name and

@Test Method Name

Automation assignments

Automation Progress

Create Regression Tests

• Get All Test Cases from Test Case Repository which are not

invalid

• Export them to CSV

• Change the Test Cycle and Assignee

• Import CSV

• Use Issue Key as Cloners in import menu

No. of Regressions across Versions

• Bug should be linked to Test Case with “is regressed by” link

type, if it a regression Bug.

• If not it should be linked to Test Case with “is caused by”

No. of regressions within Release

Test execution history for a testcase

JIRA Jenkins Integration

Pull Issue DetailsExecute Test Cases

Update Test Results in JIRA

Jenkins Integration

• Get all issues of given Filter

• Get custom field from every Test Case

• Maintain a Map of JIRA ID to Custom Field

• Create a TestNG XML suite Programmatically and run it

• Get results programmatically from TestNG

• Update the issues by using Reverse mapping of Custom Field

to JIRA ID

Jenkins Integration

• https://github.com/rcarz/jira-client

• Create a Filter

• project = Project-1 AND issuetype = "Test Case" AND "Test Cycle" = "Version 4.0 - Cycle 1" AND "Automation Status" =

Automated AND status = "In Progress"

• Build jar from the code in last slide and run on Jenkins.

• This code needs following inputs

– JIRA URL

– JIRA Credentials

– Filter like “filter=10112”

– customField="customfield_10032"

– Note: You can get custom field name from JIRA Rest API and this name is different from what you see in JIRA UI

Add-ons Required

JQL Extensions for Querying linked issues

https://marketplace.atlassian.com/plugins/jql-extensions/cloud/pricing

Import Test Cases from CSV

https://confluence.atlassian.com/adminjiracloud/importing-data-

from-csv-776636762.html#ImportingdatafromCSV-format

Import Test Cases from CSV

Import Test Cases from CSV

Jenkins Integration

package com.company.qa.project.test;

import java.util.ArrayList;

import java.util.Arrays;

import java.util.Collection;

import java.util.HashMap;

import java.util.List;

import java.util.Map;

import org.testng.IReporter;

import org.testng.ISuite;

import org.testng.ISuiteResult;

Issue Links Used

Filters Used

Filter Name JQL

Bugs with Test Cases project = Project1 AND linkType = "is regressed by" AND issuetype = Bug AND affectedVersion = "Version 3.0"

Test Case Repository project = Project1 AND issuetype = "Test Case" AND (linkType not in (clones) OR linkType is EMPTY)

Test Cases Added in Latest Version project = Project1 AND issuetype = "Test Case" AND affectedVersion = "Version 4.0"

Test Cases Caused Regression project = Project1 AND linkType = regresses AND issuetype = "Test Case"

Test Cases With Open Bugs

project = Project1 AND issuetype = "Test Case" AND status = "TC - Failed" AND linkedIssueType = Bug AND

linkedIssueStatus = "To Do"

Test Execution of Latest Test Cycle project = Project1 AND issuetype = "Test Case" AND "Test Cycle" = "Version 4.0 - Cycle 1"

Requirement Traceability project = Project1 AND issuetype = Story AND linkType = "is requirement of"

All Bugs with Test Cases

project = Project1 AND (linkType = "is caused by" OR linkType = "is regressed by") AND issuetype = Bug AND

affectedVersion = "Version 3.0"

Automation Progress project = Project1 AND issuetype = Sub-task AND "Test Cycle" = "Version 4.0 - Cycle 1"

Regression Bugs with Test Cases project = Project1 AND linkType = "is regressed by" AND issuetype = Bug AND affectedVersion = "Version 3.0"

Automated Tests Ready to Run

project = Project1 AND issuetype = "Test Case" AND "Test Cycle" = "Version 4.0 - Cycle 1" AND "Automation

Status" = Automated AND status = "In Progress"

Test Execution History

project = Project1 AND issuetype = "Test Case" AND linkType in (clones) AND linksIssue = Project1-32 ORDER

BY "Test Cycle" DESC

Configuration for Environments

{

"config.version" : "2.0",

"config.project.from.csv" : "false",

"config.encoding" : "UTF-8",

"config.email.suffix" : "@",

"config.field.mappings" : {

"Custom field (Test Group)" : {

"existing.custom.field" : "10026"

},

"Issue Type" : {

"jira.field" : "issuetype"

Thank you

yagna.b

itspila

ni@

gm

ail.c

om