【发布时间】:2018-02-15 20:23:39
【问题描述】:
情况:我们的客户设计为在一切正常时运行(无效)并在出现不良情况时抛出专门的异常(例如,使用已经存在的用户名注册用户)。
我们正在使用Slim Decision Tables。一个示例夹具如下所示:
public class MyFixture {
private final Client client;
private String someKey;
private String accessToken;
public MyFixture() {
client = initClient();
}
public void setSomeKey(final String someKey) {
this.someKey = someKey;
}
public void setAccessToken(final String accessToken) {
this.accessToken = accessToken;
}
public final void execute() {
// this execution may throw an Exception that inherits from RuntimeException
// and contains a String field called errorCode which can validate against
client.executeFailableRequest(someKey, accessToken);
}
}
问题:Fitnesse 将异常显示为黄色,但我希望将它们视为红色失败。这可能吗?
我们知道捕获异常并评估其内容是可能的,但更喜欢体积较小的方法。
【问题讨论】:
-
您能否详细说明您的客户是如何连接到 FitNesse 的?我的意思是:你使用 Fit 或 Slim 作为测试系统,你使用什么样的桌子,你的灯具是什么样的?
-
添加了更多细节。
标签: fitnesse