Problem: writing parameter values to data driven MSTEST output

Posted by Shubh on Stack Overflow See other posts from Stack Overflow or by Shubh
Published on 2010-06-02T23:45:21Z Indexed on 2010/06/02 23:54 UTC
Read the original article Hit count: 270

Filed under:
|

Hi,

I am trying to extract some information about the parameter variants used in an MSTEST data driven test case from trx file. Currently, For data driven tests, I get the output of same testcase with different inputs as a sequence of tags , but there is no info about the value of the variants.

Example:

Suppose we have a [data driven]TestMethod1() and the data rows contain variations a and b. There are two variations a=1,b=2 for which the test passes and a=3,b=4 for which the test fails.

If we can output the info that it was a=1,b=2 which passed and a=3 b=4 which failed in the trx file; the output will be meaningful.

  • Better information about test case runs from the output file alone(without any dependencies).
  • Investigating the test failure without rerunning the whole set
  • If the data rows change in data source(now a=1,b=2 pass and a=5,b=6 fail) , easy to decipher that the errors are different; although the fail sequence is still the same(row 0 pass row 1 fail but now row1 is different)

Has any of you gone through a similar problem? What did you follow? I tried to put the parameter value information in the Description attribute of TestMethod, it didnt work. Any other methods you think can work too?

thanks, Shubhankar

© Stack Overflow or respective owner

Related posts about c#

Related posts about mstest