A Single Solution for all the CI/CD tools to send Test results to Vansah Test Management for Jira
Website • More Connect Integrations
- Features
- Prerequisite
- Installing
- Configuration
- Uploading Your Results
- Use of Custom Attributes
- Adding results to a specific Test Case
- Upload your TestNG🎉, 🔜 Junit, xunit🔜 and jtl/xml/csv🔜 to
Vansah Test Management for Jira
- Easy to use as it is command line friendly.
- Easy to Integrate with CI/CD tools such as Github Actions, Jenkins, Gitlab and so on.
- Execute your Vansah Test Case in just
one command
.
- Make sure that
Vansah
is installed in your Jira workspace - You need to Generate Vansah
connect
token to authenticate with Vansah APIs. - Node.js version 18 should be installed in your machine.
Using npm (Install globally) as this is command line
tool:
$ npm i -g @vansah/vansah-connect
-
Configure your Vansah
connect
Token. Use either of the following commands:-
Option 1: Replace "Your Vansah
connect
Token" with your actual token.$ vansah-connect -c "Your Vansah Connect Token"
-
Option 2: If you have the token stored as a pipeline variable, you can use:
$ vansah-connect -c %YOUR-PIPELINE-VARIABLE%
-
-
Configure your Vansah Jira Pinned location URL.( leave it blank to use default URL :
https://prod.vansah.com
)Note : If your Jira instance is set to a specific location, the URL will be different. Update the URL by verifying it in the Vansah API Tokens section.
$ vansah-connect -v "https://prod<Your Region code>.vansah.com"
Now, it's time to effortlessly upload your test results to Vansah Test Management for Jira
with a single command.
Replace ./YOUR-TESTNG_FILEPATH.xml
with the actual file path to your TestNg file
$ vansah-connect -f ./YOUR-TESTNG_FILEPATH.xml
Note : Set up your
TestNG
file to includecustom attributes
for each of your test functions. This way, after running the automation suite, all test methods will have sufficient information to log the results intoVansah Test Management for Jira
.
In Vansah, the determination of whether a test should pass or fail relies on the utilization of custom attribute annotations
/**
* Example
* This is a test method for performing an addition operation.
*
* Custom Attributes:
* - Case Key (Mandatory): "DOT-C1"
* - Tested Issue (Mandatory): "DOT-1"
* - Tested Sprint: "DOT Sprint 1"
* - Tested Environment: "SYS"
*/
@Test(attributes = {
@CustomAttribute(name = "Case Key", values = "DOT-C1"),
@CustomAttribute(name = "Tested Issue", values = "DOT-1"),
@CustomAttribute(name = "Tested Sprint", values = "DOT Sprint 1"),
@CustomAttribute(name = "Tested Environment", values = "SYS")})
public void Addition_Test() {
int a = 3 , b = 2;
int sum = a + b ;
System.out.println("Addition of Two numbers are : " + sum);
Assert.assertEquals(sum, 5);
}
Note : Modifying the name values is not possible as they are constant and case-sensitive
If you want to upload results directly to a particular test case follow below command
/**
* -t <TestCaseKey>
* -s <passedOrFailed>
* -a <IssueKeyorTestFolderID>
**/
$ vansah-connect -t "PVT-C500" -s "passed" -a "PVT-4"
Upon successful execution, you'll receive a reassuring message
A new Test Run created.
And that's it! With vansah-connect, you've streamlined the integration of your automation test results into Vansah, making your testing and test management process even more efficient and seamless.