Example #1
0
        /// <summary>
        /// This method is called to execute performance testing of the UUT for each test cases
        /// </summary>
        /// <param name="myTestInfo"></param>
        /// <param name="myUUTData"></param>
        /// <param name="myCommonData"></param>
        /// <returns></returns>
        public TestInfo DoTests(TestInfo myTestInfo, ref UUTData myUUTData, ref CommonData myCommonData)
        {
            try
            {
                if (myCommonData.IsFailureExist)
                {
                    return(myTestInfo);
                }

                switch (myTestInfo.GroupLabel)
                {
                case "InitStation":
                {
                    myInitStationTest.Execute(ref myTestInfo, ref myUUTData, ref myCommonData);
                    myNistData = myInitStationTest.myNistData;          // store NIST Data
                                                                        //YS Wong added to stop if fail 26 Jul 2018
                    if (myCommonData.IsFailureExist)
                    {
                        MessageBox.Show("Fail test", "Fail", MessageBoxButtons.OK);
                        myCommonData.Mode = "Abort";
                    }
                }
                break;

                case "SystemCalibration1":
                case "SystemCalibration2":
                case "SystemCalibration3":
                {
                    mySystemCalTest.Execute(ref myTestInfo, ref myUUTData, ref myCommonData);
                    if (myCommonData.IsFailureExist)
                    {
                        MessageBox.Show("Fail test", "Fail", MessageBoxButtons.OK);
                        myCommonData.Mode = "Abort";
                    }
                }
                break;

                case "CalLeakTest1":
                case "CalLeakTest2":
                case "CalLeakTest3":
                {
                    myCalLeakTest.Execute(ref myTestInfo, ref myUUTData, ref myCommonData);
                    if (myCommonData.IsFailureExist)
                    {
                        MessageBox.Show("Fail test", "Fail", MessageBoxButtons.OK);
                        myCommonData.Mode = "Abort";
                    }
                }
                break;

                case "ButtonUp":
                {
                    myButtonUpTest.Execute(ref myTestInfo, ref myUUTData, ref myCommonData, ListOfUUTLeakRate, ListOfUUTTempFactor, ListOfUUTTemp);
                    if (myCommonData.IsFailureExist)
                    {
                        MessageBox.Show("Fail test", "Fail", MessageBoxButtons.OK);
                        myCommonData.Mode = "Abort";
                    }
                }
                break;

                case "SystemMaintenance":
                {
                    mySysMaintenance.Execute(ref myTestInfo, ref myUUTData, ref myCommonData);
                    if (myCommonData.IsFailureExist)
                    {
                        MessageBox.Show("Fail test", "Fail", MessageBoxButtons.OK);
                        myCommonData.Mode = "Abort";
                    }
                }
                break;

                default:
                    break;
                }
                return(myTestInfo);
            }
            catch (Exception)
            {
                throw;
            }
        }