title: How can I attach an image to TRX (Test Result Reported) File?
body: <p>I would like to my test takes screenshot when an error occur.</p>
  
  <p>I can write like this:</p>
  
  <pre><code>TestContext.WriteLine("aaaaaaaaa");
  </code></pre>
  
  <p>But how can I attach an image to a .TRX file?</p>
  
  <p><a href="https://msdn.microsoft.com/en-us/library/ms182495(v=vs.90).aspx" rel="nofollow">Test Result Reported (.TRX)</a></p>