【问题标题】:Why can't I specify TestAdaptersPaths in my runsettings file?为什么我不能在我的运行设置文件中指定 TestAdaptersPaths?
【发布时间】:2018-02-03 22:14:24
【问题描述】:

我正在努力让 NUnit 测试运行预部署到 Azure,因此我构建了一个应用程序来运行测试:

https://github.com/EdLichtman/HelloAzureCI

当我在自己的 PC 上运行此程序时,一切正常,3 个单元测试通过,一个失败(正如我所料,我正在测试 Environment AppSettings)

但是,当我部署到 Azure 时,我收到错误:无效设置“RunConfiguration”。意外的 XmlElement:“TestAdapterPaths”。

我什至在 Powershell 中自动创建了 .runsettings 文件,以确保直接路径 (D:\home\etc...) 被初始化为 TestAdaptersPaths,这样我就可以测试它是否不能找到我指定的 testAdaptersPaths 路径,但仍然出现错误。

我正在使用 Microsoft 的 .runsettings 指南中的确切拼写和树结构,为什么它不起作用?

【问题讨论】:

  • 我真的很想知道它为什么起作用,所以我没有回答我自己的问题,但如果有人遇到同样的问题,我使用的解决方案是:因为我不需要任何东西TestAdapterPath 我添加了 /TestAdapterPath:[Source] 而不是整个设置文件

标签: xml visual-studio azure vstest runsettings


【解决方案1】:

您好像缺少“s”。尝试使用TestAdaptersPaths 而不是TestAdapterPaths

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 2017-11-19
    • 2013-07-05
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多