Jira Zephyr
Learn how to integrate BELLATRIX tests with Jira Zephyr Plugin.
What Is Jira Zephyr?
The Jira Zephyr plugin is an add-on for Jira that enhances its capabilities for test management. Zephyr, integrated within Jira, provides tools for creating, managing, and executing test cases directly within the Jira environment.
Usage
When we have BELLATRIX tests which correspond to zephyr test cases inside jira and we want to automatically create test cycles when the tests are executed, the jira-zephyr plugin of BELLATRIX proves handy.
To use this plugin, we first need to import it to our test project. After that, we must register it.
public override void TestInit()
{
App.AddPlugin<AssociatedTestCaseExtension>();
}
We can annotate the test class with the ZephyrProjectIdAttribute
.
[ZephyrProjectId("BELLATRIX")]
public class JiraZephyrTests
{
// code
}
Then, we simply annotate our tests with their respective test case ids with ZephyrTestCaseAttribute
.
[ZephyrTestCase("B-12")]
[TestMethod]
public void TestingJiraZephyrIntegration()
{
// code
}
One can customize the plugin through the config.
Config
The settings section in the config file must look like this:
"zephyrSettings": {
"isEnabled": "true",
"apiUrl": "insert/the/url/of/the/api",
"token": "insert the token generated from jira zephyr",
"defaultProjectKey": "insert the default project's key to be used, if not defined in the test class or test case",
"isExistingCycle": "insert false to generate new test cycle, insert true and provide in the test class or test case the id of the existing test cycle",
"testCycleName": "insert the name of the test cycle to be created",
"cycleFinalStatus": "insert the final status of the cycle"
}
Mandatory settings are the isEnabled
, apiUrl
, and token
. If you define isExistingCycle
as true, testCycleName
may be omitted.