Adapter for test execution results exports to Zephyr Scale for Jira Cloud.
API documentation: Zephyr Scale for Jira Cloud (v2)
testng.xml
<!DOCTYPE suite SYSTEM "http://testng.org/testng-1.0.dtd" >
<suite name="Zephyr Scale Test Suite" verbose="1" >
<parameter name="ZEPHYR_SCALE_PROJECT_KEY" value="AQA"/>
<listeners>
<listener class-name="com.github.letsrokk.zephyr.testng.ZephyrScaleListener"/>
</listeners>
<test name="Example Test" >
<classes>
<class name="com.github.letsrokk.zephyr.tests.ConfigurationExampleTest" />
</classes>
</test>
</suite>
Test methods should be either annotated by @TestCase("PROJECT-T1")
or @TmsLink("PROJECT-T1")
(provided by Allure Framework)
package com.github.letsrokk.zephyr.tests;
import com.github.letsrokk.zephyr.annotation.TestCase;
import org.testng.annotations.Test;
@Test(singleThreaded = true)
public class ConfigurationExampleTest {
@TestCase("AQA-T1")
@Test
public void testExecutionWithPassStatusTest() {
// do nothing
}
}
Jira URL, username and token can be set in one of 2 ways:
- as System Property variable on test run
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<version${maven-surefire-plugin.version}</version>
<configuration>
<testFailureIgnore>true</testFailureIgnore>
<systemPropertyVariables>
<ZEPHYR_SCALE_API_TOKEN>[REDACTED]</ZAPI_JIRA_URL>
</systemPropertyVariables>
</configuration>
</plugin>
- or as Environment variables
export ZEPHYR_SCALE_API_TOKEN=[REDACTED]
TBD