21Aug 2024 by Kiran Kumari
Summary:
In a project regression, you want to automatically create a jira on the suite/regression failure and the same jira will be marked to done/bug fixed state once the regression passes in future execution. This can be achieved by gempyp by using following tags:
Tag Name | Type | Field Type | Description |
---|---|---|---|
String, Single value | Optional | Subscribed user can integrate GemPYP with JIRA. This would create a JIRA ticket in the test suite fails. | |
String, Single value | Mandatory if jira_email is passed | Jira Access Token to authenticate JIRA user. | |
Integer, Single value | Mandatory if jira_email is passed | Project ID on of project on JIRA under which ticket will be created | |
String, Single value | Optional | Title for Jira Creation. Default will be the name of suite | |
String, comma separated | Optional | Jira transition from one stage to another. |
<data>
<suite>
<!--Here brigeToken and User are the jewel credentials-->
<project-name>TEST_PY</project-name>
<report-name>Pyprest Scenarios</report-name>
<environment>prod</environment>
<mode>optimize</mode>
<enter-point>EnterPointUrl</enter-point>
<threads>4</threads>
<jewel-user>jewelUserName</jewel-user>
<jewel-bridge-token>JewelBridgeToken</jewel-bridge-token>
<JIRA_EMAIL>jiraEmailID</JIRA_EMAIL>
<jira_access_token>JiraAccessToken</jira_access_token>
<jira_workflow>JiraWorkFlowForTicket</jira_workflow>
<JIRA_PROJECT_ID>JiraPRojectID</JIRA_PROJECT_ID>
<JIRA_TITLE>Jira Creation Usecase</JIRA_TITLE>
</suite>
<testcases>
<testcase>
<name>Failing Test case</name>
<category>Scenario Testcase</category>
<run-flag>Y</run-flag>
<api>https://gorest.co.in/public/v2/users</api>
<method>GET</method>
<legacy-api>https://gorest.co.in/public/v1/users</legacy-api>
<legacy-method>GET</legacy-method>
<legacy-expected-status-code>200</legacy-expected-status-code>
<key-check>keys are legacy.meta,legacy.data[0].ids,legacy.data[0].name,response[0].id,response[0].name</key-check>
<TYPE>PYPREST</TYPE>
</testcase>
</testcases>
</data>
How to create jira access token.
Step 1: Visit the https://id.atlassian.com/manage-profile/security/api-tokens
Step 2: Create the API Token by clicking the “Create API token” button.