【发布时间】:2017-02-20 11:55:52
【问题描述】:
我试图执行一个示例 PNunit 测试,但它失败并出现以下错误
The test xxx couldn't be found in the assembly xxx.dll
我已关注 Pnunit 文档,但没有帮助。
这是测试用例
using NUnit.Framework;
namespace TestLibraries
{
[TestFixture]
public class PuniTest
{
[Test]
public void EqualTo19()
{
Assert.AreEqual(19, (15 + 4));
}
}
}
和 test.conf 文件
<TestGroup>
<Variables>
<Variable name="$agent_host" value="localhost" />
</Variables>
<ParallelTests>
<ParallelTest>
<Name>Testing</Name>
<Tests>
<TestConf>
<Name>Testing</Name>
<Assembly>pnunit35.dll</Assembly>
<TestToRun>TestLibraries.PuniTest.EqualTo19</TestToRun>
<Machine>$agent_host:8080</Machine>
</TestConf>
</Tests>
</ParallelTest>
</ParallelTests>
</TestGroup>
我已编译代码,将“pnunit35.dll”和“test.conf”文件复制到“NUnit.Runners.Net4.2.6.4\tools”文件夹以运行测试
并运行以下命令(在批处理文件中)以启动代理并从 Nunit 测试运行器文件夹运行脚本
start pnunit-agent 8080 .
pnunit-launcher test.conf
在运行批处理脚本时,测试失败并出现以下错误
The test TestLibraries.PuniTest.EqualTo19 couldn't be found in the assembly pnunit35.dll
有人可以调查一下吗?提前谢谢
【问题讨论】:
-
名字是
EqualTo19,不是EqualTo20 -
感谢您的快速响应。对不起,那是一个错字。出现其他测试的错误消息。实际消息是“在程序集 pnunit35.dll 中找不到测试 TestLibraries.PuniTest.EqualTo19”