我正在尝试使用FitSharp Suite Configuration File。我使用的是此页面所使用的确切格式,但是,每次尝试访问它时,都会出现以下错误:
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)
似乎AppDomainSetup不是套件配置的有效标签,但不能,因为它在该示例中使用。
发生了什么事?我该如何纠正这个问题? 我的最终目标是为测试装置使用两个配置文件。我需要同时使用App.config和wse3policyCache.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>
这是我正在使用的Fitnesse测试页面的开始
!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}
答案 0 :(得分:0)