简体   繁体   English

Fitnesse测试历史记录:所有测试成功但引发异常时,是否可以在TestHistory中将结果标记为黄色?

[英]Fitnesse Test History: is it possible to mark the result yellow in TestHistory when all tests are successful but there is an exception raised?

I believe someone with deep Fitnesse knowledge would help me. 我相信拥有深厚健身知识的人会为我提供帮助。

Use case: 用例:

I have a Fitnesse suite with a path to the results like 我有一个Fitnesse套件,可通往类似的结果

http://localhost/FrontPage.AutomatedTesting.FlightScenarios.Storage?pageHistory&resultDate=20130402183449

Here, all tests have completed successfully and marked as green . 在这里,所有测试均已成功完成,并标记为绿色 Sometimes (not always), I have an exception when running these tests. 有时(并非总是如此),运行这些测试时会出现异常。 Something like ... 就像是 ...

__EXCEPTION__:java.lang.IndexOutOfBoundsException: Illegal start index
    at java.util.regex.Matcher.find(Unknown Source)
    at fitnesse.slim.VariableStore.replaceSymbolsInString(VariableStore.java:63)
    at fitnesse.slim.VariableStore.replaceSymbol(VariableStore.java:53)

... ...

As a consequence, I have the result string marked yellow : 结果,我将结果字符串标记为yellow

Storage     36 Right    0 Wrong     0 Ignores   1 Exceptions    485072 ms 

I don't want to go into details why I have this exception. 我不想详细说明为什么会有这个例外。 All I want to say is at the moment I'm OK with having this exception and yellow notation. 我只想说一下我现在可以接受此异常和黄色符号。

What I don't like: 我不喜欢的东西:

In the TestHistory ... 在TestHistory中...

http://localhost/FrontPage.AutomatedTesting.FlightScenarios.Storage?testHistory

... I have these tests marked as red (I think, due to the exception described above). ...我将这些测试标记为红色 (我认为,由于上述异常)。 Something like ... 就像是 ...

Page    Pass    Fail    Latest  Last 20 Results
FrontPage.AutomatedTesting.FlightScenarios.Storage  68  18  02 Apr, 13 18:34    -   +   -   +   +   +   -   +   

... where "+" is marked as green when all tests are successful and there are no exceptions, and "-" is marked as red (not yellow) for two different cases : ...在所有测试成功且没有例外的情况下,其中“ +”标记为绿色,并且在两种情况下, “-”标记为红色(不是黄色)

1) some tests are red 1)一些测试是红色的

2) all tests are green, but there is an exception 2)所有测试均为绿色,但有例外

What I want: 我想要的是:

In TestHistory, "-" is marked as yellow when all tests are green, but there is an exception. 在TestHistory中, 当所有测试均为绿色时“-”被标记为黄色,但是有例外。

Is it doable? 可以吗 Just in case, I don't want to hear I don't need it. 以防万一,我不想听到我不需要它。 I do want to hear suggestions on how to get it done. 我确实想听听有关如何完成它的建议。

PS It looks like I found a workaround. PS看来我找到了解决方法。 If I have a test result file with the name like this ... 如果我有一个像这样的名称的测试结果文件...

20130325203754_36_0_0_1.xml 20130325203754_36_0_0_1.xml

... then I know, that I have 36 tests, 0 wrong, 0 ignored, 1 exception. ...然后我知道我有36个测试,0个错误,0个被忽略,1个异常。 So I rename this file to 20130325203754_36_0_0_0.xml from external test runner. 因此,我从外部测试运行程序将此文件重命名为20130325203754_36_0_0_0.xml。 After that, red turns to green in testHistory. 之后,在testHistory中红色变为绿色。 Not yellow, but better than red, at least for me at the moment. 至少对我而言,不是黄色,而是比红色更好。

Any other suggestions? 还有其他建议吗? I would vote for the ability to tune this thing in Fitnesse itself. 我会投票允许在Fitnesse本身中进行调整。

Thanks, Racoon 谢谢浣熊

This problem has been addressed by the FitNesse team. FitNesse团队已解决此问题。 If you update to the latest edge, you will get the fix. 如果您更新到最新版本,则将获得修复。

It will be in an official release sometime this spring. 它将在今年春天的某个时候正式发布。

In the future, I recommend posting something like this where there is a functional inconsistency as an issue on https://github.com/unclebob/fitnesse . 将来,我建议在https://github.com/unclebob/fitnesse上发布类似这样的功能存在问题的问题。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM