none
How to show test case input in test results RRS feed

  • Question

  • Hi,

    I am doing unit testing in data driven fashion, I want to show my test case value inside the results panal , how can i achieve this.

    Thanks

    /Jay

    Sunday, September 2, 2012 4:15 AM

Answers

  • Hello Jay,

    Thank you for posting in the MSDN forum.

    We know that we can set up a unit test so that instead of typing values into a test method, we can retrieve the values from a data source. Based on your description, you want to show test case value in test results. I would like to know if you want to see the detailed results for each row of data. If so, you can double click the test in the Test Results window. Also you can right click the test case and select View Test Results Details to see the detailed test result.

    About data-driven unit testing, you can refer to this article :How to: Create a Data-Driven Unit Test .

    If I misunderstand something, please let me know.

    Thanks,


    Amanda Zhu [MSFT]
    MSDN Community Support | Feedback to us

    Monday, September 3, 2012 12:46 AM
    Moderator
  • Also if you want to display the datasource value, you can do a Console.Writeline(TestContext.DataRow["ColumnName"])

    Thanks,

    Anuj


    http://www.anujchaudhary.com

    Wednesday, September 5, 2012 12:11 AM

All replies

  • Hello Jay,

    Thank you for posting in the MSDN forum.

    We know that we can set up a unit test so that instead of typing values into a test method, we can retrieve the values from a data source. Based on your description, you want to show test case value in test results. I would like to know if you want to see the detailed results for each row of data. If so, you can double click the test in the Test Results window. Also you can right click the test case and select View Test Results Details to see the detailed test result.

    About data-driven unit testing, you can refer to this article :How to: Create a Data-Driven Unit Test .

    If I misunderstand something, please let me know.

    Thanks,


    Amanda Zhu [MSFT]
    MSDN Community Support | Feedback to us

    Monday, September 3, 2012 12:46 AM
    Moderator
  • Also if you want to display the datasource value, you can do a Console.Writeline(TestContext.DataRow["ColumnName"])

    Thanks,

    Anuj


    http://www.anujchaudhary.com

    Wednesday, September 5, 2012 12:11 AM
  • Hello Jay,

    Any update? Could you get useful information from our reply?

    Would you mind letting us know the result of the suggestion?

    Best regards,


    Amanda Zhu [MSFT]
    MSDN Community Support | Feedback to us

    Wednesday, September 5, 2012 12:18 AM
    Moderator