public static string makeTestRequest()
        {
            TestElement te1 = new TestElement("test1");

            te1.addDriver("TestDriver.dll");
            te1.addCode("TestedCode.dll");
            TestElement te2 = new TestElement("test2");

            te2.addDriver("td1.dll");
            te2.addCode("tc1.dll");
            TestElement te3 = new TestElement("test3");

            te3.addDriver("AnotherTestDriver.dll");
            te3.addCode("AnotherTestedCode.dll");
            //TestElement tlg = new TestElement("loggerTest");
            //tlg.addDriver("logger.dll");
            TestRequest tr = new TestRequest();

            //.author = "Jim Fawcett";
            tr.tests.Add(te1);
            // tr.tests.Add(te2);
            tr.tests.Add(te3);
            //tr.tests.Add(tlg);
            //msg.body = tr.ToString();
            //return msg;

            return(tr.ToXml());
        }
 public static string errorMessage()
 {
     TestElement te1 = new TestElement("test1");
     te1.addDriver("Cannot Find the file TryToTest.dll---------->Requirement #3");
     TestRequest tr = new TestRequest();
     tr.tests.Add(te1);
     tr.author = "Sahil Shah";
     return tr.ToString();
 }
 public static string makeTestRequest()
 {
     TestElement te1 = new TestElement("test1");
     te1.addDriver("TestDriver1.dll");
     te1.addCode("DivideTest.dll");
     TestElement te2 = new TestElement("test2");
     te2.addCode("TestDriver2");
     te2.addCode("TestCode2.dll");
     TestRequest tr = new TestRequest();
     tr.author = "Sahil Shah";
     tr.tests.Add(te1);
     tr.tests.Add(te2);
     return tr.ToXml();
 }
        //-----<Another Request from client to Test Harness for "Console Client" >-------
        public static string makeAnotherTestRequest()
        {
            TestElement te3 = new TestElement("test3");
            te3.addDriver("TestDriver3.dll");
            te3.addCode("TestCode3.dll");
            TestElement te4 = new TestElement("test4");
            te4.addDriver("TestDriver4.dll");
            te4.addCode("TestCode4.dll");
            TestRequest tr = new TestRequest();
            tr.author = "Rishi Dabre";
            tr.tests.Add(te3);
            tr.tests.Add(te4);
            return tr.ToXml();

        }
        public static string makeTestRequestUI(string testname, List <string> testcode, string testdriver)
        {
            //to make test request using inputs from UI
            TestElement te1 = new TestElement(testname);

            te1.addDriver(testdriver);
            foreach (string file in testcode)
            {
                te1.addCode(file);
            }

            TestRequest tr = new TestRequest();

            tr.tests.Add(te1);

            return(tr.ToXml());
        }
Example #6
0
        //----< message creator >----------------------------------------

        /*
         * This is a placeholder using types defined in CommChannelDemo.MessageTest
         * You need a more efficient mechanism for creating messages.
         * Here's a suggestion:
         * - create MessageBody class for each message body type.
         * - use serializer, as demoed in TestDeserializer, to generate the
         *   body XML.
         * - On the other end deserialize, using the MessageBody type.
         */
        public string makeTestRequest()
        {
            TestElement te1 = new TestElement("test1");

            te1.addDriver("td1.dll");
            te1.addCode("t1.dll");
            te1.addCode("t2.dll");
            TestElement te2 = new TestElement("test2");

            te2.addDriver("td2.dll");
            te2.addCode("tc3.dll");
            te2.addCode("tc4.dll");
            BuildRequest tr = new BuildRequest();

            tr.author = "Jim Fawcett";
            tr.tests.Add(te1);
            tr.tests.Add(te2);
            return(tr.ToXml());
        }
Example #7
0
        public static string makeTestRequest()
        {
            TestElement te1 = new TestElement("test1");

            te1.addDriver("td1.dll");
            te1.addCode("t1.dll");
            te1.addCode("t2.dll");
            TestElement te2 = new TestElement("test2");

            te2.addDriver("td2.dll");
            te2.addCode("tc3.dll");
            te2.addCode("tc4.dll");
            TestRequest tr = new TestRequest();

            tr.author = "Karthik Bangera";
            tr.tests.Add(te1);
            tr.tests.Add(te2);
            return(tr.ToXml());
        }
        static void Main(string[] args)
        {
            Message msg = new Message();
            msg.to = "http://localhost:8080/ICommunicator";
            msg.from = "http://localhost:8081/ICommunicator";
            msg.author = "Sahil Shah";
            msg.type = "TestRequest";
            Console.Write("\n  Testing Message with Serialized TestRequest");
            Console.Write("\n ---------------------------------------------\n");
            TestElement te1 = new TestElement("test1");
            te1.addDriver("td1.dll");
            te1.addCode("tc1.dll");
            te1.addCode("tc2.dll");
            Console.Write("\n  Serialized TestRequest:");
            Console.Write("\n -------------------------\n");
            Console.Write(msg.body.shift());
            msg.showMsg();
#endif
        }
Example #9
0
        static void Main(string[] args)
        {
            Message msg = new Message();

            msg.to     = "http://localhost:8080/ICommunicator";
            msg.from   = "http://localhost:8081/ICommunicator";
            msg.author = "Karthik";
            msg.type   = "TestRequest";

            Console.Write("\n  Testing Message with Serialized TestRequest");
            Console.Write("\n ---------------------------------------------\n");
            TestElement te1 = new TestElement("test1");

            te1.addDriver("td1.dll");
            te1.addCode("tc1.dll");
            te1.addCode("tc2.dll");
            TestElement te2 = new TestElement("test2");

            te2.addDriver("td2.dll");
            te2.addCode("tc3.dll");
            te2.addCode("tc4.dll");
            TestRequest tr = new TestRequest();

            tr.author = "Karthik Bangera";
            tr.tests.Add(te1);
            tr.tests.Add(te2);
            msg.body = tr.ToXml();

            Console.Write("\n  Serialized TestRequest:");
            Console.Write("\n -------------------------\n");
            Console.Write(msg.body.shift());

            Console.Write("\n  TestRequest Message:");
            Console.Write("\n ----------------------");
            msg.showMsg();

            Console.Write("\n  Testing Deserialized TestRequest");
            Console.Write("\n ----------------------------------\n");
            TestRequest trDS = msg.body.FromXml <TestRequest>();

            Console.Write(trDS.showThis());
        }
Example #10
0
        //second build request
        public string CreateBuildRequest2()
        {
            TestElement te1 = new TestElement();

            te1.testName = "test1";
            te1.addDriver("TestDriver2.cs");
            te1.addTestConfiguration("C#");
            te1.addCode("ITest.cs");
            te1.addCode("CodeToTest2.cs");

            BuildRequest tr = new BuildRequest();

            tr.author    = "Nupur Kulkarni";
            tr.timeStamp = DateTime.Now;
            tr.tests.Add(te1);
            string trXml = tr.ToXml();

            Console.Write("\n   Build Request: \n{0}\n", trXml);
            return(trXml);
        }