JUnitReport works on the xml files produced by the JUnit task. You could write a task that would read the test durations out of the same xml files (TEST-*.xml). But you can also take a shortcut and just read the summary file created by JUnitReport (TESTS-TestSuites.xml) which has all the information in the single file.
A quick way to do this is to use a bit of xsl to just show the slowest tests:
<xsl:output method="text"/>
<xsl:template match="/">
<xsl:text> </xsl:text>
<xsl:for-each select="testsuites/testsuite">
<xsl:sort select="@time" data-type="number" order="descending" />
<xsl:value-of select="@name"/> : <xsl:value-of select="@time"/>
<xsl:text>
</xsl:text>
</xsl:for-each>
</xsl:template>
To run from Ant you do this:
<target name="show.slow.tests">
<xslt in="target/tests-results/TESTS-TestSuites.xml" out="target/slow.txt" style="slow.xsl"/>
</target>
Then you can just look at the first X lines to find the X slowest tests:
jfredrick$ head target/slow.txt
ForcingBuildShouldNotLockProjectInQueuedStateTest : 11.581
CruiseControlControllerTest : 7.335
AntBuilderTest : 6.512
Maven2BuilderTest : 4.412
CompositeBuilderTest : 2.222
ModificationSetTest : 2.05
NantBuilderTest : 2.04
CruiseControlConfigTest : 1.747
ProjectTest : 1.743
BuildLoopMonitorTest : 0.913