运行FitNesse Web测试示例时出错

时间:2011-04-20 15:20:40

标签: selenium selenium-rc fitnesse webtest

我刚刚下载了FitNesse WebTest并在启动FitNesse和SeleniumRC后遇到了这个问题。

    start browser
System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation. ---> System.Net.WebException: Unable to connect to the remote server ---> System.Net.Sockets.SocketException: No connection could be made because the target machine actively refused it 127.0.0.1:4444
   at System.Net.Sockets.Socket.DoConnect(EndPoint endPointSnapshot, SocketAddress socketAddress)
   at System.Net.ServicePoint.ConnectSocketInternal(Boolean connectFailure, Socket s4, Socket s6, Socket& socket, IPAddress& address, ConnectSocketState state, IAsyncResult asyncResult, Int32 timeout, Exception& exception)
   --- End of inner exception stack trace ---
   at System.Net.HttpWebRequest.GetResponse()
   at Selenium.HttpCommandProcessor.DoCommand(String command, String[] args)
   at Selenium.HttpCommandProcessor.GetString(String commandName, String[] args)
   at Selenium.HttpCommandProcessor.Start()
   at Selenium.DefaultSelenium.Start()
   at com.neuri.webfixture.PlainSeleniumTest.startBrowser(String browser, String rcServer, Int32 rcPort, String seleniumURL)
   --- End of inner exception stack trace ---
   at System.RuntimeMethodHandle._InvokeMethodFast(Object target, Object[] arguments, SignatureStruct& sig, MethodAttributes methodAttributes, RuntimeTypeHandle typeOwner)
   at System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture, Boolean skipVisibilityChecks)
   at System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture)
   at System.RuntimeType.InvokeMember(String name, BindingFlags bindingFlags, Binder binder, Object target, Object[] providedArgs, ParameterModifier[] modifiers, CultureInfo culture, String[] namedParams)
   at fitlibrary.Method.Invoke(Object[] theParameters)
   at fitlibrary.Method.Invoke(Fixture theFixture, IEnumerable theCells)
   at fitlibrary.FlowFixtureBase.ExecuteMethod(Method theMethod, CellRange theCells)
   at fitlibrary.FlowFixtureBase.ProcessFlowRows(Parse theRows)

任何帮助都会受到赞赏,因为它让我发疯了。

1 个答案:

答案 0 :(得分:0)

听起来你没有启动selenium服务器,使用

启动它
java -jar c:\selenium\selenium-server.jar

假设您已在默认位置安装了selenium。