如何在OrchardCMS 1.4中运行SpecFlow测试?
步骤:
单元测试会话中的结果 - 会话窗口:
...
error: Unable to locate <input> name SiteName in page html:
<html>
<head>
<title>A 'script' named 'jQuery' could not be found.</title>
<style>
...
</style>
</head>
<body bgcolor="white">
<span><H1>Server Error in '/' Application.<hr width=100% size=1 color=silver></H1>
<h2> <i>A 'script' named 'jQuery' could not be found.</i> </h2></span>
...
<b> Description: </b>An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.
<br><br>
<b> Exception Details: </b>System.InvalidOperationException: A 'script' named 'jQuery' could not be found.<br><br>
<b>Source Error:</b> <br><br>
<table width=100% bgcolor="#ffffcc">
<tr>
<td>
<code><pre>
Line 259: throw new InvalidOperationException(String.Format(CultureInfo.CurrentCulture, "A '{1}' named '{0}' could not be found.", settings.Name, settings.Type));
Line 260: }
<font color=red>Line 261: ExpandDependencies(resource, settings, allResources);
</font>Line 262: }
Line 263: requiredResources = (from DictionaryEntry entry in allResources</pre></code>
</td>
</tr>
</table>
<br>
<b> Source File: </b> ...OrchardCMS_1.4\src\Orchard\UI\Resources\ResourceManager.cs<b> Line: </b> 261
<br><br>
<b>Stack Trace:</b> <br><br>
<table width=100% bgcolor="#ffffcc">
<tr>
<td>
<code><pre>
[InvalidOperationException: A 'script' named 'jQuery' could not be found.]
Orchard.UI.Resources.ResourceManager.BuildRequiredResources(String resourceType) in F:\coding\zulatm\OrchardCMS_1.4\src\Orchard\UI\Resources\ResourceManager.cs:261
Orchard.Core.Shapes.CoreShapes.WriteResources(Object Display, TextWriter Output, String resourceType, Nullable`1 includeLocation, Nullable`1 excludeLocation) in F:\coding\zulatm\OrchardCMS_1.4\src\Orchard.Web\Core\Shapes\CoreShapes.cs:354
CallSite.Target(Closure , CallSite , CoreShapes , Object , TextWriter , String , ResourceLocation , Object ) +420
System.Dynamic.UpdateDelegates.UpdateAndExecuteVoid6(CallSite site, T0 arg0, T1 arg1, T2 arg2, T3 arg3, T4 arg4, T5 arg5) +1323
Orchard.Core.Shapes.CoreShapes.HeadScripts(Object Display, TextWriter Output) in F:\coding\zulatm\OrchardCMS_1.4\src\Orchard.Web\Core\Shapes\CoreShapes.cs:286
</body>
对于我尝试过的SpecFlow中的每个测试用例都显示了这一点。
答案 0 :(得分:0)
您是否尝试过使用源登记而不是下载1.4版本?
答案 1 :(得分:0)
没有构建所有解决方案。因此,没有构建Jquery模块,也没有JQuery脚本文件。愚蠢的错误!