fitSharp
Abandon Story Test

We can throw an exception AbandonStoryTestException anywhere in fixture or Domain Adapter code to stop execution of the current story test. The exception can be constructed with a custom message which will appear in the test result.
 throw new AbandonStoryTestException();
 throw new AbandonStoryTestException("my message");

If a story test is executing in Flow Mode, we can also use the Abandon Story Test Keyword to stop execution.

when input is
story test fixture
checkplain test'sample domain adapter'

'throw abandon'

'other stuff'
'thats not processed'
sample domain adapter

throw abandon
Story test abandoned.

other stuff
thats not processed
'sample domain adapter'

'throw abandon'

'other stuff'
'thats not processed'
then output is
sample domain adapter

throw abandon
Story test abandoned.

other stuff
thats not processed

when input is
story test fixture
checkplain test'sample domain adapter'

'throw abandon' 'my message'

'other stuff'
'thats not processed'
sample domain adapter

throw abandon
my message
my message

other stuff
thats not processed
'sample domain adapter'

'throw abandon' 'my message'

'other stuff'
'thats not processed'
then output is
sample domain adapter

throw abandon
my message
my message

other stuff
thats not processed

when input is
story test fixture
checkplain testuse column with new 'sample domain adapter'
'throw abandon?'
x
y

'other stuff'
'thats not processed'
use column with new sample domain adapter
throw abandon?
x
Story test abandoned.
y

other stuff
thats not processed
use column with new 'sample domain adapter'
'throw abandon?'
x
y

'other stuff'
'thats not processed'
then output is
use column with new sample domain adapter
throw abandon?
x
Story test abandoned.
y

other stuff
thats not processed
Copyright © 2022 Syterra Software Inc. All rights reserved.