With the Azure Boards integration, you can create work items from failed mabl test runs, link tests to work items that already exist, and use work items to build new mabl tests. This article explains how to do each of these from the mabl app. To connect mabl to Azure Boards first, see Azure Boards integration.
Create and link work items
You can create and link work items from the following places in the mabl app:
- From a failed test run: on the test output page, click on Create issue below the failure analysis, or on the failed step.
- From a test: on the test details page, open the Issues tab and click on + New issue.
- From the issues page: click on Tests in the left-hand navigation, open the Issues tab, and click on + New issue.
Create a work item from a failed run
In the New issue form, enter the following information:
- Choose your Azure Boards integration in the Issue Tracker dropdown.
- Select "Create new".
- Choose the Project and the Work item type. The list includes every type in the project's process, so it may be long. The integration's default type is listed first.
- Click Next. The form shows the fields you chose to show for that type, with any default values filled in. For a work item created from a failed run, mabl pre-fills the title with the failure analysis's title and the description with the rest of the analysis. You can edit both.
- Fill in anything else and click Submit.
A success message appears at the bottom of the screen. Click on the link to open the work item in Azure Boards in a new tab.
For a failed test, the type you want is almost always Bug, or Issue on the Basic process, which has no Bug type. mabl preselects the project's bug type, and an admin can change the default on the integration. Some teams file fixes as Task. The list of types can't be trimmed, but an admin can shape each type's form with field settings.
What a created work item contains
A work item created from a failed run carries everything a developer needs to start on the problem:
- Title: the failure analysis's title, or whatever you changed it to on the form.
- Description: the rest of the failure analysis, the screenshot of the page as the run left it, and a footer with two links: View the failed test run in mabl and Open the test in mabl. The description is written in markdown.
- Attachments: the final-state screenshot, the DOM snapshot, the HAR file, and the Chrome trace if the failing run was set to retain step traces.
- Links: hyperlinks to the mabl test run and the mabl test, next to the work item's other links.
Attachments are added on a best-effort basis. A file over 25 MB is skipped, and if a file can't be uploaded, the work item is still created without it.
Link an existing work item
To link a mabl test or test run to a work item that already exists, open the New issue form and take the following steps:
- Choose your Azure Boards integration in the Issue Tracker dropdown.
- Select "Link existing".
- Choose the Project.
- Under Issue to Link, search for the work item by title or enter its ID.
- Click Submit.
A success message appears at the bottom of the screen, and the work item appears on the test's Issues tab.
Manage work items in mabl
You can review all linked work items on the issues page, Tests > Issues, or on the Issues tab of a specific test. Click on the work item link to open it in Azure Boards, or re-run the mabl test to reproduce the problem or validate a fix.
mabl shows work items as either "Open" or "Closed". About every 10 minutes, mabl checks each linked work item. Closing, reopening, deleting, or restoring a work item in Azure Boards updates the issue in mabl on the next check.
To remove a work item from a test, open the Issues tab on the test details page, select the issues you want to remove, click on Unlink, and confirm. The work item itself stays in Azure Boards.
Build tests from work items
If a work item already describes the behavior you want to test, you can hand it to the mabl agent when building a new test or editing an existing one. User stories, product backlog items, and requirements with acceptance criteria work well, as do bugs with steps to reproduce and test cases in Azure Test Plans. When the workspace has an enabled Azure Boards integration, the + menu below the prompt on the Build tests page includes an Azure Boards work item option.
- Go to Build tests and, on the New test or Edit test tab, click + below the prompt and choose Azure Boards work item.
- If the workspace has more than one Azure Boards integration, choose which one to search.
- Search by title, or enter a work item ID such as
123orAB#123, or paste the work item's URL. Check each work item you want. You can check several from one search, up to five in total. - Click Done. Each work item appears below the prompt with its ID. Hover over it to see the title.
- Describe anything the work item doesn't cover, such as test data or the starting state, and send the prompt.
The agent reads the fields that describe the behavior for that kind of work item: the title, description, and acceptance criteria of a user story, the steps to reproduce on a bug, or the steps and expected results of a test case, including shared steps. It never reads comments, history, attachments, or custom fields. In the conversation, the agent refers to a work item by its ID in the form AB#123.
Search and IDs
Search relies on the work item search index in Azure DevOps. In an organization that was connected recently, the picker may say that search is still indexing. Enter the work item's ID or URL instead. If a bare ID exists in more than one connected organization, the picker asks you which one you mean.
Automatic linking
If you build a new test from exactly one work item, and that work item's type is Test Case, mabl adds the Test Case to the test's Test cases section when the agent saves it. If the integration records results in Azure Test Plans, plan runs then record results on that Test Case. Other work item types, such as user stories and bugs, work as references, but mabl doesn't link the new test back to them. To track a story or bug alongside the test, link it from the test's Issues tab as described in Link an existing work item.
If you reference several work items when building a new mabl test, mabl doesn't link any of them, even if one is a Test Case. Add the Test Case yourself in the Test cases section of the test information dialog.