Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

Next challenges

Recent achievements

  • Global
  • Personal

Recognition

  • Give kudos
  • Received
  • Given

Leaderboard

  • Global

Trophy case

Kudos (beta program)

Kudos logo

You've been invited into the Kudos (beta program) private group. Chat with others in the program, or give feedback to Atlassian.

View group

It's not the same without you

Join the community to find out what other Atlassian users are discussing, debating and creating.

Atlassian Community Hero Image Collage
Highlighted

TestNG Result - exclude test cases being cretaed on JIRA with other annotations than @Test

Hi,

Environment: JIRA +Xray

Automation code: Java + TestNG

In the automation code I have a class with multiple methods with different TestNG annotations. i.e. @test, @AfterSuite,@BeforeSuite.

When testng-result is generated its showing result for all methods irrespective of the annotation. And when exported the result using REST API to JIRA,  new test cases are created for each method i.e. for beforeSuite, AfterSuite etc.

Question: Is there a way to control the export to create new Generic test cases on JIRA only with annotation as test in the automation code and exclude creating test cases for other methods.

Below is sample code:

@BeforeSuite <-- want result of this in testng-results.xls, but don't want new test case to be created in JIRA--!>
public void setUp_Xray() throws Exception {

}

@AfterSuite <-- want result of this in testng-results.xls, but don't want new test case to be created in JIRA--!>
public void tearDown_Xray() throws Exception {
}

@test
@Xray(labels = "To be created New :XRay Test1")
public static void SumOfTwoIntegers_Xray()
{

int addition= SimpleCalc.sum(10, 5);
System.out.println("Sum of a and b is : "+ addition);
System.out.println("Test to be crated automatically : ");

}


@test
@Xray(test = "XRAYAJ-3", labels = "Existing XRay Test")
public static void DivisionOfTwoIntegers_XRay()
{

int divide= SimpleCalc.divide(10, 5);
System.out.println("divide of a and b is : "+ divide);

 

1 comment

Hi Akshay,

At the moment this is not supported, but we have the following Story:

https://jira.xpand-addons.com/browse/XRAY-2680

After this is implemented, Tests with the is-config flag set to "true" will be ignored.

 

Best regards,

Xpand Add-ons Team

Comment

Log in or Sign up to comment
TAGS
Community showcase
Published in Marketplace Apps & Integrations

Do Not Lose your Customer’s Trust

Missing deadlines is one of the biggest problems every team lead wants to avoid when dealing with managed services. When the customer contracts your company to help with IT services it is expected th...

341 views 0 2
Read article

Community Events

Connect with like-minded Atlassian users at free events near you!

Find an event

Connect with like-minded Atlassian users at free events near you!

Unfortunately there are no Community Events near you at the moment.

Host an event

You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events

Events near you