locked
Data Driven Test Results - Show information on result summary? RRS feed

  • Question

  • I am using Visual Studio 2010 Premium.

    I am running data driven unit tests, driving test inputs from an Excel spreadsheet.

    In the test results summary, I would like to show a summary for each row, so I can see what was tested.

    How can I add a column to the Data Driven Test Results view?

     

    I have found that if I edit the test results trx file I can add error output column and it appears in the summary result list.

    <TestRun><Results><UnitTestResult><InnerResults><Output><ErrorInfo>

      <Message>MY INFO HERE</Message>

    Can I do this from within a unit test?

    Many thanks,

    Edward Benson.

     

     

     

     

     

     

     

    I have found this thread from 

    Thursday, September 2, 2010 2:27 PM

Answers

  • Hello,

    As I know, currently it is not supported.

    In addition, you could also submit it on Connect for improving the quality and impacting the direction of Microsoft products.

    Thanks.


    Please remember to mark the replies as answers if they help and unmark them if they provide no help
    Tuesday, September 7, 2010 7:04 AM
    Moderator

All replies

  • Hello,

    As I know, we are not able to view all the tested data result for unit test in test result winodw, however, if you double click the test in the test result winodw, it will lead you to the detailed result window in which we can view the detailed result for each data from data source.

    Thanks.


    Please remember to mark the replies as answers if they help and unmark them if they provide no help
    Monday, September 6, 2010 5:33 AM
    Moderator
  • Yes, when I double-click the test, I see the detailed test results the row.

    My question was this: Is there a way for the test to add an annotation to Data Driven Test Results view, so I don't need to double-click into the detail view to see the annotation?

    Many thanks.

    Monday, September 6, 2010 12:42 PM
  • Hello,

    As I know, currently it is not supported.

    In addition, you could also submit it on Connect for improving the quality and impacting the direction of Microsoft products.

    Thanks.


    Please remember to mark the replies as answers if they help and unmark them if they provide no help
    Tuesday, September 7, 2010 7:04 AM
    Moderator
  • Hi Edwer

    "As I know, currently it is supported."

    That is great! But I cannot find how to do it.

    Many thanks,

    Edward.

    Tuesday, September 7, 2010 9:21 AM
  • Hello,

    Sorry, I made a big written mistake, it is not supported.

    Thanks.


    Please remember to mark the replies as answers if they help and unmark them if they provide no help
    Wednesday, September 8, 2010 6:02 AM
    Moderator
  • I was trying to find out how to do this as well.  I have a number of data driven tests and when they pass I see "Data Row" and it lists the row that passed, but not what the test name was.  I have a seperate column in each table called "TestName" that lists what that particular test row is doing.  I would really like to be able to configure it so that when a test is run that catagory can be displayed.  If possible please add this feature.

    Thank you,

    Shane

    Thursday, September 9, 2010 12:44 AM
  • Hi Shane,

     

    Didi you get this issues fixed. I also want to configure the datarow column to one of the test values like ID or name.

    Let me know how did you get it working.


    Thanks,

    Girish

    Wednesday, October 6, 2010 5:41 PM
  • is it also not supported in Visual Studio 2010?

    Thanks

    Tuesday, May 8, 2012 12:59 PM
  • Probably not supported in Visual 2010.

    Possible workaround:

    Since trx file is an xml file, you could transform it using xslt.

    In trx file, Each UnitTestResult XML element has an attribute with the record number being tested. e.g. dataRowInfo="7" 

    Using this number, you could find the related tested record in your data source.

    and use xslt to patch the value there (e.g. dataRowInfo="7 - ref=X56982").

    I could verify that patching manually did not break my trx in visual:

    Patched TRX displayed in Visual studio 2010

    Laurent


    Friday, December 7, 2012 5:13 PM