代码之家  ›  专栏  ›  技术社区  ›  Ben

GoogleTest可执行文件中的单元测试未被vstest拾取

  •  1
  • Ben  · 技术社区  · 8 年前

    我有一个(本地C++)可执行文件(TestJoosix.exe),其中包含一些GooGestEsts(1.7)。仅仅运行可执行文件就可以很好地工作,并且可以很好地通过测试。现在我想在tfs中自动运行这些测试,使用 vstest .

    不幸的是,申请 维斯特 在我的可执行文件上出现以下错误:

    C:\project>"C:\Program Files BLABLA \vstest.console.exe" test_descriptions.exe /platform:x64
    
    Warning: Using Isolation mode to run tests as required by effective Platform:X64 and .Net Framework:Framework45 settings for test run. Use the /inIsolation parameter to suppress this warning.
    Warning: No test is available in test_descriptions.exe. Make sure that installed test discoverers & executors, platform & framework version settings are appropriate and try again.
    

    知道吗?是否有更好的方法在TFS中运行这些测试(我考虑过只构建运行测试项目并让cmake的ctest完成工作)

    编辑:我还尝试添加 /UseVsixEntensions:true ,结果相同。

    1 回复  |  直到 8 年前
        1
  •  0
  •   Ben    8 年前

    结果发现对Google测试适配器的引用丢失了。 /UseVxisEntensions:true 已弃用,现在应该使用 \TestAdapterPath: 设置Google测试适配器的DLL的位置