Example #1
0
 private void SetChart(Tests.Test t)
 {
     chart1.Series[0].Points.Clear();
     chart1.Series[0].Points.AddXY("总测试用例数量", t.resultInfo.totalCase);  //添加数据
     chart1.Series[0].Points.AddXY("成功用例数量", t.resultInfo.successCase); //添加数据
     chart1.Series[0].Points.AddXY("失败用例数量", t.resultInfo.failCase);    //添加数据
 }
Example #2
0
        private Test.Tests.Test GetTestClass(string _testName, string _testMethod, string _testVersion)
        {
            MyTestName    myTestName    = (MyTestName)Enum.Parse(typeof(MyTestName), _testName);
            MyTestMethod  myTestMethod  = (MyTestMethod)Enum.Parse(typeof(MyTestMethod), _testMethod);
            MyTestVersion myTestVersion = (MyTestVersion)Enum.Parse(typeof(MyTestVersion), _testVersion);

            Test.Tests.Test resultTest = t[(int)myTestName, (int)myTestMethod, (int)myTestVersion];
            return(resultTest);
        }
Example #3
0
 //将测试与图表显示代码抽象为该函数
 //四个参数分别是总数量,成功数量,失败数量以及测试的类
 private void TestTheTest(int _totalCase, int _successCase, int _failCase, Test.Tests.Test _test)
 {
     _test.StartTest();
     MessageBox.Show("测试已经完成");
     _test.resultInfo.totalCase   = _totalCase;
     _test.resultInfo.successCase = _successCase;
     _test.resultInfo.failCase    = _failCase;
     SetChart(_test);
 }
Example #4
0
 private void TestTheTest(Test.Tests.Test _test)
 {
     _test.StartTest();
     MessageBox.Show("测试已经完成");
     SetChart(_test);
 }