我遇到了以下问题:我使用 TeamCity 的命令行通过 NUnit 控制台运行测试。在输出中,我得到了错误的 Allure 报告:错误的状态并且没有错误截图。如果通过 cmd 手动运行,则正确生成报告。这个问题有什么解决办法吗?
引诱日志:
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)