4

Test error message screenshot

Hi, I'm trying to make a "nice" test execution report and get the following elements:

  1. Message
  2. StackTrace
  3. Elapsed time

Test name and Test Outcome are easily taken as TestContext parameters, for output I'm using Console.SetOut(StreamWriter). List of attachments are also known (because they are created during report generated).

I'd try to use:

  • Console.SetError (returns null)
  • System.Envoirement.StackTrace (return some another message),
  • System.Diagnostic.StackTrace
4
  • 1
    Sure you want to build your own test-reports? Maybe some like this trx2html.codeplex.com will give you head start. Jan 14, 2015 at 14:55
  • Hi @NielsvanReijmersdal, thanks you for answer No, it is not a mandatory to create my own report, but unfortunately (possible, I looked in wrong place) I couldn't find where VS 2013 Community edition create/save trx files Jan 14, 2015 at 15:09
  • 2
    I am not really into the VS IDE, but I run my teams unit-test from the command-line with vstest.console.exe . This generates a trx file if you add /logger:trx Also see blogs.msdn.com/b/bhuvaneshwari/archive/2012/06/16/… Jan 14, 2015 at 15:15
  • Thanks again! Now I know another way to run unit test:) Unfortunately, when I run vstest.console.exe tests.dll all them are failed. After reading stackoverflow.com/questions/18698409/… (similar topic) I still have no answer (so, I try to run Webdriver Selenium tests, written as VS unit test; when they run in VS - all OK) Jan 14, 2015 at 16:20

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy