locked
Unit testing with TFS RRS feed

  • Question

  • Hi,

    We have a product built using VS 2010 and TFS 2010 using continuous integration. The product uses a SQL Server database backend. We are implementing unit tests in the product code solution, most of these unit tests will access the SQL Server backend database. Is the most common way to test this via Lab Management in TFS by deploying the build to a clean image that has SQL Server available to it? Is this a very large overhead for continuous integration builds which are run for every check in?

    I guess it wouldn't make sense to have a SQL Server database available to the build server for the unit tests to run there?

    I'm just looking for some guidance as to whether this would be a sensible idea for unit testing the continuous integration builds. We will also need to have a smoke test which certainly should be done on another image but won't need to be executed for every check-in.

    Many thanks,

          Charles Gamble.

     


    Thursday, November 17, 2011 4:47 PM

Answers

  • Hi Charles,

    You might want to be careful integrating CI with Lab Management, this is a resource intense operation! If the team is very active at checking in, you might have to scale up the build hardware to manage the long running build operations.

    I would recommend unit tests to be run as part of the CI build, you can always initialize the test run with the set up you need and clean up after the test run.  The example here applies to VS 2010 as well => http://msdn.microsoft.com/en-us/library/ms379625(v=vs.80).aspx.

    You can however integrate lab management to the nightly build.

    - Have unit tests run as part of the CI build

    - Build a regression test suite by automating tests using MTM

    - Use the nightly build to integrate lab management and perform end to end testing.

    Some useful guidance from the ALM rangers on the Lab Management here => http://ralabman.codeplex.com/

    HTH
    Cheers, Tarun 


    Please remember to mark the replies as answers if they help.

    Tarun Arora

    Blog: http://geekswithblogs.net/TarunArora  Subscribe in a reader

    Thursday, November 17, 2011 8:29 PM

All replies

  • Hi Charles,

    You might want to be careful integrating CI with Lab Management, this is a resource intense operation! If the team is very active at checking in, you might have to scale up the build hardware to manage the long running build operations.

    I would recommend unit tests to be run as part of the CI build, you can always initialize the test run with the set up you need and clean up after the test run.  The example here applies to VS 2010 as well => http://msdn.microsoft.com/en-us/library/ms379625(v=vs.80).aspx.

    You can however integrate lab management to the nightly build.

    - Have unit tests run as part of the CI build

    - Build a regression test suite by automating tests using MTM

    - Use the nightly build to integrate lab management and perform end to end testing.

    Some useful guidance from the ALM rangers on the Lab Management here => http://ralabman.codeplex.com/

    HTH
    Cheers, Tarun 


    Please remember to mark the replies as answers if they help.

    Tarun Arora

    Blog: http://geekswithblogs.net/TarunArora  Subscribe in a reader

    Thursday, November 17, 2011 8:29 PM
  • Hi Charles,
     
    How about the issue now?
     
    Tarun have provided information, did them any help?

    If anything is unclear, please free feel to let me know.

    Best Regards,

     


    Lily Wu [MSFT]
    MSDN Community Support | Feedback to us
    Monday, November 21, 2011 7:17 AM
    Moderator