public void Run(string[] CommandLineArguments) { ParseCommandLineArguments(CommandLineArguments); reporter = MakeReporter(); clientSocket = new FitSocket(new SocketModelImpl(host, port), reporter); EstablishConnection(); var server = new SocketServer(clientSocket, configuration.GetItem<Service>(), reporter, true); server.ProcessTestDocuments(WriteResults); clientSocket.Close(); Exit(); }
public void ProcessTestDocuments(StoryTestWriter writer) { string document; while ((document = socket.ReceiveDocument()).Length > 0 && !suiteIsAbandoned) { reporter.WriteLine("processing document of size: " + document.Length); ProcessTestDocument(document, writer); IMaybeProcessingSuiteSetup = false; } reporter.WriteLine("\ncompletion signal received"); socket.Close(); if (suiteIsAbandoned) { throw new AbandonSuiteException(); } }
public void Run(IList<string> CommandLineArguments) { ParseCommandLineArguments(CommandLineArguments); reporter = MakeReporter(); clientSocket = new FitSocket(new SocketModelImpl(host, port), reporter); EstablishConnection(); var service = new Service(memory); var writer = new StoryTestStringWriter(service) .ForTables(WriteTables) .ForCounts(WriteCounts); var server = new SocketServer(clientSocket, service, reporter, true); server.ProcessTestDocuments(writer); clientSocket.Close(); Exit(); }
public int Run(string[] commandLineArguments, Configuration configuration, ProgressReporter reporter) { this.configuration = configuration; if(!ParseArgs(configuration, commandLineArguments)) { PrintUsage(); return ExitCode(); } clientSocket = new FitSocket(new SocketModelImpl(host, port), MakeReporter()); server = new SocketServer(clientSocket, new Service(configuration), MakeReporter(), false); clientSocket.EstablishConnection(Protocol.FormatRequest(pageName, usingDownloadedPaths, suiteFilter)); AddAssemblies(); server.ProcessTestDocuments(WriteTestRunner); HandleFinalCount(totalCounts); clientSocket.Close(); Exit(); resultWriter.Close(); return ExitCode(); }