Remove javascript in HtmlLogger - #4744
Conversation
commented
Nov 9, 2023
|
Not sure why build is failing. Also I'm having issues testing the |
commented
Nov 9, 2023
|
Those fails look unrelated to your change, maybe this is just flakiness. Let me know when you are done with your changes, and I can review and help you fix it the tests. Testing html logger is probably easiest if you build via build.cmd, it will create nuget in "artifacts\packages\Debug\Shipping\Microsoft.TestPlatform.17.9.0-dev.nupkg" that you can unpack and run vstest.console from there with --logger:html Vstest.console is in the package in this path: "tools\net462\Common7\IDE\Extensions\TestPlatform\vstest.console.exe" so e.g.: & "S:\p\vstest2\artifacts\packages\Debug\Shipping\Microsoft.TestPlatform.17.9.0-dev\tools\net462\Common7\IDE\Extensions\TestPlatform\vstest.console.exe" --logger:html s:\t\mstest81\bin\Debug\net8.0\mstest81.dll |
commented
Nov 9, 2023
|
/azp run |
commented
Nov 9, 2023
|
Azure Pipelines successfully started running 1 pipeline(s). |
commented
Nov 9, 2023
|
re-run, fails now on acceptance: You can also test that way. But you must always build.cmd before running the acceptance tests, we pick up all the runners from the produced nugets to ensure what we ship is working. So the workflow is a bit clunky. Adding some unit tests for the content produced by the html logger is probably not a bad idea. |
commented
Nov 10, 2023
|
Thanks, I let you know once I adapted the tests. |
commented
Nov 14, 2023
|
I fixed the issue and added an integration test. I can also confirm now that the look and feel of the pure |
commented
Nov 14, 2023
|
It's perfect, thank you :) |
commented
Nov 16, 2023
commented
Nov 17, 2023
Yes you are right, thanks for reporting 🙏 . Sorry I made a mistake in the |
commented
Nov 18, 2023
|
Cédric Luthi (@0xced) I checked this again today and it seems this is not related to the changes in this PR. The issue already exists in v17.9.0-preview-23531-01 which is before these changes. I analyzed this a bit further and the issue doesn't exist in v17.7.2 Could be that a dependency update caused this because there is definitely no change in the Continuing the analyzis by inspecting the generated |
commented
Nov 18, 2023
|
I have submitted #4754 with full reproduction steps. The "only" difference between the correct and the erroneous report is the SDK version (respectively 6.0.417 and 8.0.100). |
commented
Nov 20, 2023
|
Thanks for the analysis here Dave, it helped a lot. The issue was that with the new writer the settings from xslt were not copied, and it output a self-closing tag when there was no content in error-info. This is a valid XML syntax but not valid HTML syntax.
Same issue solved on SO: https://stackoverflow.com/questions/71357056/c-sharp-xslt-transformer-uses-self-closing-html-tags-which-are-invalid |
| } | ||
| </script> | ||
| <style> | ||
| <style> |
There was a problem hiding this comment.
This PR is merged, if this bothers you, please start a new PR with the fix.




Description
Remove javascript in
HtmlLoggers xslt templateRelated issue
closes #4365