/
background_server.txt
56 lines (44 loc) · 1.65 KB
/
background_server.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
*** Settings ***
Suite teardown Run keywords log handler messages Reset Rammbock
Resource async_resources.txt
Force tags background
*** Variables ***
${BACKGROUND}= ${False}
${PORT}= 44455
*** Test Cases ***
Serve on background
Run keyword if ${BACKGROUND} Serve
... ELSE Set test documentation Skipped because not run on background.
Loop on background
Run keyword if ${BACKGROUND} Serve on loop
... ELSE Set test documentation Skipped because not run on background.
*** Keywords ***
Serve on loop
Setup connection
Send sample
Load Template another
Set server handler my_handler.server_respond_to_another_max_100 header_filter=messageType interval=0.01
Load template sample response
Set server handler my_handler.server_respond_to_sample_response_max_100 header_filter=messageType interval=0.01
Wait until keyword succeeds 30s 0.5s Handler should have been called with '200' times with logging
Serve
Setup connection
Receive another
Send sample receive sample
Send another
Sleep 5
Send sample receive sample
Send sample
Receive sample response
Setup connection
Define example protocol
Define Templates
Start TCP server 127.0.0.1 ${PORT} name=ExampleServer protocol=Example
Touch ${SIGNAL FILE}
Accept connection
Send [arguments] ${message}
Load template ${message}
Server sends message
Receive [arguments] ${message}
Load template ${message}
Server receives message header_filter=messageType