Nunit 如果从TeamCity的命令行运行测试,则生成错误的诱惑报告

Nunit 如果从TeamCity的命令行运行测试,则生成错误的诱惑报告,nunit,teamcity,nunit-console,allure,Nunit,Teamcity,Nunit Console,Allure,我面临以下问题: 我使用TeamCity的命令行,通过NUnit控制台运行测试。在输出时,我得到了错误的诱惑报告:错误的状态,没有错误的屏幕截图。如果通过cmd手动运行,则会正确生成报告。这个问题有什么解决办法吗 Allurelog: 2015-03-30 15:03:53,535 [EventPumpThread] ERROR NUnitAllureAdapter.AllureEventListener - Exception in TestFinished "NUnit.Core.TestR

我面临以下问题: 我使用TeamCity的命令行,通过NUnit控制台运行测试。在输出时,我得到了错误的诱惑报告:错误的状态,没有错误的屏幕截图。如果通过cmd手动运行,则会正确生成报告。这个问题有什么解决办法吗

Allurelog:

2015-03-30 15:03:53,535 [EventPumpThread] ERROR NUnitAllureAdapter.AllureEventListener - Exception in TestFinished "NUnit.Core.TestResult"
System.ComponentModel.Win32Exception (0x80004005): The handle is invalid
   at System.Drawing.Graphics.CopyFromScreen(Int32 sourceX, Int32 sourceY, Int32 destinationX, Int32 destinationY, Size blockRegionSize, CopyPixelOperation copyPixelOperation)
   at System.Drawing.Graphics.CopyFromScreen(Int32 sourceX, Int32 sourceY, Int32 destinationX, Int32 destinationY, Size blockRegionSize)
   at AllureCSharpCommons.Utils.AllureResultsUtils.TakeScreenShot()
   at NUnitAllureAdapter.AllureEventListener.TakeScreenshot()
   at NUnitAllureAdapter.AllureEventListener.TestFinished(TestResult result)

修改诱惑nunit配置文件。您必须更改false上的take screenshots after failed tests参数