Skip to content

Commit 640a3fe

Browse files
authored
Update README.md
1 parent 67d61cf commit 640a3fe

File tree

1 file changed

+34
-0
lines changed

1 file changed

+34
-0
lines changed

README.md

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -65,6 +65,40 @@ After identifying what number each device has, you can write your test case givi
6565
Given I wait for a signal containing "hi"
6666
Then I wait
6767

68+
## Kraken steps
69+
70+
Kraken offers two main steps to help synchronizing your devices.
71+
72+
### Signaling steps
73+
74+
To wait for a signal coming from another device for 10 seconds that is Kraken default timeout use the following step.
75+
76+
Then /^I wait for a signal containing "([^\"]*)"$/
77+
78+
To wait for a signal coming from another device for an specified number of seconds use the following step
79+
80+
Then /^I wait for a signal containing "([^\"]*)" for (\d+) seconds$/
81+
82+
To send a signal to another specified device use the following step
83+
84+
Then /^I send a signal to user (\d+) containing "([^\"]*)"$/
85+
86+
### Signaling functions
87+
88+
Kraken internal implementation of the signaling steps use the following functions.
89+
90+
#### readSignal(channel, content, timeout)
91+
92+
Waits for a signal with the specified content in the channel passed by parameter. This functions waits for the specified number of seconds in the timeout parameter before throwing an exception.
93+
94+
**Note: The channel parameter has to be the number of a device such as @user1, @user2, @userN**
95+
96+
#### writeSignal(channel, content)
97+
98+
Writes content to a channel passed by parameter.
99+
100+
**Note: The channel parameter has to be the number of a device such as @user1, @user2, @userN**
101+
68102
## Running your tests
69103

70104
To run your test:

0 commit comments

Comments
 (0)