You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@maven.apache.org by "Vincent Massol (JIRA)" <ji...@codehaus.org> on 2005/05/29 21:57:34 UTC
[jira] Commented: (MPDASHBOARD-26) JUnit pass rate no longer showing
[ http://jira.codehaus.org/browse/MPDASHBOARD-26?page=comments#action_40215 ]
Vincent Massol commented on MPDASHBOARD-26:
-------------------------------------------
Wim, I'm trying to apply your patch but I don't understand it...
Could you please be more explicit (of course a SCM diff would be the best)? For example the junitpassrate.jelly file contains:
<j:jelly xmlns:j="jelly:core" xmlns:a="jelly:ant" xmlns:x="jelly:xml" xmlns:u="jelly:util">
<u:file var="artifactAsFile" name="${maven.dashboard.aggregator.junittests.artifact}"/>
<j:choose>
<j:when test="${artifactAsFile.exists()}">
<j:choose>
<x:set var="nbTests" select="sum($doc/testsuites/testsuite/@tests)"/>
<j:when test="${nbTests != 0}">
<x:parse var="doc" xml="${artifactAsFile}"/>
<x:expr select="floor(100 - 100 * (sum($doc/testsuites/testsuite/@failures) + sum($doc/testsuites/testsuite/@errors)) div sum($doc/testsuites/testsuite/@tests))"/>
%
</j:when>
<j:otherwise>
<j:expr value="-"/>
</j:otherwise>
</j:choose>
</j:when>
<j:otherwise>
<j:expr value="-"/>
</j:otherwise>
</j:choose>
</j:jelly>
What do you want to modify?
Thanks
> JUnit pass rate no longer showing
> ---------------------------------
>
> Key: MPDASHBOARD-26
> URL: http://jira.codehaus.org/browse/MPDASHBOARD-26
> Project: maven-dashboard-plugin
> Type: Bug
> Versions: 1.8
> Environment: Maven 1.0.2
> Dashboard 1.9
> Reporter: Wim Deblauwe
> Priority: Blocker
>
>
> JUnit passrates are no longer showing when using dashboard version
> 1.9. I traced the problem down to the JUnit aggregator. It contains
> these linen:
> <j:choose>
> <x:set var="nbTests" select="sum($doc/testsuites/testsuite/@tests)"/>
> <a:echo>nr of tests: ${nbTests}</a:echo>
> <j:when test="${nbTests != 0}">
> <x:parse var="doc" xml="${artifactAsFile}"/>
> <x:expr select="floor(100 - 100 *
> (sum($doc/testsuites/testsuite/@failures) +
> sum($doc/testsuites/testsuite/@errors)) div
> sum($doc/testsuites/testsuite/@tests))"/>
> %
> </j:when>
> <j:otherwise>
> <j:expr value="-"/>
> </j:otherwise>
> </j:choose>
> The problem is that the xml file is being parsed after the nr of unit
> tests has been calculated (using the $doc variable, but it is not
> initialized yet). The solution: move the parsing of the xml file
> higher, like this:
> <x:parse var="doc" xml="${artifactAsFile}"/>
> <j:choose>
> <x:set var="nbTests" select="sum($doc/testsuites/testsuite/@tests)"/>
> <a:echo>nr of tests: ${nbTests}</a:echo>
> <j:when test="${nbTests != 0}">
> <x:expr select="floor(100 - 100 *
> (sum($doc/testsuites/testsuite/@failures) +
> sum($doc/testsuites/testsuite/@errors)) div
> sum($doc/testsuites/testsuite/@tests))"/>
> %
> </j:when>
> <j:otherwise>
> <j:expr value="-"/>
> </j:otherwise>
> </j:choose>
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see:
http://www.atlassian.com/software/jira
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@maven.apache.org
For additional commands, e-mail: dev-help@maven.apache.org