Esempio n. 1
0
 static void Main(string[] args)
 {
     Console.Title = "TestExec-Process Window";
     TestExec tc = new TestExec();
     tc.RequirementScreen();
     TestExec te = new TestExec();
     string intFace = ""; int writerCount = 0, readerCount = 0, remoteCount = 0;
     string remoteAddr = "",logging="",wpf="";
     List<int> lstPort = new List<int>();
     for (int i = 0; i < args.Length; ++i)
         DecideProcessExce(args, ref intFace, ref writerCount, ref readerCount, ref remoteCount, ref remoteAddr, ref logging, ref wpf, lstPort, ref i);
     string perfClient = "/Performance " + wpf;
     te.proc.startProcess("RemoteKeyValueDB/WPFWriterClient/bin/Debug/WpfApplication1.exe", perfClient);
     string serverCmd = remoteCount + " " + remoteAddr+" "+ wpf;
     te.proc.startProcess("RemoteKeyValueDB/Server/bin/debug/Server.exe", serverCmd);
     string bReqCmd = "/L " + lstPort[0].ToString() + " /R " + remoteCount + " /A " + remoteAddr + logging;
     te.proc.startProcess("RemoteKeyValueDB/BasicRequirementTest/bin/debug/TestExec.exe", bReqCmd);
     lstPort.RemoveAt(0);
     Thread.Sleep(3000);
     int h = 0;
     for (int k = 0; k < writerCount; k++)
     {
         string writerCmd = "/L "+ lstPort[h].ToString() +" /R "+remoteCount + " /A " + remoteAddr + logging +" /Performance "+wpf;
         h++;
         if (intFace == "GUI")
         {
             te.proc.startProcess("RemoteKeyValueDB/WriterClient/bin/debug/Client.exe", writerCmd);
         }
         else if(intFace=="Cons")
         {
             
             te.proc.startProcess("RemoteKeyValueDB/WriterClient/bin/debug/Client.exe", writerCmd);
         }
     }
     for (int j = 0; j < readerCount; j++)
     {
         string readerCmd = "/L " + lstPort[h].ToString() + " /R " + remoteCount +" /A "+ remoteAddr + logging + " /Performance " + wpf;
         h++;
         ProcessStarter proc = new ProcessStarter();
         //Start Reader client
         te.proc.startProcess("RemoteKeyValueDB/ReadClient/bin/debug/Client2.exe",readerCmd);
     }
 }
Esempio n. 2
0
 public TestExec()
 {
     proc = new ProcessStarter();
 }