问题
WCAT from Microsoft is as simple as it promises to be. Running it on Windows 7 x64 is not that straight forward though. The included script file breaks and the XML transformation for the output summary also uses MS-only features.
回答1:
You can still look at a formatted version of the log.xml using Internet Explorer 9, hitting F12 for the developer features and enable Browser Mode:"Compatibility View". This will allow the xsl transformation, which will not work anywhere else, as other browser complain about some invalid functions and syntax.
回答2:
If you have Visual Studio installed, you can also use it to apply the XSLT.
In Visual Studio 2012:
- Ensure that the XML file that WCAT created (log.xml) and the XSLT file (report.xsl) are in the same directory.
- Open the XML file.
- In VS2012, click on the XML menu > Start XSLT Debugging (or Start XSLT Without Debugging).
- Wait a few seconds for the result html file to be generated.
As an aside...
Remember that the1 WCAT 6.3 report.xsl file has some bugs/typos in it.
The report.xsl causes the the following errors when you transform with it:
- Variable 'i' has not been declared (line: 52, column: 13)
- The variable or parameter 'rowId' is either not defined or it is out of scope. (line: 1182, column: 37)
- The variable or par
You can fix this manually (reference):
- Cut the code on lines 1151-1157 and paste it on line 1146.
- On line 51 add: var i=0;
回答3:
Solution for WCAT 6.4.0:
- Cut the code on lines 1259-1265 and paste it on line 1293
- On line 53 add:
vari=0
回答4:
Valid report.xsl:
https://www.dropbox.com/s/avyuyc6bxzt5k6x/report.xsl?dl=0
I had the same issue, after which i went through the xsl file and fixed the code.
Unfortunatelly IE was still not displaying it correctly, however in Inspect Element the DOM seems to appear fine. So you need to save that into a HTML file and it should look fine after that.
回答5:
I use WCAT frequently and found that opening the log.xml file in IETester is reliable as you can select the IE8 rendering engine to consistently view the formatted report. No need to edit the xsl or find another viewer after IE upgrades.
回答6:
i have opened result.xsl in studio, start debugging, defined the 'result'.xml as input and start debugging. you will get 3 errors. all simple to fix. 1) add a 'var' before the i in a loop 2) remove the $ in the two other error lines works after that change
来源:https://stackoverflow.com/questions/11097084/wcat-report-xsl-invalid