fitSharp
Wait Until Keyword
The Wait Until keyword is one of the Flow Fixture Keywords. It executes a method repeatedly until it returns an expected result.

when input is
story test fixture
checkplain test'sample class'
'wait until' 'count by' 2 10
sample class
wait until count by 2 10
'sample class'
'wait until' 'count by' 2 10
then output is
sample class
wait until count by 2 10

By default, it tries 100 times in 1000 milliseconds (every 10 milliseconds) before failing. We can change these defaults by defining different Symbol Values for the symbols WaitFor.Time (in total time in milliseconds) and WaitFor.Count.

when input is
story test fixture
checkplain testconfigure symbols
save WaitFor.Time 'value of System.Int32' 20
save WaitFor.Count 'value of System.Int32' 10

'sample class'
'wait until' 'count by' 2 22
configure symbols
save WaitFor.Time value of System.Int32 20
save WaitFor.Count value of System.Int32 10

sample class
wait until count by 2 22 expected
20 actual
configure symbols
save WaitFor.Time 'value of System.Int32' 20
save WaitFor.Count 'value of System.Int32' 10

'sample class'
'wait until' 'count by' 2 22
then output is
configure symbols
save WaitFor.Time value of System.Int32 20
save WaitFor.Count value of System.Int32 10

sample class
wait until count by 2 22 expected
20 actual

Copyright © 2022 Syterra Software Inc. All rights reserved.