We have a FitNesse/HSAC project with a bunch of tests that are structured essentially as follows:
SubSuite2's SuiteSetUp performs a particularly slow GET request using JsonHttpTest, and all tests in SubSuite2 do checks on the response of that request.
We chose to perform the request in a SuiteSetUp because FitNesse will run it right before the relevant test(s) in all these three cases:
However, nesting SuiteSetUps like this changes the test execution order as reported in FitNesse issue #131, which was closed as a WONTFIX.
This order change is undesirable in our case, as it makes the test reports hard to read/navigate and confuses both us and the client we're writing the tests for.
We would like to maintain execution order while still doing the slow request at most once, no matter how we run the tests.
Possible solutions I've come up with are:
I can't help but feel that there should be a way to solve this for all three cases without Java coding.
I googled extensively, but could not find any appropriate solution.
I've been racking my brain about this problem for hours, so an outside perspective would be most welcome :)
Note: Additionally, we'd like to do |show|response| somewhere so we can debug things if they go wrong, but the response is so large that just showing it takes FitNesse multiple seconds.
Only showing the response in the SuiteSetUp makes it easy to find while minimizing delay, while this solution makes it less trivial where to show the response.
Should be possible with FitNesse 20190628 (and higher) and add !define ALL_UNCLE_SUITE_SETUPS {true}
to your top-level suite