Re: testNG XSLT report generation gets failed...

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

Re: testNG XSLT report generation gets failed...

arjun ray

This error occur because we forget to add SaxonLiaison jar into our project or we forget to add processor="SaxonLiaison" as an attribute on <xslt> tag. Proper tag is given below.

<xslt in="${basedir}/build/test/results/testng-results.xml" style="${basedir}/testng-results.xsl" out="${basedir}/testng-xslt/index.html" processor="SaxonLiaison">

For more details go to this blog : http://startingwithseleniumwebdriver.blogspot.in/2014/03/some-error-and-solution-for-testng-xslt.html

On Monday, November 21, 2011 1:14:20 PM UTC+5:30, Nipun @ http://seleniumtesting-nx.blogspot.in/ wrote:
hi guys,
I am trying to use testNG xslt to generate reports. I have the
testing.xml that executes my test suite and then have my build xml to
run the TestNG xslt report generation. so after running the
'testing.xml' from eclipse, i took the cmd and executed the build.xml
by calling the ant <targetname> command.
My build.xml to run the testNG xslt report is as follows:

<project name="IBESanityScenarios" basedir=".">
    <property name="LIB" value="${basedir}/libs" />
    <path id="master-classpath">
            <pathelement location="${BIN}" />
            <fileset dir="${LIB}">
                <include name="**/*.jar" />
            </fileset>
        </path>
    <target name="testng-xslt-report">
        <delete dir="${basedir}/testng-xslt">
        </delete>
        <mkdir dir="${basedir}/testng-xslt">
        </mkdir>
        <xslt in="${basedir}/test-output/testng-results.xml"
                style="${basedir}/src/xslt/testng-results.xsl"
                                                        out="${basedir}/testng-xslt/index.html">

            <param expression="${basedir}/testng-xslt/"
name="testNgXslt.outputDir" />

            <param expression="true"
name="testNgXslt.sortTestCaseLinks" />

                <param expression="FAIL,SKIP,PASS,CONF,BY_CLASS"
name="testNgXslt.testDetailsFilter" />

            <param expression="true"
name="testNgXslt.showRuntimeTotals" />

            <classpath refid="master-classpath">
            </classpath>
        </xslt>
    </target>
</project>

However, i am getting the following error while doing the build:

D:\SeleniumWorkSpace\IBESanityScenarios>ant testng-xslt-report
Buildfile: D:\SeleniumWorkSpace\IBESanityScenarios\build.xml

testng-xslt-report:
   [delete] Deleting directory D:\SeleniumWorkSpace\IBESanityScenarios
\testng-xs
lt
    [mkdir] Created dir: D:\SeleniumWorkSpace\IBESanityScenarios
\testng-xslt
     [xslt] Processing D:\SeleniumWorkSpace\IBESanityScenarios\test-
output\testn
g-results.xml to D:\SeleniumWorkSpace\IBESanityScenarios\testng-xslt
\index.html
     [xslt] Loading stylesheet D:\SeleniumWorkSpace\IBESanityScenarios
\src\xslt\
testng-results.xsl
     [xslt] : Error! Syntax error in 'if
($testNgXslt.testDetailsFilter) then $t
estNgXslt.testDetailsFilter else 'FAIL,PASS,SKIP''.
     [xslt] : Error! file:/D:/SeleniumWorkSpace/IBESanityScenarios/src/
xslt/test
ng-results.xsl: line 23: Error parsing XPath expression 'if
($testNgXslt.testDet
ailsFilter) then $testNgXslt.testDetailsFilter else 'FAIL,PASS,SKIP''.
     [xslt] : Error! file:/D:/SeleniumWorkSpace/IBESanityScenarios/src/
xslt/test
ng-results.xsl: line 23: Required attribute 'select' is missing.
     [xslt] : Error! file:/D:/SeleniumWorkSpace/IBESanityScenarios/src/
xslt/test
ng-results.xsl: line 1085: Error parsing XPath expression 'if
($totalCount > 0)
then format-number($passedCount div $totalCount, '###%') else '100%''.
     [xslt] : Error! file:/D:/SeleniumWorkSpace/IBESanityScenarios/src/
xslt/test
ng-results.xsl: line 1085: Required attribute 'select' is missing.
     [xslt] : Fatal Error! Could not compile stylesheet
     [xslt] Failed to process D:\SeleniumWorkSpace\IBESanityScenarios
\test-outpu
t\testng-results.xml

BUILD FAILED
D:\SeleniumWorkSpace\IBESanityScenarios\build.xml:16: Fatal error
during transfo
rmation

Any idea why I am getting this?

--
You received this message because you are subscribed to the Google Groups "testng-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To post to this group, send email to [hidden email].
Visit this group at http://groups.google.com/group/testng-users.
For more options, visit https://groups.google.com/d/optout.
Reply | Threaded
Open this post in threaded view
|

Re: testNG XSLT report generation gets failed...

sudheer
This post has NOT been accepted by the mailing list yet.
The resolution for this issue is explained clearly in this blogger.

Please have a look at it..

http://tobeanexpert.blogspot.in/2015/05/generate-xslt-report-ant-buildxml.html

I hope this will helps you..

Thanks,
sudheer.
Reply | Threaded
Open this post in threaded view
|

Re: testNG XSLT report generation gets failed...

Sudheer Qa
In reply to this post by arjun ray
The resolution for this issue is explained clearly in this blogger. 

Please have a look at it.. 

http://tobeanexpert.blogspot.in/2015/05/generate-xslt-report-ant-buildxml.html

I hope this will helps you.. 

