html - How to Count XSL Nodes? -


i have nodes generated after automation run xsl file need count (testcases - passed , failed) in suite node structured appear in below image

enter image description here

this link have xsl file https://sites.google.com/site/feras13545646/report.xsl?attredirects=0&d=1

you need use count function within xsl file count number of nodes contain particular value, in case count how many times "pass" or "fail" appear.

example snippet below:

<table border='0' width='100%'>     <tr><td><b>total tests passed:</b></td><td><xsl:value-of select="count(path/to/testresult[value = 'pass'])"/></td></tr>     <tr><td><b>total tests failed:</b></td><td><xsl:value-of select="count(path/to/testresult[value = 'fail'])"/></td></tr>              </table> 

the main node in here below:

<xsl:value-of select="count(path/to/testresult[value = 'pass'])"/> 

this specify value returned counting nodes in path "path/to/testresult" have value of pass.


Comments

Popular posts from this blog

basic authentication with http post params android -

vb.net - Virtual Keyboard commands -

css - Firefox for ubuntu renders wrong colors -