中的相对路径有问题。在Visual Studio 2017中使用NUnit 3.13.3运行输出文件夹的设置

随
订阅者
297
文章
0
评论
测试交流评论133字数 234阅读0分46秒阅读模式
摘要我正在Visual Studio 2017中使用NUnit 3。我试图将TRX和XML测试结果存储到同一个输出文件夹中。我遇到的问题是。运行设置(&lt);结果目录(&am...

I am using NUnit 3 with Visual Studio 2017. I am trying to store both TRX and XML test results into the same output folder. The problem I am having is that the .runsettings <ResultsDirectory> path is relative to the Solution folder, whereas the <TestOutputXml> path is relative to the WorkingDirectory, which is not the same as the Solution directory. Thus, if I try to store the result output into a relative path using ".Results" for both .runsettings entries, I get two different Results folders - one in Bin, and the other in the Solution dir. I want one Results folder for both the TRX and XML output files to be in the same location (preferably relative to the Solution folder). How do I do this using .runsettings?

<?xml version="1.0" encoding="utf-8"?>
<RunSettings>
  <RunConfiguration>
    <!-- Path relative to VS solution directory -->
    <ResultsDirectory>.TestResults</ResultsDirectory>
  </RunConfiguration>
  <LoggerRunSettings>
    <Loggers>
      <Logger friendlyName="trx" enabled="True">
        <Configuration>
          <LogFileName>TestResults.trx</LogFileName>
        </Configuration>
      </Logger>
    </Loggers>
  </LoggerRunSettings>
  <NUnit>
    <!-- Path relative to NUnit working directory -->
    <TestOutputXml>.TestResults</TestOutputXml>
  </NUnit>
</RunSettings>
文章源自玩技e族-https://www.playezu.com/181624.html文章源自玩技e族-https://www.playezu.com/181624.html
 
匿名

发表评论

匿名网友
确定

拖动滑块以完成验证