tfs - 在TFS 2008上运行自动化测试

标签 tfs msbuild build-automation automated-tests

我们将TFS设置为在 checkin 时自动构建,这很好。

我们的问题是如何使单元测试在服务器上运行?

  • 我们如何在构建服务器上运行测试?
  • 我们如何在服务器上自动运行SQL脚本以构建测试数据库?
  • 我们需要在Build Server上安装Visual Studio吗?
  • 客户端上需要Visual Studio Test Edition吗?
  • 最佳答案

    打开您的TeamBuildType文件(TFSBuild.proj)。
    在其中,您会看到类似以下内容的评论...

    <!--  TEST ARGUMENTS
     If the RunTest property is set to true then the following test arguments will be used to run 
     tests. Tests can be run by specifying one or more test lists and/or one or more test containers.
    
     To run tests using test lists, add MetaDataFile items and associated TestLists here.  Paths can 
     be server paths or local paths, but server paths relative to the location of this file are highly 
     recommended:
    
        <MetaDataFile Include="$(BuildProjectFolderPath)/HelloWorld/HelloWorld.vsmdi">
            <TestList>BVT1;BVT2</TestList>
        </MetaDataFile>
    
     To run tests using test containers, add TestContainer items here:
    
        <TestContainer Include="$(OutDir)\HelloWorldTests.dll" />
        <TestContainer Include="$(SolutionRoot)\TestProject\WebTest1.webtest" />
        <TestContainer Include="$(SolutionRoot)\TestProject\LoadTest1.loadtest" />
    
     Use %2a instead of * and %3f instead of ? to prevent expansion before test assemblies are built
    -->
    

    关于tfs - 在TFS 2008上运行自动化测试,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/705616/

    相关文章:

    javascript - 在 Visual Studio 2010 中的另一个项目中引用 javascript 组件

    msbuild - 如何将 msbuild 生成的文件添加到 Azure 包

    msbuild - 如何在不引发错误的情况下停止 MSBuild 执行?

    msbuild - 尽管已导入证书,但由于 MSBuild ResolveKeySource 错误,CruiseControl.NET 服务仍无法构建

    tfs - 如何在TFS中组织工作项的层次结构?

    ant - 在Hudson中将命令行参数传递给Ant

    plugins - Gradle新插件安装

    本地和远程之间的 TFS 不同步 - 如何 "re-sync"?

    visual-studio-2010 - 如何使用 TFS 查看目录的更改日志?

    .net - 如何使用Visual Studio解决方案和TFS设置ElasticSearch数据备份?