Thanks, 
sudheer.

On Thursday, March 27, 2014 at 10:53:51 PM UTC+5:30, Arjun Ray wrote:

This error occur because we forget to add SaxonLiaison jar into our project or we forget to add processor="SaxonLiaison" as an attribute on <xslt> tag. Proper tag is given below.

<xslt in="${basedir}/build/test/results/testng-results.xml" style="${basedir}/testng-results.xsl" out="${basedir}/testng-xslt/index.html" processor="SaxonLiaison">

For more details go to this blog : <a href="http://startingwithseleniumwebdriver.blogspot.in/2014/03/some-error-and-solution-for-testng-xslt.html" target="_blank" rel="nofollow" onmousedown="this.href='http://startingwithseleniumwebdriver.blogspot.in/2014/03/some-error-and-solution-for-testng-xslt.html';return true;" onclick="this.href='http://startingwithseleniumwebdriver.blogspot.in/2014/03/some-error-and-solution-for-testng-xslt.html';return true;">http://startingwithseleniumwebdriver.blogspot.in/2014/03/some-error-and-solution-for-testng-xslt.html

On Monday, November 21, 2011 1:14:20 PM UTC+5:30, Nipun @ <a href="http://seleniumtesting-nx.blogspot.in/" target="_blank" rel="nofollow" onmousedown="this.href='http://seleniumtesting-nx.blogspot.in/';return true;" onclick="this.href='http://seleniumtesting-nx.blogspot.in/';return true;">http://seleniumtesting-nx.blogspot.in/ wrote:
hi guys,
I am trying to use testNG xslt to generate reports. I have the
testing.xml that executes my test suite and then have my build xml to
run the TestNG xslt report generation. so after running the
'testing.xml' from eclipse, i took the cmd and executed the build.xml
by calling the ant <targetname> command.
My build.xml to run the testNG xslt report is as follows:

<project name="IBESanityScenarios" basedir=".">
    <property name="LIB" value="${basedir}/libs" />
    <path id="master-classpath">
            <pathelement location="${BIN}" />
            <fileset dir="${LIB}">
                <include name="**/*.jar" />
            </fileset>
        </path>
    <target name="testng-xslt-report">
        <delete dir="${basedir}/testng-xslt">
        </delete>
        <mkdir dir="${basedir}/testng-xslt">
        </mkdir>
        <xslt in="${basedir}/test-output/testng-results.xml"
                style="${basedir}/src/xslt/testng-results.xsl"
                                                        out="${basedir}/testng-xslt/index.html">

            <param expression="${basedir}/testng-xslt/"
name="testNgXslt.outputDir" />

            <param expression="true"
name="testNgXslt.sortTestCaseLinks" />

                <param expression="FAIL,SKIP,PASS,CONF,BY_CLASS"
name="testNgXslt.testDetailsFilter" />

            <param expression="true"
name="testNgXslt.showRuntimeTotals" />

            <classpath refid="master-classpath">
            </classpath>
        </xslt>
    </target>
</project>

However, i am getting the following error while doing the build:

D:\SeleniumWorkSpace\IBESanityScenarios>ant testng-xslt-report
Buildfile: D:\SeleniumWorkSpace\IBESanityScenarios\build.xml

testng-xslt-report:
   [delete] Deleting directory D:\SeleniumWorkSpace\IBESanityScenarios
\testng-xs
lt
    [mkdir] Created dir: D:\SeleniumWorkSpace\IBESanityScenarios
\testng-xslt
     [xslt] Processing D:\SeleniumWorkSpace\IBESanityScenarios\test-
output\testn
g-results.xml to D:\SeleniumWorkSpace\IBESanityScenarios\testng-xslt
\index.html
     [xslt] Loading stylesheet D:\SeleniumWorkSpace\IBESanityScenarios
\src\xslt\
testng-results.xsl
     [xslt] : Error! Syntax error in 'if
($testNgXslt.testDetailsFilter) then $t
estNgXslt.testDetailsFilter else 'FAIL,PASS,SKIP''.
     [xslt] : Error! file:/D:/SeleniumWorkSpace/IBESanityScenarios/src/
xslt/test
ng-results.xsl: line 23: Error parsing XPath expression 'if
($testNgXslt.testDet
ailsFilter) then $testNgXslt.testDetailsFilter else 'FAIL,PASS,SKIP''.
     [xslt] : Error! file:/D:/SeleniumWorkSpace/IBESanityScenarios/src/
xslt/test
ng-results.xsl: line 23: Required attribute 'select' is missing.
     [xslt] : Error! file:/D:/SeleniumWorkSpace/IBESanityScenarios/src/
xslt/test
ng-results.xsl: line 1085: Error parsing XPath expression 'if
($totalCount > 0)
then format-number($passedCount div $totalCount, '###%') else '100%''.
     [xslt] : Error! file:/D:/SeleniumWorkSpace/IBESanityScenarios/src/
xslt/test
ng-results.xsl: line 1085: Required attribute 'select' is missing.
     [xslt] : Fatal Error! Could not compile stylesheet
     [xslt] Failed to process D:\SeleniumWorkSpace\IBESanityScenarios
\test-outpu
t\testng-results.xml

BUILD FAILED
D:\SeleniumWorkSpace\IBESanityScenarios\build.xml:16: Fatal error
during transfo
rmation

Any idea why I am getting this?

--
You received this message because you are subscribed to the Google Groups "testng-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [hidden email].
To post to this group, send email to [hidden email].
Visit this group at http://groups.google.com/group/testng-users.
For more options, visit https://groups.google.com/d/optout.