[英]Using the Suite Config with Fitnesse
I am trying to use a Suite Configuration File with FitSharp. 我正在尝试将套件配置文件与FitSharp一起使用。 I am use the exact format that this page lays out, however, every time I try to access it, I get the following error:
我使用的是该页面的确切格式,但是,每次尝试访问它时,都会出现以下错误:
fitSharp.Machine.Exception.TypeMissingException: Type 'AppDomainSetup' not found in assemblies:
file:///C:/Windows/Microsoft.NET/Framework64/v4.0.30319/mscorlib.dll
file:///C:/Apps/FitSharp/4.0/Runner.exe
file:///C:/Apps/FitSharp/4.0/fitSharp.DLL
file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/System.Configuration/v4.0_4.0.0.0__b03f5f7f11d50a3a/System.Configuration.dll
file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/System/v4.0_4.0.0.0__b77a5c561934e089/System.dll
file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/System.Xml/v4.0_4.0.0.0__b77a5c561934e089/System.Xml.dll
file:///C:/Windows/Microsoft.Net/assembly/GAC_MSIL/System.Core/v4.0_4.0.0.0__b77a5c561934e089/System.Core.dll
at fitSharp.Machine.Engine.ApplicationUnderTest.FindType(NameMatcher typeName)
at fitSharp.Machine.Engine.TypeDictionary.GetItem(String typeName)
at fitSharp.Machine.Application.SuiteConfiguration.LoadNode(String typeName, XmlNode methodNode)
at fitSharp.Machine.Application.SuiteConfiguration.LoadXml(String configurationXml)
at fitSharp.Machine.Application.ArgumentParser.InvokeArgumentHandler(String switch, String argumentValue)
at fitSharp.Machine.Application.ArgumentParser.Parse(IList`1 commandLineArguments)
at fitSharp.Machine.Application.Shell.Run(IList`1 commandLineArguments)
It appears that AppDomainSetup is not a valid tag for a suite config, but that cannot be since it is used in that example. 看来AppDomainSetup不是套件配置的有效标记,但由于在该示例中使用了它,所以它不是有效标记。
What is going on? 到底是怎么回事? How would I correct this issue?
我该如何解决这个问题? My ultimate goal is to use two config files for the testing fixtures.
我的最终目标是为测试装置使用两个配置文件。 I need to use both an App.config and a wse3policyCache.config.
我需要同时使用App.config和wse3policyCache.config。
Here is my Suite Config 这是我的套件配置
<suiteConfig>
<AppDomainSetup>
<ApplicationBase>App</ApplicationBase>
<ConfigurationFile>D:\Projects\pathto\myproject\app.config</ConfigurationFile>
</AppDomainSetup>
<ApplicationUnderTest>
<AddAssembly>D:\Projects\pathto\myproject\bin\Debug\myproject.dll</AddAssembly>
<AddNamespace>myproject.Namespace</AddNamespace>
</ApplicationUnderTest>
<Culture>
<Name>en-AU</Name>
</Culture>
<Settings>
<Runner>fitSharp.Slim.Service.Runner</Runner>
</Settings>
<FileExclusions>
</FileExclusions>
<Slim.Operators>
</Slim.Operators>
<Fit.Operators>
<Add>my.Custom.Handler</Add>
<Remove>fit.Operators.ExecuteError</Remove>
</Fit.Operators>
</suiteConfig>
And here is the beginning of the Fitnesse Test page that I am using 这是我正在使用的Fitnesse Test页面的开始
!define TEST_SYSTEM {slim}
!define COMMAND_PATTERN {%m -c suite.config %p}
!define TEST_RUNNER {C:\Apps\FitSharp\4.0\Runner.exe}
!path D:\Projects\pathto\myproject\bin\Debug\myproject.dll
!define COLLAPSE_SETUP {true}
!define COLLAPSE_TEARDOWN {true}
The issue is that the documentation is not completely accurate. 问题在于文档不完全准确。 AppDomainSetup must be be fully qualified as
AppDomainSetup必须完全符合
<System.AppDomainSetup>
Thanks to the guys over at this forum post for helping me out. 感谢本论坛帖子中的各位帮助我。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.