public void testExecutive() { Console.WriteLine("*******Requirement 13: Running Test execuitive to demonstrate requirements "); //upload files List <string> listFiles = new List <string>(System.IO.Directory.GetFiles(System.IO.Path.GetFullPath(repoPath) + "\\", "*.dll")); if (listFiles.Count > 0) { if (Repochannel == null) { createRepoChannel(); } foreach (string file in listFiles) { Console.WriteLine("**********Requirement 2 & 6: library file {0} sent to repository", file); //uploadFileToRepo(file, file.Substring(file.LastIndexOf("\\") + 1)); } //send test request XDocument testRquestDoc = new XDocument(); testRquestDoc = XDocument.Load(System.IO.Path.GetFullPath(testRequestPath)); TestRequest TRobj = testRquestDoc.ToString().FromXml <TestRequest>(); Messages.Message msg = new Messages.Message(); msg.body = testRquestDoc.ToString(); msg.type = "TestRequest"; msg.from = Comm <Client3> .makeEndPoint(url, clientPort); msg.to = Comm <Client3> .makeEndPoint(url, THport); msg.time = DateTime.Now; msg.author = TRobj.author; Console.WriteLine("**********Requirement 2 & 6: Test Request sent to TestHarness"); Console.WriteLine(msg.body); objComm.sndr.PostMessage(msg); //query for logs LogRequest objlogRequest = new LogRequest(); objlogRequest.author = authorName.Text; objlogRequest.TestRequestName = TestRequestQuery.Text; Messages.Message logMessage = new Messages.Message(); logMessage.author = authorName.Text; logMessage.body = objlogRequest.ToXml(); logMessage.to = Comm <Client3> .makeEndPoint(url, repoPort); logMessage.from = Comm <Client3> .makeEndPoint(url, clientPort); logMessage.type = "LogRequest"; logMessage.time = DateTime.Now; objComm.sndr.PostMessage(logMessage); } }
public void getlogs() { LogRequest objlogRequest = new LogRequest(); objlogRequest.author = "Karthik"; objlogRequest.TestRequestName = "TestRequest1"; Messages.Message logMessage = new Messages.Message(); logMessage.author = "karu"; logMessage.body = objlogRequest.ToXml(); logMessage.to = Comm <Client> .makeEndPoint(url, repoPort); logMessage.from = Comm <Client> .makeEndPoint(url, clientPort); logMessage.type = "LogRequest"; logMessage.time = DateTime.Now; objComm.sndr.PostMessage(logMessage); }
//gets logs from the repository private void GetLogsButton_Click(object sender, RoutedEventArgs e) { LogRequest objlogRequest = new LogRequest(); objlogRequest.author = authorName.Text; objlogRequest.TestRequestName = TestRequestQuery.Text; Messages.Message logMessage = new Messages.Message(); logMessage.author = authorName.Text; logMessage.body = objlogRequest.ToXml(); logMessage.to = Comm <Client3> .makeEndPoint(url, repoPort); logMessage.from = Comm <Client3> .makeEndPoint(url, clientPort); logMessage.type = "LogRequest"; logMessage.time = DateTime.Now; objComm.sndr.PostMessage(logMessage); Console.WriteLine(""); }