【发布时间】:2015-04-23 04:14:20
【问题描述】:
我正在使用 NUnit GUI Runner 来执行我在 Selenium Webdriver C# 中开发的测试套件。
每次我收到错误 长度不能小于零。
如果我用绝对路径更改相对路径,那么它工作正常。相对路径是否有任何限制。请指教。
NUNIT 版本:2.6.4.14350 框架版本:Net 3.5 视觉工作室 2013
我的代码是这样的:
String relativePath = Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location); relativePath = relativePath.Substring(0, relativePath.IndexOf("TestResults"));
因此,如果我将 relativePath 的值更改为“C:\demo\”,那么它工作正常。
【问题讨论】:
标签: user-interface nunit runner