public virtual void Setup() { client = new LauncherClient(); var httpResult = client.RequestFixtureLaunch(launcherUrl, 10); httpResult.ShouldPass(); proxy = XmlRpcProxyGen.Create(typeof(IRemoteClient)) as IRemoteClient; proxy.Url = httpResult.retrn as string; //RunKeyword("LaunchPageInBrowser", Urls.Google).ShouldPass(); BeforeTest(); }
public static StoryResult Run(this Story story, ILauncherClient client) { var storyResult = Behavior.Kernel.Get<StoryResult>(); storyResult.StoryName = story.Name; MapScenarios(story); testScenarios = Behavior.Kernel.Get<IScenarioBuilder>().Build(testScenarios); var fixtureUrl = "http://" + Behavior.Config.Host + "/" + Behavior.Config.FixtureContext; var httpResult = client.RequestFixtureLaunch(fixtureUrl, 10); if (httpResult.status.ToLower().Equals("pass")) { var proxy = XmlRpcProxyGen.Create(typeof(IRemoteClient)) as IRemoteClient; proxy.Url = httpResult.retrn.ToString(); storyResult = RunScenarios(storyResult, proxy); client.StopFixtureServer(fixtureUrl); storyResult.SetResult(); return storyResult; } else { var scenarioResult = new ScenarioResult(); scenarioResult.InteractionResults.Add(new InteractionResult(httpResult)); scenarioResult.SetResult(); storyResult.ScenarioResults.Add(scenarioResult); storyResult.SetResult(); return storyResult; } }