I have a set of webtests for different applications testing a set of
features. Whenever a button is clicked, the response is saved in a file
based on the name of the application and the name of the feature that I am
testing. For example:
<clickButton description="click the submit button"
save="${output.application1.logon}/menu-" name="submit" />
would mean that the submit button is clicked for application1 while testing
the logon feature. The response is then saved under
${some_common_base_path}/application1/logon, for example.
Then I create a pretty HTML report using the "formatResults" task from
webtestsRunner.xml which applies WebTestReport.xsl on the test results XML
file. The web report looks just fine, but none of the "Resulting Page" links
point to the right files.
The response file for the example shown above is saved under
${some_common_base_path}/application1/logon/menu-_1192523069148_clickButton.
html, but the "Resulting Page" link for the same response actually points to
${some_common_base_path}/menu-_1192523069148_clickButton.html.
/application1/logon are missing from the path.
The XML test report contains the following entry:
<parameter name="resultFilename"
value="menu-_1192523069148_clickButton.html"/>
<parameter name="save" value="application1/logon/menu-"/>
The XSL template which should be rendering the "Resulting Page" links is:
<!-- Renders the link to a saved result page -->
<xsl:template match="[EMAIL PROTECTED]'resultFilename']">
<xsl:param name="linkText" select="'Resulting page'"/>
<br/>
<a target="_blank">
<xsl:attribute name="href">
<xsl:if test="$responses.dir">
<xsl:value-of select="$responses.dir"/>
<xsl:text>/</xsl:text>
</xsl:if>
<xsl:value-of select="@value"/>
</xsl:attribute>
<xsl:value-of select="$linkText"/>
</a>
</xsl:template>
It looks like the XSL transformation only uses the "resultingFilename" value
and does not work properly if the responses are not saved on the base folder
level.
How can I overcome this issue and have the "Resulting Page" links point to
the correct files?
Thanks,
Slave Jovanovski
smime.p7s
Description: S/MIME cryptographic signature

