【问题标题】:boost-test 'filename'.test.report.xml not found升压测试'文件名'.test.report.xml 未找到
【发布时间】:2015-10-05 15:48:07
【问题描述】:

我将Visual Studio 适配器用于Boost.Test。我使用cmake 构建了boost.test[v1.59] 项目。 我没有任何编译问题,但是当我尝试运行测试时,我得到如下输出:

Executing:   -> [BoostUnitTestSample]

filestream was found to be null when handling path: D:\Work\Project\dev\DesktopMSVC13_Project\src\ProjectTest\Debug\ProjectTest.exe.test.report.xml

Exception caught while running test batch D:\Work\Project\dev\DesktopMSVC13_Project\src\ProjectTest\Debug\ProjectTest.exe [BoostUnitTestSample] 
(File 'D:\Work\Project\dev\DesktopMSVC13_Project\src\ProjectTest\Debug\ProjectTest.exe.test.report.xml' not found.)

========== Run test finished: 0 run (0:00:03,6081912) ==========

如果我手动添加boost.test 项目,一切都会好起来

【问题讨论】:

  • 什么版本的Boost.Test?
  • 请将关键细节添加到问题中
  • 您需要说明您正在使用 Boost.Test 的 Visual Studio 适配器,否则人们会感到困惑,因为这些消息是由扩展而不是由 Boost.Test 生成的。

标签: c++ xml unit-testing boost-test


【解决方案1】:

我对@9​​87654321@(见评论)的经验告诉我,您忘记设置对运行测试所需的依赖项(通常是 DLL)的引用。我认为该消息是由标准测试执行引擎而不是由 Boost.Test 扩展创建的。这只是一种笨拙的说法“哦,测试没有运行,所以我可以找到结果......”

【讨论】:

  • 如何找到测试不运行的原因?我检查了BoostTestAdapter.dll.logdepends.exe {SolutionDir}\Debug\UnitTest.exe 也没有显示任何内容。
  • 我目前在使用 Visual Studio 2015、Boost 1.62 和 Boost Unit Test extension v. 1.0.7.57 时遇到调试问题。发现了测试,我可以运行测试,但无法调试它们。我可以以正常方式调试单元测试应用程序(“开始调试”),但不能“调试测试”。我现在没有智慧了。我工作了,但我错过了它停止工作的那一刻,所以目前没有机会修复它...... :-(
猜你喜欢
  • 2012-03-05
  • 1970-01-01
  • 2021-09-24
  • 1970-01-01
  • 2019-11-09
  • 1970-01-01
  • 2012-11-25
  • 1970-01-01
相关资源
最近更新 更多