• junit源码之Runner


    Runner

      定义了执行用例的执行器方法。

    public abstract class Runner implements Describable {
        /*
        获取描述
         */
        public abstract Description getDescription();
    
        /**
         运行测试用例*/
        public abstract void run(RunNotifier notifier);
    
        /***/
        public int testCount() {
            return getDescription().testCount();
        }
    }

    ParentRunner

    @Override
        public void run(final RunNotifier notifier) {
            EachTestNotifier testNotifier = new EachTestNotifier(notifier,
                    getDescription());
            testNotifier.fireTestSuiteStarted();
            try {
                Statement statement = classBlock(notifier);
                statement.evaluate();
            } catch (AssumptionViolatedException e) {
                testNotifier.addFailedAssumption(e);
            } catch (StoppedByUserException e) {
                throw e;
            } catch (Throwable e) {
                testNotifier.addFailure(e);
            } finally {
                testNotifier.fireTestSuiteFinished();
            }
        }

    BlockJUnit4ClassRunner

       

  • 相关阅读:
    性能测试之-响应时间
    性能测试之-分类
    CSS 的基础语法
    linux之-mysql数据库约束3
    linux之-mysql数据库2
    linux安装mysql
    反向树状数组
    曼哈顿最小生成树
    最小生成树的性质
    CSA Round 84 Growing Trees
  • 原文地址:https://www.cnblogs.com/zhangwanhua/p/7978892.html
Copyright © 2020-2023  润新知