testNG XSLT report generation gets failed...

85 views
Skip to first unread message

Nipun

unread,
Nov 21, 2011, 3:10:29 AM11/21/11
to Selenium Users
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?

Sudheer Qa

unread,
May 26, 2015, 5:01:55 AM5/26/15
to seleniu...@googlegroups.com
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.

Sudheer Qa

unread,
May 26, 2015, 1:01:26 PM5/26/15
to seleniu...@googlegroups.com
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 Monday, November 21, 2011 at 1:40:29 PM UTC+5:30, Nipun ( http://seleniumtesting-nx.blogspot.in/ ) wrote:
Reply all
Reply to author
Forward
0 new messages