コード例 #1
0
        private void FormPrincipal_Load(object sender, EventArgs e)
        {
            this.Text = "Motorola - MOD Factory Test - " +
                        String.Format("Version {0}", Assembly.GetExecutingAssembly().GetName().Version.ToString());

            this.dgvTestResult.DefaultCellStyle.Font = new Font("Consolas", 12);
            dgvTrackId.DataSource = null;
            dgvTrackId.DataSource = bindingListTS;
            bindingListTS.Clear();
            stationType = (TestCoreMessages.StationType)Enum.Parse(typeof(TestCoreMessages.StationType), data["SETTINGS"]["STATION"]);

            //Find all today trackids and put on datagridview.....
            tsBtnDay_Click(null, null);

            //Configure station screen
            ConfigureScreen(data["SETTINGS"] ["SIDE"]);

            tsTxtBoxTrackId.AcceptsReturn = true;
            tsTxtBoxTrackId.AcceptsTab    = true;

            tsTxtBoxTrackId.Focus();

            //Instanciate TestCoreController and TestSuite
            try
            {
                tc = new TestCoreController(WriteTestSummary);
            }
            catch (Exception ex)
            {
                WriteTestSummary(TestCoreMessages.TypeMessage.ERROR, ex.Message);
                WriteTestSummary(TestCoreMessages.TypeMessage.ERROR, "TestCoreController = null");
                isOkToRunTests = false;
                return;
            }
        }
コード例 #2
0
        public List <TestCaseBase> GetTestCasesList(TestCoreMessages.StationType stationType)
        {
            List <TestCaseBase> retList = new List <TestCaseBase>();

            switch (stationType)
            {
            case TestCoreMessages.StationType.A:
                retList = testCasesStationA;
                break;

            case TestCoreMessages.StationType.B:
                retList = testCasesStationB;
                break;

            case TestCoreMessages.StationType.C:
                retList = testCasesStationC;
                break;

            case TestCoreMessages.StationType.D:
                retList = testCasesStationD;
                break;
            }

            return(retList);
        }
コード例 #3
0
        public TestCoreSuite(TestCoreMessages.StationType stationType, TestCoreController testCoreController)
        {
            this.stationType = stationType;
            this.tcc         = testCoreController;

            loadTestCases(stationType);
        }
コード例 #4
0
        public void StartTests(string trackId, TestCoreMessages.StationType stationType)
        {
            //Do POST of this trackid
            if (isPostEnable)
            {
                MQS.Post();
            }

            TestCoreRunner tcr = new TestCoreRunner(this, trackId, stationType);

            tcr.RunTestsToStation();
        }
コード例 #5
0
        public TestCoreRunner(TestCoreController testCoreController, string trackId, TestCoreMessages.StationType stationType)
        {
            this.tcc            = testCoreController;
            this.trackId        = trackId;
            this.stationType    = stationType;
            this.threadRunTests = new Thread(() => run(testCases, this));
            this.modTrackId     = string.Empty;

            dicSambaModInfo = new Dictionary <string, string>();

            ts = new TestCoreSuite(stationType, tcc);

            testCases = ts.GetTestCasesList(stationType);
        }
コード例 #6
0
        private void loadTestCases(TestCoreMessages.StationType stationType)
        {
            switch (stationType)
            {
            case TestCoreMessages.StationType.A:
                testCasesStationA = new List <TestCaseBase>();
                break;

            case TestCoreMessages.StationType.B:
                testCasesStationB = new List <TestCaseBase>();
                //testCasesStationB.Add(new TestCasePowerOn(tcc));
                //testCasesStationB.Add(new TestCaseChargerVerification(tcc));
                //testCasesStationB.Add(new TestCaseLedVerification(tcc));
                //testCasesStationB.Add(new TestCaseMobileInterfaceCommunication(tcc));
                //testCasesStationB.Add(new TestCaseTunerVerification(tcc));
                break;

            case TestCoreMessages.StationType.C:
                testCasesStationC = new List <TestCaseBase>();
                //testCasesStationC.Add(new TestCaseMagneticTest(tcc));
                //testCasesStationC.Add(new TestCaseMobileInterfaceCommunicationStationC(tcc));
                //testCasesStationC.Add(new TestCaseBatteryTest(tcc));
                //testCasesStationC.Add(new TestCaseAntennaTest(tcc));
                //testCasesStationC.Add(new TestCaseLedVerificationWithCamera(tcc));
                break;

            case TestCoreMessages.StationType.D:
                testCasesStationD = new List <TestCaseBase>();
                //testCasesStationD.Add(new TestCasePowerOn(tcc));
                //testCasesStationD.Add(new TestCaseChargerVerification(tcc));
                //testCasesStationD.Add(new TestCaseLedVerification(tcc));
                //testCasesStationD.Add(new TestCaseMobileInterfaceCommunication(tcc));
                testCasesStationD.Add(new TestCaseTunerVerification(tcc));
                //testCasesStationD.Add(new TestCaseMagneticTest(tcc));
                //testCasesStationD.Add(new TestCaseMobileInterfaceCommunicationStationC(tcc));
                //testCasesStationD.Add(new TestCaseBatteryTest(tcc));
                //testCasesStationD.Add(new TestCaseAntennaTest(tcc));
                //testCasesStationD.Add(new TestCaseLedVerificationWithCamera(tcc));
                break;

            default:
                break;
            }
        }