locked
Enable attribut in vstest runner RRS feed

  • Question

  • Hello,

    I'm using VS2013 and TFS2013. I’m trying to use the description attribute with the unit test.

    [Description("FunctionTest")]
    public void Xxxx()....

    The problem seems to be that the description isn’t processed. I don’t see it in the xml Log file, or in the resultTests of the tfs_warehouse database.

    Is there a way to tell which attribute you want to insert in the tfs_warehouse. I've read that MSTest.exe has an option /detail:, that tell the attribut we need. But I think VS2013 uses test runner, and it doesn't have this option.

    Anyone has an idea? Thanks,

    Hinibi.

    • Edited by Hinibi Monday, March 30, 2015 8:00 AM
    • Moved by Jamles Hez Monday, March 30, 2015 10:16 AM
    Friday, March 27, 2015 3:28 PM

Answers

  • Hi Hinibi,

    >>The problem seems to be that the description isn’t processed. I don’t see it in the xml Log file, or in the resultTests of the tfs_warehouse database.

    Generally the message would be in the trx file, for example, I get the trx file with MSTest, and then open the .trx file in test result window.

    But the real issue is that we have to add the "Description" columns in Test Result window.

    Best Regards,

    Jack


    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click HERE to participate the survey.

    Tuesday, March 31, 2015 4:07 AM
  • Hi Hinibi,

    I discuss this issue with the TFS build experts, we could also repro this issue, the real issue is that I run it with MsTest manually without using the TFS, and then open the .trx file with VS IDE. When we run it with the TFS build, it called the test runner, it doesn't share/output the Description information.

    So if you want to get the output, we need to run the test in command line with MsTest, and then open the .trx file with VS IDE.

    If you just want to use the TFS build, you could submit this feature request: http://visualstudio.uservoice.com/forums/121579-visual-studio. The Visual Studio product team is listening to user voice there.

    Best Regards,

    Jack


    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click HERE to participate the survey.


    Wednesday, April 8, 2015 6:47 AM

All replies

  • Hi Hinibi,

    This question is most likely about Unit Test, so it's better to post in Unit Test forum.

    Thanks for your understanding.


    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click HERE to participate the survey.

    Monday, March 30, 2015 10:15 AM
  • Hi Hinibi,

    >>The problem seems to be that the description isn’t processed. I don’t see it in the xml Log file, or in the resultTests of the tfs_warehouse database.

    Generally the message would be in the trx file, for example, I get the trx file with MSTest, and then open the .trx file in test result window.

    But the real issue is that we have to add the "Description" columns in Test Result window.

    Best Regards,

    Jack


    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click HERE to participate the survey.

    Tuesday, March 31, 2015 4:07 AM
  • Hi Jack,

    This is exactly what I want. But the description column stays empty for me.

    Even if I try an other attribut, like TestCategory, it doesn't work.

    I don't get it...

    thanks,

    Hinibi

    Tuesday, March 31, 2015 6:18 AM
  • Hi Hinibi,

    >>But the description column stays empty for me.

    Could you share me a screen shot about it? Do you open the trx file in the test result window? I use the VS2013 ultimate version, and then run a simple unit test like:

     [TestMethod]
            [Description("FunctionTest.............................................")]
            public void TestMethod1()
            {
                Assert.AreEqual(1,1);
            }
    

    Note: Since the .trx file is not supported in test result window if we run it in VS IDE, so we have to run the test in command line with "mstest.exe", and then open the trx file. 

    https://msdn.microsoft.com/en-us/library/ms182488.aspx?f=255&MSPPError=-2147217396

    Of course, we have to add the columan manually, since the description column doesn't share in test reuslt window in default.

    Best Regards,

    Jack


    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click HERE to participate the survey.

    Tuesday, March 31, 2015 7:27 AM
  • Hi Jack,

    even with a simple code like yours, it doesn't work for me.

    Also, I don't use the .trx file. Once the build server has finish I open the log and clic on the link in the section Test run completed.

    I'm a bit lost, I guess it's something that is not well configure with the build, but I don't see what...

    Hinibi.

    Tuesday, April 7, 2015 1:07 PM
  • Hi Hinibi,

    I discuss this issue with the TFS build experts, we could also repro this issue, the real issue is that I run it with MsTest manually without using the TFS, and then open the .trx file with VS IDE. When we run it with the TFS build, it called the test runner, it doesn't share/output the Description information.

    So if you want to get the output, we need to run the test in command line with MsTest, and then open the .trx file with VS IDE.

    If you just want to use the TFS build, you could submit this feature request: http://visualstudio.uservoice.com/forums/121579-visual-studio. The Visual Studio product team is listening to user voice there.

    Best Regards,

    Jack


    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click HERE to participate the survey.


    Wednesday, April 8, 2015 6:47 AM