Fitnesse 尝试加载“defaultPath”作为装配体

发布于 2024-08-06 13:10:05 字数 1410 浏览 5 评论 0原文

我试图通过指定 自定义转换器到 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 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

南七夏 2024-08-13 13:10:05

如果您没有 !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.

清风无影 2024-08-13 13:10:05

我可以通过从 COMMAND_PATTERN 中删除类路径参数 (%p) 来解决该问题:

!define COMMAND_PATTERN {%m -c c:\Path\To\SlimConfig.xml}

I was able to work around the problem by removing the classpath parameter (%p) from COMMAND_PATTERN:

!define COMMAND_PATTERN {%m -c c:\Path\To\SlimConfig.xml}
~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文