0

In some of my tests I have to compare the content of XML files with some reference files (golden files approach). For comparing the XML files, I'm using XmlDiff, which produces HTML pointing out the differences of the files (see e.g. here).

Now, in case a test fails, it would be nice to have a link to the diff file as part of the test's message, such that the user can click on it and verify the differences in a browser (preferably within VS). Is that possible at all? I have tried See diff at C:\myabsolutepath\diff.html as well as See diff at file:C:\myabsolutepath\diff.html in the hope that VS test explorer would pick up the links, but without success...

Community
  • 1
  • 1
csoltenborn
  • 1,127
  • 1
  • 12
  • 22

2 Answers2

1

You've tried wrong file path formats. This one will work:

"file:///c:/myabsolutepath/diff.html"
Aleksey L.
  • 35,047
  • 10
  • 74
  • 84
0

This nice format for above

new Uri("c:/myabsolutepath/diff.html").AbsoluteUri
Nick
  • 138,499
  • 22
  • 57
  • 95
N Deol
  • 7
  • 3