I'm trying to have a extensive Report on my TestNG Test in best case with snapshots of Browser prompt and converted in a pdf-file.
According to this post: http://forums.opensymphony.com/thread.jspa?messageID=39474騲
I tried the ant-structure:
<junitreport todir="testNGJunitReport">
<fileset dir="testoutput">
<include name="*.xml"/>
<exclude name="testng-failures.xml"/>
</fileset>
<report format="noframes" todir="testNGJunitReport"/>
</junitreport>
and afterwards I use:
<junitpdfreport todir="." styledir="default">
<fileset dir="testNGJunitReport">
<include name="*.xml"/>
</fileset>
</junitpdfreport>
unfortunately the Reports are not in a Junit-Format? Am I missing something? I also tried the explicit use of JunitXMLReporter in my testng ant task:
<reporter classname="org.testng.reporters.JUnitXMLReporter">
</reporter>
Is there somewhere a mistake? It still doesn't work? (in the xml report are the wrong tagnames according to this structure: http://junitpdfreport.sourceforge.net/managedcontent/PdfTranslation )
do I need a special xslt to transform the testng-xml to pdf?
I also tried to mangage the whole pdf-generation within java and iText (http://www.lowagie.com/iText/) but it's complex..
Thanks
*d
---------------------------------------------------------------------
Posted via Jive Forums
http://forums.opensymphony.com/thread.jspa?threadID=111185&messageID=181051#181051
there I have tags like:
<testng-results>
<reporter-output>
<line>Start</line>
</reporter-output>
<suite name="Test">
<test name="CRUD">
<class name="Test">
...
</class>
...
</class>
</test>
</suite>
</testng-results>
do I have to use another xml?
thanks
*d
---------------------------------------------------------------------
Posted via Jive Forums
http://forums.opensymphony.com/thread.jspa?threadID=111185&messageID=181525#181525
thats what I guess to, but why is a compatibility said in this thread?:
http://forums.opensymphony.com/thread.jspa?messageID=39474騲
I'm really confused, I thought TestNG Reports are compatible to Junit Reports? or at least there is a Transformer?
thanks
*d
---------------------------------------------------------------------
Posted via Jive Forums
http://forums.opensymphony.com/thread.jspa?threadID=111185&messageID=181544#181544
Hi Cosmin,
thats what I guess to, but why is a compatibility said in this thread?:
http://forums.opensymphony.com/thread.jspa?messageID=39474騲
I'm really confused, I thought TestNG Reports are compatible to Junit Reports? or at least there is a Transformer?
look for files with names like TEST-*.xml, eg.
TEST-org.smartfrog.test.system.assertions.AssertionsTest.xml
the root tag should be testsuite:
<?xml version="1.0" encoding="UTF-8" ?>
<testsuite errors="0" failures="0" hostname="chamonix"
name="org.smartfrog.test.system.assertions.AssertionsTest" tests="13"
time="16.299" timestamp="2007-08-15T12:01:14">
means if one has a xmlfileset like this:
<suite name="Suitename" verbose="1" >
<test name="Testname">...
the compatible file is [Suitename]/Testname.xml
and for every test there is a xml-file. (depends on fileFragmentationLevel i guess)
thanks for helping me with this.
another question:
If I use those files I loose my Reporter.logs where I'm depending on. Maybe the reporting in TestNG isn't fully developed yet. There is no possibility to get more information in the reports than the method-names? (I know normaly Junit is responsible for this)
Is there a possibility to have more Informations in the Reports, like for example assert-outputs and I didn't find yet?
@ Cosmin
I did have a look at your post " XSLT for the XML Reporter", good work!
are you planning to generate a xslt converting the testng-xml output to an pdf? would be great ;-)
the xsl for junit reports can be found in junitpdfreport_essentials:
http://sourceforge.net/project/showfiles.php?group_id=153965&package_id=170893&release_id=375934
So, if somebody has any idea to have a detailed report in pdf I would be really glad hearing..
Thanks
*d
---------------------------------------------------------------------
Posted via Jive Forums
http://forums.opensymphony.com/thread.jspa?threadID=111185&messageID=181565#181565
another question:
If I use those files I loose my Reporter.logs where I'm depending on. Maybe the reporting in TestNG isn't fully developed yet. There is no possibility to get more information in the reports than the method-names? (I know normaly Junit is responsible for this)
Is there a possibility to have more Informations in the Reports, like for example assert-outputs and I didn't find yet?
@ Cosmin
I did have a look at your post " XSLT for the XML Reporter", good work!
are you planning to generate a xslt converting the testng-xml output to an pdf? would be great ;-)
@Cosmin
>Creating an XSL thattransforms an XML to PDF is something that (AFAIK) cannot be
>achieved with most "conventional weapons".
within junitpdfreport they use xsl to transfrom the junit-xml files into pdf (AFAIK) I thougth maybe there is a testNGpdfreport tool, normally only the xsl needs to be changed?
>As an alternative, you could check out this article:
>http://www.javaworld.com/javaworld/jw-04-2005/jw-0404-testng.html
Thanks a lot for this information, unfortunately the code used in this articel is from a older version of TestNG, but I will try to adapt..
@Cédric
>Are you talking about the JUnitReport XML files?
>These files are JUnit-specific, and therefore, they can't contain anything
>that TestNG-specific.
>You will find your Reporter outputs in both the HTML and the TestNG-specific
>XML file that get generated, though...
>Does this answer your question?
maybe I mixed up two things..
1) The Junit Reports generated out of TestNG. Within the Junit-Report structur there is a tag called <system-out>, so why does't the JunitXMLReporter has a possibility to print the Reporter logs to those <system-out> tags?
2)TestNG Reports itself. Is there a possibility to report something other than the method-name and the Reporter output? Something like assert-Methods also doing a kind of reporting?like this:
MyTestmethod
Assert 1 equals 1 is true
Assert Text "a" equals "a" is true
Show all outputs
myReporteroutput is here...
Thanks again! yes I guess my question has been answered, but still it would be nice if one has ideas about doing detailed reports at best within a pdf Report out of TestNG.
*d
---------------------------------------------------------------------
Posted via Jive Forums
http://forums.opensymphony.com/thread.jspa?threadID=111185&messageID=181602#181602
ok maybe there is a litte of misunderstanding..
@Cosmin
>Creating an XSL thattransforms an XML to PDF is something that (AFAIK) cannot be
>achieved with most "conventional weapons".
within junitpdfreport they use xsl to transfrom the junit-xml files into pdf (AFAIK) I thougth maybe there is a testNGpdfreport tool, normally only the xsl needs to be changed?
>As an alternative, you could check out this article:
> http://www.javaworld.com/javaworld/jw-04-2005/jw-0404-testng.html
Thanks a lot for this information, unfortunately the code used in this articel is from a older version of TestNG, but I will try to adapt..
@CÃ(c)dric
>Are you talking about the JUnitReport XML files?
>These files are JUnit-specific, and therefore, they can't contain anything
>that TestNG-specific.
>You will find your Reporter outputs in both the HTML and the TestNG-specific
>XML file that get generated, though...
>Does this answer your question?
maybe I mixed up two things..
1) The Junit Reports generated out of TestNG. Within the Junit-Report structur there is a tag called <system-out>, so why does't the JunitXMLReporter has a possibility to print the Reporter logs to those <system-out> tags?
2)TestNG Reports itself. Is there a possibility to report something other than the method-name and the Reporter output? Something like assert-Methods also doing a kind of reporting?like this:
MyTestmethod
Assert 1 equals 1 is true
Assert Text "a" equals "a" is true
Show all outputs
myReporteroutput is here...
ok maybe there is a litte of misunderstanding.. @CosminCreating an XSL thattransforms an XML to PDF is something that (AFAIK) cannot be achieved with most "conventional weapons".within junitpdfreport they use xsl to transfrom the junit-xml files into pdf (AFAIK) I thougth maybe there is a testNGpdfreport tool, normally only the xsl needs to be changed?
As an alternative, you could check out this article: http://www.javaworld.com/javaworld/jw-04-2005/jw-0404-testng.htmlThanks a lot for this information, unfortunately the code used in this articel is from a older version of TestNG, but I will try to adapt.. @CÃ(c)dric
Are you talking about the JUnitReport XML files? These files are JUnit-specific, and therefore, they can't contain anything that TestNG-specific. You will find your Reporter outputs in both the HTML and the TestNG-specific XML file that get generated, though... Does this answer your question?maybe I mixed up two things.. 1) The Junit Reports generated out of TestNG. Within the Junit-Report structur there is a tag called <system-out>, so why does't the JunitXMLReporter has a possibility to print the Reporter logs to those <system-out> tags? 2)TestNG Reports itself. Is there a possibility to report something other than the method-name and the Reporter output? Something like assert-Methods also doing a kind of reporting?like this: MyTestmethod Assert 1 equals 1 is true Assert Text "a" equals "a" is true Show all outputs myReporteroutput is here...
1) The Junit Reports generated out of TestNG. Within the Junit-Report structur there is a tag called <system-out>, so why does't the JunitXMLReporter has a possibility to print the Reporter logs to those <system-out> tags?
Let's be precise. They are Ant specific, not Junit-specific. The Ant
team grew them over time and added things we needed (like wall time
and host) because we saw the need for them.
- There's no specific reason why they should be JUnit only
- our own AntUnit test tool generates stuff in the format too.
- we know some of the limitations.
-Single host log; loss of level info from the logging apis
-non-progressive output; very brittle to JVM crash
-no scope for skipped tests
-no place for descriptions
-unable to scale to the problem of reporting the same test running
on 30 machines/system configurations, where partial failures are a
common outcome
I'd like to fix these, and I have the Ant commit rights to do so. But
we've accidentally created a reporting format that gets used
everywhere, so we have to be very carefull about extending it gently.
I'd like to set up a working group to extend the existing format some
time in september onwards, if you are interested. No 'version 2.0'
effects ('lets redo it all in RDF'), just simple additions to the
existing XML that doesnt break the current set of post-processors.
-steve
I tried to extend the JUnitXMLReporter so that the log of TestNg Reporter is available for <system-out> tags in Junit Reports. It all works fine but in the end the task mentioned above to create HTML out of JunitReports did ignore the <system-out> tags (also when not whith CDATA). So if anybody knows if and how <system-out>-tags are made avaialbe in HTML Reports give a sign.
I used this structure:
<testsuite name="a" failures="0" tests="3" time="0.0" errors="0">
<properties/>
<testcase name="ab" time="0.016"></testcase>
<system-out><![CDATA[runTesthello]]></system-out>
<system-err></system-err>
</testsuite>
I'm also trying to create an PDFReporter for TestNG, just adapting the one mentioned above.. Iguess this will be the promising alternative..
*d
---------------------------------------------------------------------
Posted via Jive Forums
http://forums.opensymphony.com/thread.jspa?threadID=111185&messageID=182077#182077
<code>
<target name="report" description="generate reports using junireport">
<junitreport todir="${test.report}">
<fileset dir="${test.output}">
<include name="**/*.xml" />
</fileset>
<report format="noframes" todir="${test.report}" />
</junitreport>
</target>
</code>
You can found one folder having name of your suite in test.output
directory.
In your case there may be Test dire having CRUD.xml and other xml
depending upon the your test names.
JUnitReports are construct using this xml's. So I prefer to use **/
*.xml so it will search in sub folder also.
You may find following structure :
test.output
|
|---------------------------------------- <Suite Name>
emailable-report.html |
index.html |
testng.css |
testng-failed.xml |
testng-results.xml |
|
<TestName>.properties
<TestName>.xml
{This file is needed for generating JUnitReports}
testng-failed.xml
I hope you that you might solve this problem but I posted this so that
any other person may get benefited.
./Nikhil
On Aug 15, 5:02 pm, dbaum <testng-us...@opensymphony.com> wrote:
> Hi everybody,
>
> I'm trying to have a extensive Report on my TestNG Test in best case with snapshots of Browser prompt and converted in a pdf-file.
>
> According to this post:http://forums.opensymphony.com/thread.jspa?messageID=39474騲
> I tried the ant-structure:
> <junitreport todir="testNGJunitReport">
> <fileset dir="testoutput">
> <include name="*.xml"/>
> <exclude name="testng-failures.xml"/>
> </fileset>
> <report format="noframes" todir="testNGJunitReport"/>
> </junitreport>
> and afterwards I use:
> <junitpdfreport todir="." styledir="default">
> <fileset dir="testNGJunitReport">
> <include name="*.xml"/>
> </fileset>
> </junitpdfreport>
>
> unfortunately the Reports are not in a Junit-Format? Am I missing something? I also tried the explicit use of JunitXMLReporter in my testng ant task:
> <reporter classname="org.testng.reporters.JUnitXMLReporter">
> </reporter>
>
> Is there somewhere a mistake? It still doesn't work? (in the xml report are the wrong tagnames according to this structure:http://junitpdfreport.sourceforge.net/managedcontent/PdfTranslation)
> do I need a special xslt to transform the testng-xml to pdf?
>
> I also tried to mangage the whole pdf-generation within java and iText (http://www.lowagie.com/iText/) but it's complex..
>
> Thanks
> *d
> ---------------------------------------------------------------------
> Posted via Jive Forumshttp://forums.opensymphony.com/thread.jspa?threadID=111185&messageID=...
Regards, Jan
---------------------------------------------------------------------
Posted via Jive Forums
http://forums.opensymphony.com/thread.jspa?threadID=111185&messageID=257292#257292