locked
Running unit tests in TFS 2008 with VS 2010 beta2 RRS feed

  • Question

  • Hi

    Is it possible to use VS2010 beta2 to run unit tests on TFS2008?

    We have recently upgraded our dev environment to Visual Studio 2010 beta2. We have a TFS2008-server running CI/unit tests nightly. With VS2008 Team Suite installed everything worked just fine. But when we installed VS2010 Ultimate beta2 on the TFS2008-server, the unit tests stopped working.

    The unit test projects have a reference to Microsoft.VisualStudio.QualityTools.UnitTestFramework.dll (version 9.0.0.0).  
    I tried to change this to version 10.0.0.0, but I was not allowed to do so. The reference could not be resolved by some reason. Maybe its because of different runtime versions. 10.0.0.0 uses .NET 4.0 and 9.0.0.0 uses .NET 2.0.. 

    I noticed that the UnitTestFramework.dll 10.0.0.0 is not installed in the GAC. Only 9.0.0.0. But the 10.0.0.0-version was installed in the GAC for the WebTestFramework.dll and LoadTestFramework.dll.

    The problem is that our customer doesn't have a VS2008 team suite/test license for the TFS-server, which is required for running unit tests.  
    I guess upgrading to TFS2010 will solve the problem, but we cant do that yet either.  

    Thanks!
    • Moved by Anutthara - MSFT Tuesday, December 22, 2009 5:41 PM (From:Visual Studio Team System 2010 Beta2)
    Monday, November 16, 2009 9:20 AM

Answers

  • Hi - sorry for the delayed response. Ensure your test project is upgraded to VS2010 from 2008. This happens automatically when you load the project in VS. The references will be updated to 10.0. However, re your req to build and run tests on a 2008 server, this is tricky - your test projects will now be .net 4 projects and the blog you link to basically gets msbuild from .net4.0 to build your sources. In that case, you will also need mstest from 2010 to run your unit tests. Effectively, you are better off switching your server to 2010 too
    http://blogs.msdn.com/anutthara
    Tuesday, December 22, 2009 5:39 PM

All replies

  • What od you mean sopped working?  Are they simply not running?  What error are you getting?

    As far as the reference in the project I would expect to see the opposite result.  when you load a 2008 test project into 2010 it will get upgraded to the latest versions of the test framework so you would see 10.0.0.0 instead of 9.0.0.0.

    Monday, November 16, 2009 3:40 PM
  • I get the following message:
    MSBUILD : warning : Visual Studio Team System for Software Testers or Visual Studio Team System for Software Developers is required to run tests as part of a Team Build.

    Which is the same message you get when you're trying to run unit tests in TFS without the proper version of Visual Studio installed.

    Thanks
    Friday, November 20, 2009 7:50 AM
  • Hi,

    We have run into the same problem.  We were able to get by several errors by following these instructions.

    We are now seeing the same error in our build log that you are seeing:

    MSBUILD : warning : Visual Studio Team System for Software Testers or Visual Studio Team System for Software Developers is required to run tests as part of a Team Build

    Have you been able to resolve this?

    Thanks,
    Trevor
    Wednesday, November 25, 2009 4:23 PM
  • Hi
    We have not solved the problem yet. To be honest I don't think it's possible to solve it either. 
    I think we have to do one of the following:  

    1. Upgrade to TFS2010 beta.
    2. Buy a new VS2008 licence and install it on the TFS-server. (which is a ridiculous thing to do, just to be able to run some unit tests) 

    Unfortunately we have ran into some other problems as well (See another post: http://social.msdn.microsoft.com/Forums/en-US/tfsprerelease/thread/4a5b35ce-cc41-4357-b5e7-3b2be5efddc3)

    Thursday, November 26, 2009 7:57 AM
  • Hi - sorry for the delayed response. Ensure your test project is upgraded to VS2010 from 2008. This happens automatically when you load the project in VS. The references will be updated to 10.0. However, re your req to build and run tests on a 2008 server, this is tricky - your test projects will now be .net 4 projects and the blog you link to basically gets msbuild from .net4.0 to build your sources. In that case, you will also need mstest from 2010 to run your unit tests. Effectively, you are better off switching your server to 2010 too
    http://blogs.msdn.com/anutthara
    Tuesday, December 22, 2009 5:39 PM
  • Thank you for your answer.
    We have some legacy systems that also have to be converted. So it will require some work.
    But hopefully we can upgrade to TFS2010 soon, which will solve our problems! 
    Tuesday, December 29, 2009 9:21 AM
  • Hi
    We have not solved the problem yet. To be honest I don't think it's possible to solve it either. 
    I think we have to do one of the following:  

    1. Upgrade to TFS2010 beta.
    2. Buy a new VS2008 licence and install it on the TFS-server. (which is a ridiculous thing to do, just to be able to run some unit tests) 

    Unfortunately we have ran into some other programs as well (See another post: http://social.msdn.microsoft.com/Forums/en-US/tfsprerelease/thread/4a5b35ce-cc41-4357-b5e7-3b2be5efddc3)


    Now I understand more about it, I just start to learn it, It's very useful.
    Tuesday, September 7, 2010 8:51 AM