locked
Unit test throw tcp\wcf communication RRS feed

  • Question

  • I have a server that gets and send TCP\WCF messages.

    I wrote a UT method that sends data receive it and return if the test succeeded.

    I would like to use the advance UT features of vs2010 like code coverage and test impact, Is there a way to do it?

    Regards,

    Ohad
    Tuesday, January 12, 2010 8:53 AM

Answers

  • Hello Ohad.

    The two links that I sent you basically show the same thing being done, but the first one through the Visual Studio IDE, and the second one through Microsoft Test Manager. If you have your test project inside your solution already, and the source code that these tests call into is available as part of the solution, then test impact wil work. Otherwise, it won't.

    Now, in order to have code coverage for your project, you just need to specify the right binaries to instrument via your solution's Test Settings file. Here's a link that shows you exactly how to do this:
    http://msdn.microsoft.com/en-us/library/ms182496.aspx

    Let me know if you have further questions.

    David Gorena Elizondo
    [MSFT] Visual Studio Team Test
    Thursday, January 21, 2010 12:47 AM

All replies

  • Have you tried installing Beta2?
    You can get it here: http://msdn.microsoft.com/en-us/vstudio/dd582936.aspx

    Thanks,
    David Gorena Elizondo
    [MSFT] Visual Studio Team Test
    Tuesday, January 12, 2010 11:11 PM
  • What do you mean?

    I'm using beta 2 but I'm not aware to any improvement regarding this issue?

    Regards,
    Wednesday, January 13, 2010 8:53 AM
  • Hi,

    Ok, I thought you were asking where to get features such as code coverage and test impact from. Specifically talking about the tests that you already created, how are you expecting to get code coverage and/or test impact? If you have binaries that you can instrument, you will be able to, if not, you won't.

    There are several blogs out there that talk about how these features work:
    http://blogs.msdn.com/phuene/archive/2009/12/07/test-impact-analysis-in-visual-studio-2010.aspx
    http://blogs.msdn.com/densto/archive/2009/06/29/test-impact-walk-through.aspx

    Thanks,
    David Gorena Elizondo
    [MSFT] Visual Studio Team Test
    Wednesday, January 13, 2010 10:36 PM
  • Hi David,
    Thanks for you replay, I read the links that you send.

    First of all, the testee project is in the same solution in VS 2010 so I can do what ever I want with it.

    What I want is some kind of combination between the 2 links that you send me.

    I want to run a test method like the unitTest that you sent but instead of calling directly to a method in the testee project I want to send and get buffer throw TCP , this of course works and I can use it to test my project with the unitTest project (but I'm doing it by running the TCP server project separately).

    Now I want also to get code coverage on the testee project .
    Maybe I can use the manual test mechanism some how? Can you think of other technique for doing so?

    I hope I was clear , Please tell me if it's still not clear enough.

    Regards,
    Ohad
    Sunday, January 17, 2010 6:28 AM
  • Hello Ohad.

    The two links that I sent you basically show the same thing being done, but the first one through the Visual Studio IDE, and the second one through Microsoft Test Manager. If you have your test project inside your solution already, and the source code that these tests call into is available as part of the solution, then test impact wil work. Otherwise, it won't.

    Now, in order to have code coverage for your project, you just need to specify the right binaries to instrument via your solution's Test Settings file. Here's a link that shows you exactly how to do this:
    http://msdn.microsoft.com/en-us/library/ms182496.aspx

    Let me know if you have further questions.

    David Gorena Elizondo
    [MSFT] Visual Studio Team Test
    Thursday, January 21, 2010 12:47 AM