/*----< Sends a testlog to Repo >----*/ private void sendTestLogToRepo(string testLog) { Console.WriteLine("TestHarness is sending a testlog to Repo Mock\n"); /*----< the load time of establishing connection to Repo Mock >----*/ Console.BackgroundColor = ConsoleColor.Black; Console.ForegroundColor = ConsoleColor.Green; Console.WriteLine("TestHarness is establishing a connection to Repo Mock\n"); Console.ResetColor(); CommMessage csndMsg = new CommMessage(CommMessage.MessageType.request); csndMsg.command = "TestLog"; csndMsg.author = "Theerut Foongkiatcharoen"; csndMsg.to = "http://localhost:9081/IPluggableComm"; csndMsg.from = "http://localhost:9050/IPluggableComm"; //testHarness csndMsg.arguments.Add(testLog); comm.postMessage(csndMsg); Thread.Sleep(500); bool testFileTransfer = true; testFileTransfer = comm.postFile(testLog, _testHarnessStoragePath); string _fullpath = Path.GetFullPath(_testHarnessStoragePath); if (testFileTransfer) { Console.BackgroundColor = ConsoleColor.Black; Console.ForegroundColor = ConsoleColor.Cyan; Console.WriteLine("TestHarness sending a file: {0} from {1} to RepoMock is successful\n", testLog, _fullpath); Console.ResetColor(); } else { Console.BackgroundColor = ConsoleColor.Black; Console.ForegroundColor = ConsoleColor.Red; Console.WriteLine("TestHarness sending a file: {0} from {1} to RepoMock failed\n", testLog, _fullpath); Console.ResetColor(); } }
//----< send the log to the repo >----------------- private void postLog() { testerComm.postFile(logName, logPath, repoLogPath); }
// Used for sending log file to repository void SendLog(string file) { bool transferSuccess = c.postFile(file, testersLocation, RepoPath); Console.WriteLine("Sending Log file " + file + " to Repository"); }