尝试翻译JRUnit的文档(五)

 第四章 Configuration配置
    TestDriver提供了多个可以重载的方法,用来改变默认配置,比如下面的例子:
    
    /**
    * How long to wait for test results to be returned from the client(s). If goes longer than the
    * specified limit, will throw an exception and kill the running test cases. Default value is * RESULTS_TIMEOUT.
    * @return
    */
    /**
    等待结果从客户端返回的时间,如果超过这个时间将会抛出异常并且杀死运行中的test case,默认值是RESULTS_TIMEOUT.
    */
    protected long getResultsTimeout()
    {
        return RESULTS_TIMEOUT;
    }
    
    /**
    * How long for the server test case to wait for tear down message. If exceeds timeout,
    * will throw exception. The default value is TEARDOWN_TIMEOUT.
    * @return
    */
    /**
    服务器test case等待tear down消息的时间,超时也会抛出异常,默认值是TEARDOWN_TIMEOUT常量
    */
    protected long getTearDownTimeout()
    {
        return TEARDOWN_TIMEOUT;
    }
    
    /**
    * How long to allow each of the test cases to run their tests. If exceeds this timeout
    * will throw exception and kill tests. The default value is RUN_TEST_TIMEOUT.
    * @return
    */
    /**
    每个test case运行它们的测试的时间,超时会抛出异常并中止测试,默认值是RUN_TEST_TIMEOUT常量
    */
    protected long getRunTestTimeout()
    {
        return RUN_TEST_TIMEOUT;
    }
    
    /**
    * Returns the classpath to be added to the classpath used to start the client tests.
    * Default return is null, which means no extra classpath will be added.
    * @return
    */
    /**
    返回一个类路径(classpath),这个类路径会加入到系统启动客户端测试时所用的类路径中
    默认值是null,也就是说没有额外的类路径加入
    */
    protected String getExtendedClientClasspath()
    {
        return null;
    }
    
    /**
    * Returns the classpath to be added to the classpath used to start the server tests.
    * Default return is null, which means no extra classpath will be added.
    * @return
    */
    /**
    同上,用于服务器端的类路径
    */
    protected String getExtendedServerClasspath()
    {
        return null;
    }
    
    Configuration
    /**
    * Returns the VM arguments to be passed to the vm when creating the client test cases (actually their harness).
    * The default value is null.
    * @return
    */
    /**
    返回在创建客户端Test case时(实际上是它们的harness),传递给虚拟机的参数,默认为null
    */
    protected String getClientJVMArguments()
    {
        return null;
    }
    
    /**
    * Returns the VM arguments to be passed to the vm when creating the server test cases (actually their harness).
    * The default value is null.
    * @return
    */
    /**
    同上,这是关于服务器的
    */
    protected String getServerJVMArguments()
    {
        return null;
    }
    
    Gotchas(啥意思啊不懂,望高人指点)
    If see something werid like that:(werid又是什么意思呢?)
    junit.framework.AssertionFailedError: Method "Yourclass.class" not found
    
    检查一下看看你的测试类里面是不是有类似这样一个构造函数
    public Yourclass(String name) { super(NAME); // where NAME = "Yourclass.class" }
    
    
    翻译完了,感觉最后一段不知所云,就这么放上去吧,生平第一次翻译终告结束。去看个电影
  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值