Fitnesse 尝试加载“defaultPath”作为装配体
我试图通过指定 自定义转换器到 Slim http://www.syterra.com/FitSharp/SuiteConfigurationFile.html" rel="nofollow noreferrer">套件配置。
当我手动附加 ?test
(该按钮由于某种原因没有出现)时,出现以下异常:
__EXCEPTION__:System.IO.FileNotFoundException: 无法加载文件或程序集“file:///C:\Path\To\fitnesse\__defaultPath__”
知道为什么它会尝试从当前工作中将“defaultPath”加载为程序集目录?
以下是我的套件配置:
<?xml version="1.0" encoding="utf-8" ?>
<suiteConfig>
<ApplicationUnderTest>
<AddAssembly>C:\Path\To\TestsAssembly.dll</AddAssembly>
<AddNamespace>Tests_Namespace</AddNamespace>
<AddAssembly>C:\Path\To\fitSharp.dll</AddAssembly>
</ApplicationUnderTest>
<fitSharp.Machine.Application.Settings>
<Runner>fitSharp.Slim.Service.Runner</Runner>
</fitSharp.Machine.Application.Settings>
<fitSharp.Slim.Service.Service>
<AddOperator>NamespaceToConverter.NullableDecimalConverter</AddOperator>
</fitSharp.Slim.Service.Service>
</suiteConfig>
我的 Fitnesse wiki 页面如下所示:
!define TEST_SYSTEM {slim}
!define COMMAND_PATTERN {"%m" -c c:\Path\To\SlimConfig.xml %p}
!define TEST_RUNNER {C:\Path\To\fitsharp\Runner.exe}
|import|
... etc
I am trying to specify a custom converter to Slim by specifying a suite configuration.
When I manually append ?test
(the button doesn't appear for some reason), I get the following exception:
__EXCEPTION__:System.IO.FileNotFoundException: Could not load file or assembly 'file:///C:\Path\To\fitnesse\__defaultPath__'
Any idea why it would be trying to load "defaultPath" as an assembly from the current working directory?
Below is my suite configuration:
<?xml version="1.0" encoding="utf-8" ?>
<suiteConfig>
<ApplicationUnderTest>
<AddAssembly>C:\Path\To\TestsAssembly.dll</AddAssembly>
<AddNamespace>Tests_Namespace</AddNamespace>
<AddAssembly>C:\Path\To\fitSharp.dll</AddAssembly>
</ApplicationUnderTest>
<fitSharp.Machine.Application.Settings>
<Runner>fitSharp.Slim.Service.Runner</Runner>
</fitSharp.Machine.Application.Settings>
<fitSharp.Slim.Service.Service>
<AddOperator>NamespaceToConverter.NullableDecimalConverter</AddOperator>
</fitSharp.Slim.Service.Service>
</suiteConfig>
My Fitnesse wiki page starts like this:
!define TEST_SYSTEM {slim}
!define COMMAND_PATTERN {"%m" -c c:\Path\To\SlimConfig.xml %p}
!define TEST_RUNNER {C:\Path\To\fitsharp\Runner.exe}
|import|
... etc
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
如果您没有 !path,则它默认为“defaultPath”,因此这就是作为 %p 参数传递的内容。正如您所发现的,如果您没有!路径,则应该删除 %p。
If you don't have a !path, it defaults to 'defaultPath', so that's what was being passed as the %p parameter. As you discovered, you should remove the %p if you don't have a !path.
我可以通过从 COMMAND_PATTERN 中删除类路径参数 (%p) 来解决该问题:
I was able to work around the problem by removing the classpath parameter (%p) from COMMAND_PATTERN: