How can I customize the report .xml output to contain info about JUnit suite’s test classes?












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.










share|improve this question

























  • <testcase name="TestClass1.testHandleCacheOne" classname="webdriver.test.SuiteOne" time="14.759"/>

    – mustapha ousikis
    Nov 23 '18 at 16:51











  • Welcome to Stack Overflow! If you want to add something to your question, there's an edit link (that doesn't look like one :) below your question's tags.

    – Gerold Broser
    Nov 24 '18 at 8:51
















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.










share|improve this question

























  • <testcase name="TestClass1.testHandleCacheOne" classname="webdriver.test.SuiteOne" time="14.759"/>

    – mustapha ousikis
    Nov 23 '18 at 16:51











  • Welcome to Stack Overflow! If you want to add something to your question, there's an edit link (that doesn't look like one :) below your question's tags.

    – Gerold Broser
    Nov 24 '18 at 8:51














0












0








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.










share|improve this question
















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.







maven testng jira-zephyr






share|improve this question















share|improve this question













share|improve this question




share|improve this question








edited Nov 24 '18 at 1:05









Gerold Broser

7,86942157




7,86942157










asked Nov 23 '18 at 16:50









mustapha ousikismustapha ousikis

1




1













  • <testcase name="TestClass1.testHandleCacheOne" classname="webdriver.test.SuiteOne" time="14.759"/>

    – mustapha ousikis
    Nov 23 '18 at 16:51











  • Welcome to Stack Overflow! If you want to add something to your question, there's an edit link (that doesn't look like one :) below your question's tags.

    – Gerold Broser
    Nov 24 '18 at 8:51



















  • <testcase name="TestClass1.testHandleCacheOne" classname="webdriver.test.SuiteOne" time="14.759"/>

    – mustapha ousikis
    Nov 23 '18 at 16:51











  • Welcome to Stack Overflow! If you want to add something to your question, there's an edit link (that doesn't look like one :) below your question's tags.

    – Gerold Broser
    Nov 24 '18 at 8:51

















<testcase name="TestClass1.testHandleCacheOne" classname="webdriver.test.SuiteOne" time="14.759"/>

– mustapha ousikis
Nov 23 '18 at 16:51





<testcase name="TestClass1.testHandleCacheOne" classname="webdriver.test.SuiteOne" time="14.759"/>

– mustapha ousikis
Nov 23 '18 at 16:51













Welcome to Stack Overflow! If you want to add something to your question, there's an edit link (that doesn't look like one :) below your question's tags.

– Gerold Broser
Nov 24 '18 at 8:51





Welcome to Stack Overflow! If you want to add something to your question, there's an edit link (that doesn't look like one :) below your question's tags.

– Gerold Broser
Nov 24 '18 at 8:51












1 Answer
1






active

oldest

votes


















0














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.






share|improve this answer


























  • 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













Your Answer






StackExchange.ifUsing("editor", function () {
StackExchange.using("externalEditor", function () {
StackExchange.using("snippets", function () {
StackExchange.snippets.init();
});
});
}, "code-snippets");

StackExchange.ready(function() {
var channelOptions = {
tags: "".split(" "),
id: "1"
};
initTagRenderer("".split(" "), "".split(" "), channelOptions);

StackExchange.using("externalEditor", function() {
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled) {
StackExchange.using("snippets", function() {
createEditor();
});
}
else {
createEditor();
}
});

function createEditor() {
StackExchange.prepareEditor({
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader: {
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
},
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
});


}
});














draft saved

draft discarded


















StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53450405%2fhow-can-i-customize-the-report-xml-output-to-contain-info-about-junit-suite-s-t%23new-answer', 'question_page');
}
);

Post as a guest















Required, but never shown

























1 Answer
1






active

oldest

votes








1 Answer
1






active

oldest

votes









active

oldest

votes






active

oldest

votes









0














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.






share|improve this answer


























  • 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


















0














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.






share|improve this answer


























  • 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
















0












0








0







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.






share|improve this answer















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.







share|improve this answer














share|improve this answer



share|improve this answer








edited Nov 25 '18 at 17:43

























answered Nov 24 '18 at 1:01









Gerold BroserGerold Broser

7,86942157




7,86942157













  • 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





















  • 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



















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







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







@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






















draft saved

draft discarded




















































Thanks for contributing an answer to Stack Overflow!


  • Please be sure to answer the question. Provide details and share your research!

But avoid



  • Asking for help, clarification, or responding to other answers.

  • Making statements based on opinion; back them up with references or personal experience.


To learn more, see our tips on writing great answers.




draft saved


draft discarded














StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53450405%2fhow-can-i-customize-the-report-xml-output-to-contain-info-about-junit-suite-s-t%23new-answer', 'question_page');
}
);

Post as a guest















Required, but never shown





















































Required, but never shown














Required, but never shown












Required, but never shown







Required, but never shown

































Required, but never shown














Required, but never shown












Required, but never shown







Required, but never shown







Popular posts from this blog

Costa Masnaga

Fotorealismo

Sidney Franklin