22.2 Configuring & using Jira in Opkey Web
Quick Start Screencast –
Jira, a well known bug tracking, issue tracking, and project management tool, is now integrated with OpKey Web.
For detailed information on Jira Integration & Configuration, please refer: Jira Integration & Configuration
Using Jira In OpKey Web:
- Click on the External Tool Integration option under the Tools menu.
- External Tool Integration window opens. Check UseForTestManagement checkbox and click on the Configure button.
What is API Token and how to generate it?
Jira API Token is an alphanumeric key which offers better authentication security to Jira than Password (which provides basic authentication only). As per Atlassian’s notification as below:
“Support for passwords in REST API basic authentication is deprecated and will be removed in the future. While the Jira REST API currently accepts your Atlassian account password in basic auth requests, we strongly recommend that you use API tokens instead. We expect that support for passwords will be deprecated in the future and advise that all new integrations be created with API tokens.”
OpKey is dedicated to providing its users with the best possible services with the supporting external tools like Jira. Now OpKey allows you to use your API Token instead of Password to login into Jira.
-
- For details about API Token, you can refer: https://developer.atlassian.com/cloud/jira/platform/jira-rest-api-basic-authentication.
- To generate API Token, refer this link: https://confluence.atlassian.com/cloud/api-tokens-938839638.html
- Sign In to your Jira software (Jira URL) with your valid credentials (Login ID & Password/API Token).
- If you have generated your API Token then you can use it instead of Password while logging into the Jira.
- Let us consider a scenario, if a Test Case or Scenario fails in OpKey, then the issue which is mapped to that Test Case, should change its workflow from ‘Open’ state to ‘InProgess‘ in JIRA and a bug should be logged automatically there.
- ‘Given Execution Status Is‘ have two predefined execution status of Test Case/Scenario: Pass & Fail. Select Pass or Fail as current existing condition.
- Select ‘And Issue Type Is‘ as ‘Bug‘ or any other scenario (which is mapped to test case in OpKey) as shown in the following image.
- Now Select ‘And Issue Status Is‘ and then select the available current status of issue in JIRA as shown in the following image.
- In the following screenshot, ‘To Do‘ is the current status of the issue (mapped to Test Case/scenario in OpKey), so ‘To Do‘ is selected in And Issue Status Is, then click ‘Change Status To‘ which refreshes possible status relative to the defined current issue type and state.
- Now Click on ‘Save‘ button as shown in the image.
- There are two ways of logging bugs in Jira by using bug log feature of OpKey Web. First on is automatic bug logging in all the selected projects for failed test executions. The second one is logging a new bug while updating the mapped bug of the corresponding project in Jira for the selected Test.
- Let us first discuss about logging an automatic bug in Jira for the failed Test execution in OpKey Web.
- In the above practical scenario, we have configured a workflow in project ‘Aishwarya’. We have to log a bug for a Test whose current execution status is Fail, Issue type is Bug, current status is To Do and we have to change its status to Done. Let us proceed.
- First of all, let us configure the workflow to the projects for logging bugs to Jira automatically.
- Go to the Tools menu & click > Click on External Tool Integration > Select UseTestForManagement checkbox > Click on Sync button > Click on Configure button > Select your project & check Link To OpKey Project checkbox > Click on Configure button > Configure your workflows
- Let us create a Test Case which have Fail test execution result.
- Click on Run Now button and fill all required fields in Execute Now Wizard. Check Show Advanced Settings and then click on Next.
- Check Update Mapped Test Management Artifact checkbox and scroll scrollbar of the snapshot to be taken. Click on Next.
- Here, you can add Session Tags by using which you can search your execution result quickly.
- Here, you can apply Global Variable value which will replace corresponding values.
- Once, test execution has completed, you can see the full logs of execution which contains the whole execution information as shown below.
- Now, you can see that it has logged a new bug and updated all corresponding bugs having given workflows.
- Let us discuss about the second method of bug logging in Jira. By using this method, you can map a particular bug of a project with a Test Case and configure workflow which leads to logging a new bug & updating mapped bug in Jira.
- Go to Project Workspace > Right click on your Test Case > Click on Jira Mapping option.
- Jira Mapping search page opens as shown below. There is a project ‘Aishwarya’ selected in the Project tab. These fields are used for refining your search result.
- Enter the required fields and then click on the Search button.
- Here, you can see list of bugs in Jira in a particular project. Check the corresponding checkbox of your bug to map it with the selected Test Case.
- Once this Test Case is executed, this bug will be updated and a new bug will be logged as per the configured workflow in Jira.
- Click on Apply Mapping Changes to save changes. You get a message that All Mapping Successfully Saved.
- Let us execute the respective Test Case by using Run Now button. Fill all required fields in Execute Now Wizard. Check Show Advanced Settings checkbox. Click on Next to proceed.
- Advanced Execution Settings allows you to configure settings for execution snapshot, its quality, step timeout and updating mapped test management artifacts.
- Check Update Mapped Test Management Artifact checkbox. Click on Next to proceed.
- Session Tags can be added from Execute Now Wizard which helps you to search your particular executed session by using the tag keyword. Click on + to add session tags.
- Global Variable page of Execute Now Wizard allows you to apply global variable(s) as per your requirement which will replace respective variable value during test execution.
- Here, you can see the mapped bug which has been updated as per your configured workflow in Jira.
- Similarly, you can see that a new bug has been logged in Jira as per your configured workflow.
Jira on Premise
Users can now launch the utility on their Jira, on-premise. The user will add the domain of OpKey which needs to be connected by filling all the details of “Domain, Username, Password, Client Name”. Post connecting the message will be displayed as “Successfully Launched”. The user can then Connect and Execute the run.
The utility can be connected with one domain with only one single user. If the user wants to connect to a different environment, the user will have to log out from the domain and log in again to the one which needs to be connected.
If the existing users want to access the utility, the user can check the box of “Use Utility” on the Jira window and proceed.