0

Hope you are doing well. I have a quick question please if someone can help me. In my case i can publish the result of my test on Zephyr for JIRA cloud. But I have in the summary field of my testcases the name of the package like (com.testcases.classname.methodname). How can we do that in order to have some description in that field instead of the name of the package please?

For example, if I wanted the .xml output file to look like this:

<testcase name="Test case name" classname="my description or summury like : test of my software XXXX" time="xxxx"/>

Thank you so much for your help.

Gerold Broser
  • 14,080
  • 5
  • 48
  • 107

1 Answers1

1

AFAICS from the doc of surefire:test and TestNG's annotations (though it has @Test.description but if this is not printed to result .xml) this is not going to work without self-written:

  • mapping of testcase.nameyour test case name
  • mapping of testcase.classnameyour description or summary
  • string replacement according to the mappings

You could develop a custom Maven plugin with test as its default phase for this. Another option is to use the the Exec Maven Plugin to perform string replacement with a tool like sed or awk.

Gerold Broser
  • 14,080
  • 5
  • 48
  • 107
  • 1
    thank you for tour answer, i tried to add some description to my test methode like this : @Test(testName="My test case name",description="My test case description") but that dosn't printed in my xml output TEST-TestSuite.xml. can you please provide me an sample exemple to do that – mustapha ousikis Nov 25 '18 at 17:31
  • @mustaphaousikis There is an example how to write an own plugin on the third page I linked. See also the last sentence update to my question. – Gerold Broser Nov 25 '18 at 17:44