I've an app that takes seconds to go through a number of pages
(web-selenium) and get to a place where it uses a credit card to complete a
booking. Because I have several threads concurrently running stories, I'm
likely to encounter a situation where inventory has been depleted AFTER the
item has been placed in the cart. This is hard to cater for. What I really
want to do is start the booking again.
It would be a huge amount of state-modelelling and calling steps logic
outside of a steps invocation sequence ....
OR
... it would be simple to throw a recognized JBehave exception to restart
the scenario (or example table entry) if so desired.
if (page.hasItemUnavailableMessage()) {
throw new RestartScenarioException();
}
Thoughts?
- Paul