Re: testNG XSLT report generation gets failed...

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

Re: testNG XSLT report generation gets failed...

Afreen Jamadar
Hi Nipun...
             After a lot of research finally even i have executed TESTNG XSLT report. One question, Are you running the build.xml file from eclipse or command prompt? I advise you to run it through command prompt. For some reasons i dont know why eclipse fails to run build.xml sometimes.
Let me know if u have any questions.All the best!

Regards,
Afreen Jamadar.

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 view this discussion on the web visit https://groups.google.com/d/msg/testng-users/-/iUNc-aHRBW0J.
To post to this group, send email to [hidden email].
To unsubscribe from this group, send email to [hidden email].
For more options, visit this group at http://groups.google.com/group/testng-users?hl=en.
Reply | Threaded
Open this post in threaded view
|

Re: testNG XSLT report generation gets failed...

MrBCut
Sorry I'm participating on a really old thread. Has this been resolved yet?

@Afreen - Hi. For me the build.xml compiles and executes fine in the Eclipse IDE, in fact it compiles and runs fine via command line, except for the target in question - I get the same error:

     [echo] performing testng suite...

report:
     [xslt] Processing C:\Users\BCutkelvin\workspace\AutomatedBVT\test-output\te
stng-results.xml to C:\Users\BCutkelvin\workspace\AutomatedBVT\testng-xslt\index
.html
     [xslt] Loading stylesheet C:\Users\BCutkelvin\workspace\AutomatedBVT\classp
ath_jars\testng-results.xsl
     [xslt] : Error! Syntax error in 'if ($testNgXslt.testDetailsFilter) then $t
estNgXslt.testDetailsFilter else 'FAIL,PASS,SKIP''.
     [xslt] : Error! file:///C:/Users/BCutkelvin/workspace/AutomatedBVT/classpat
h_jars/testng-results.xsl: line 23: Error parsing XPath expression 'if ($testNgX
slt.testDetailsFilter) then $testNgXslt.testDetailsFilter else 'FAIL,PASS,SKIP''
.
     [xslt] : Error! file:///C:/Users/BCutkelvin/workspace/AutomatedBVT/classpat
h_jars/testng-results.xsl: line 23: Required attribute 'select' is missing.
     [xslt] : Error! file:///C:/Users/BCutkelvin/workspace/AutomatedBVT/classpat
h_jars/testng-results.xsl: line 12: The method attribute of an <xsl:output> elem
ent had the value 'xhtml'.  The value must be one of 'xml', 'html', 'text', or q
name-but-not-ncname

On Wednesday, December 19, 2012 9:29:20 PM UTC-8, Afreen Jamadar wrote:
Hi Nipun...
             After a lot of research finally even i have executed TESTNG XSLT report. One question, Are you running the build.xml file from eclipse or command prompt? I advise you to run it through command prompt. For some reasons i dont know why eclipse fails to run build.xml sometimes.
Let me know if u have any questions.All the best!

Regards,
Afreen Jamadar.

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?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.