示例#1
0
        public void UUTCOCommandTest()
        {
            TestSets testCollections = Hydrator.Hydrate("CO Command Test", COCommandXML);

            ResponseProcessor.BindEvents(testCollections["Bootup"], Assembly.GetAssembly(typeof(TruePosition.Test.Custom.CSharp.CustomCommandEvents)));
            //ResponseProcessor.BindEvents(testCollections["Bootup"], Assembly.LoadFile(@"C:\Development\Kapsoft\True Position\Test Components\Output\Out.dll"));

            QFManager.Port.Create(PortType.Serial, "COM1");
            QFManager.Port.Receive("COM1", port_DataReceived);
            QFManager.Port.Error("COM1", port_Error);
            QFManager.Port.ReceiveTimeout("COM1", port_ReceiveTimeoutExpired);
            QFManager.Port.Open("COM1");

            Test test = testCollections["Bootup"]["1A"];

            QFManager.Test.Load(test, UUTTestMode.Direct);
            QFManager.Test.Stepping(test.Name, test_Stepping);
            QFManager.Test.TestStepped(test.Name, test_Stepped);
            QFManager.Test.Passed(test.Name, test_Passed);
            QFManager.Test.Failed(test.Name, test_Failed);

            QFManager.UUT.Load("LMU1", @"..\..\..\Documents\\UUT CO Response.xml", test, UUTTestMode.Direct);
            QFManager.UUT.Failed("LMU1", uut_Failed);
            QFManager.UUT.Passed("LMU1", uut_Passed);

            QFManager.UUT.Run("LMU1");
            QFManager.Test.Run(test.Name);

            System.Threading.Thread.Sleep(System.Threading.Timeout.Infinite);
        }
示例#2
0
        private static void Bind(DataLayer.Test test, string path)
        {
            if (string.IsNullOrEmpty(path))
            {
                path = Environment.CurrentDirectory;
            }
            else if (!Directory.Exists(path))
            {
                throw new ArgumentException("Path " + path + " does not exist.", "path");
            }

            DirectoryInfo directories = new DirectoryInfo(path);

            FileInfo[] files = directories.GetFiles("*.dll").Where(f => f.Name.StartsWith("TruePosition.Test.Custom")).ToArray();

            foreach (FileInfo info in files)
            {
                try
                {
                    Assembly.LoadFile(info.FullName);
                }
                catch (Exception ex) { }
            }

            foreach (Assembly assembly in AppDomain.CurrentDomain.GetAssemblies())
            {
                ResponseProcessor.BindEvents(test, assembly);
            }
        }
示例#3
0
        public void ActiveTestTest()
        {
            TestSets testCollections = Hydrator.Hydrate("CO Command Test", COCommandXML);

            ResponseProcessor.BindEvents(testCollections["Bootup"], Assembly.GetAssembly(typeof(TruePosition.Test.Custom.CSharp.CustomCommandEvents)));

            QFManager.Port.Create(PortType.Serial, "COM1");
            QFManager.Port.Receive("COM1", port_DataReceived);
            QFManager.Port.Error("COM1", port_Error);
            QFManager.Port.ReceiveTimeout("COM1", port_ReceiveTimeoutExpired);
            QFManager.Port.Open("COM1");

            Test test = testCollections["Bootup"]["1A"];

            QFManager.Test.Load(test);
            QFManager.Test.Failed(test.Name, test_Failed);
            QFManager.Test.Passed(test.Name, test_Passed);
            QFManager.Test.Run(test.Name);

            System.Threading.Thread.Sleep(System.Threading.Timeout.Infinite);
        }
示例#4
0
        public void COResponseFileTest()
        {
            TestSets testCollections = Hydrator.Hydrate("CO Command Test", COCommandXML);

            ResponseProcessor.BindEvents(testCollections["Bootup"], Assembly.GetAssembly(typeof(TruePosition.Test.Custom.CSharp.CustomCommandEvents))); //Assembly.GetAssembly(typeof(TruePosition.Test.Custom.CSharp.CustomCommandEvents)));

            ResponseProcessor.Process("1A", testCollections["Bootup"]["1A"].Steps[0], "ESN: " + "\n" +
                                      "GBE_CTLR:     NOT INSTALLED            " + "\n" +
                                      "GBE_LNA:      NOT INSTALLED            " + "\n" +
                                      "GBE:          NOT INSTALLED            " + "\n" +
                                      "GBE CUST ESN: NOT INSTALLED            " + "\n" +
                                      "LMU:          06162200D010082006501DA6 " + "\n" +
                                      "GPS RCVR:     06162200D010082006501DA6 " + "\n" +
                                      "RECEIVER:     06163900B0100820070403C2 " + "\n" +
                                      "BDC:          06164000C11008200704063B " + "\n" +
                                      "PSUPPLY:      06163400G0100820064300C1 " + "\n" +
                                      "CP/DSP:       06164100B1100820064700C2 " + "\n" +
                                      "DCARD:        06160301B010082006440005 " + "\n" +
                                      "EBOARD:       NOT INSTALLED            " + "\n" +
                                      "CUSTESN:      TRULMU5207872AE          " + "\n" +
                                      "TEMPERATURES: recvr 31 bdc 28 power supply 35" + "\n" +
                                      "TPESN:        06630000D010082007050130");
        }