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

StackOverflow https://stackoverflow.com/questions/15783118

  •  31-03-2022
  •  | 
  •  

質問

I believe someone with deep Fitnesse knowledge would help me.

Use case:

I have a Fitnesse suite with a path to the results like

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:

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 ...

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

2) all tests are green, but there is an exception

What I want:

In TestHistory, "-" is marked as yellow when all tests are green, but there is an exception.

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.

P.S. It looks like I found a workaround. If I have a test result file with the name like this ...

20130325203754_36_0_0_1.xml

... then I know, that I have 36 tests, 0 wrong, 0 ignored, 1 exception. So I rename this file to 20130325203754_36_0_0_0.xml from external test runner. After that, red turns to green in 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.

Thanks, Racoon

役に立ちましたか?

解決

This problem has been addressed by the FitNesse team. 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.

ライセンス: CC-BY-SA帰属
所属していません StackOverflow
scroll top