-
-
Notifications
You must be signed in to change notification settings - Fork 175
Expand file tree
/
Copy pathtest.hurl
More file actions
55 lines (48 loc) · 1.52 KB
/
Copy pathtest.hurl
File metadata and controls
55 lines (48 loc) · 1.52 KB
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
55
GET http://localhost:8080
HTTP 200
[Asserts]
body contains "Welcome to Corporate Conundrum"
body contains "Start a New Game"
body not contains "An error occurred"
GET http://localhost:8080/New%20Game.sql
HTTP 302
[Captures]
game_id: header "Location" regex "id=(-?\\d+)"
[Asserts]
header "Location" matches "^game\\.sql\\?id=-?\\d+$"
GET http://localhost:8080/game.sql?id={{game_id}}&Player=Alice
HTTP 200
[Asserts]
body contains "Players"
body contains "Alice"
body contains "Add a new player"
body not contains "An error occurred"
GET http://localhost:8080/next-question.sql?game_id={{game_id}}&player=Alice
HTTP 302
[Captures]
question_id: header "Location" regex "question%5Fid=(\\d+)"
[Asserts]
header "Location" contains "question.sql"
header "Location" contains "player=Alice"
GET http://localhost:8080/question.sql?game_id={{game_id}}&question_id={{question_id}}&player=Alice
HTTP 200
[Asserts]
body contains "Submit your answer"
body contains "Your answer"
body not contains "An error occurred"
GET http://localhost:8080/wait.sql?game_id={{game_id}}&question_id={{question_id}}&player=Alice&answer=42
HTTP 200
[Asserts]
body contains "Waiting for other players to answer"
body not contains "An error occurred"
GET http://localhost:8080/next-question.sql?game_id={{game_id}}&player=Alice
HTTP 302
[Asserts]
header "Location" contains "game-over.sql"
GET http://localhost:8080/game-over.sql?game_id={{game_id}}
HTTP 200
[Asserts]
body contains "The game is over"
body contains "Scores"
body contains "Alice"
body not contains "An error occurred"