File tree Expand file tree Collapse file tree 5 files changed +50
-30
lines changed
Expand file tree Collapse file tree 5 files changed +50
-30
lines changed Original file line number Diff line number Diff line change 2525 GET / HTTP/1.1
2626 Host: google.com
2727 ```
28- - ** [ hands on] ** try on your own
29- - ** [ challenge] ** how to add headers?
30- what can you notice about the protocol structure?
28+ - ** 🛠 ️ [ hands on] ** try on your own
29+ - ** ☝️ [ challenge] ** how to add headers
30+ - ** ☝️ [ challenge ] ** what do you notice about the protocol structure?
3131- request
3232- response
3333 - status-line (code, reason)
4545
4646### How to setup a basic API testing/rpa project using the RequestsLibrary
4747- see README.md
48- - ** [ hands on] ** setup the environment and run selfcheck
48+ - ** 🛠️ [ hands on] ** setup the environment and run selfcheck
4949- basic example
5050 - testcase
5151 - resp.text
5252 - logs
53- - ** [ hands on] ** customize your own example with a different website
53+ - ** 🛠️ [ hands on] ** customize your own example with a different website
5454- test websites
5555 - https://httpbin.org/
5656 - https://jsonplaceholder.typicode.com/
57+ - ** 🛠️ [ hands on] ** test on the local httpbin server
5758
5859### How to perform different HTTP requests
5960- session example
6061 - configuration file
6162 - external and reusable resources
62- - ** [ hands on] ** customize adding a new website configuration and keyword
63+ - ** 🛠️ [ hands on] ** customize adding a new website configuration and keyword
6364- more on session example
6465 - parameters
6566 - json body
6667 - POST requests
67- - ** [ hands on] ** customize your own parameter and post a json
68- - other http methods on session example
68+ - ** 🛠️ [ hands on] ** use parameters with a new website
69+ - common parameters pitfalls
70+ - ** 🛠️ [ mob] ** post a json body
71+ - json session example
6972 - PUT requests
7073 - PATCH requests
7174 - DELETE requests
Original file line number Diff line number Diff line change 22Documentation Basic http testing suite example
33Library RequestsLibrary
44
5+
56*** Test Cases ***
7+
68Test GET from Google
79 [Tags] example
810 ${resp } = GET https://www.google.com
911 Should Contain ${resp.text } Google
12+
13+ # Test GET on a different website
14+
15+
16+ # Test GET on the local httpbin server
Original file line number Diff line number Diff line change 1+ *** Settings ***
2+ Documentation Http session testing suite example
3+ Library RequestsLibrary
4+ Resource config.robot
5+ Resource keywords.robot
6+
7+ Suite Setup Connect To Google
8+
9+
10+ *** Test Cases ***
11+
12+ Test GET On Session from Google
13+ [Tags] google
14+ ${resp } = GET On Session alias=${GOOGLE_ALIAS } url=/
15+ Should Contain ${resp.text } Google
16+
17+ Test GET on local httpbin with parameters
18+ [Tags] local-httpbin
19+ Connect To Local Httpbin
20+ ${resp } = GET On Session ${LOCAL_ALIAS } /anything params=a=b
21+
22+ # Test GET with parameters on a different website
23+
24+
25+ Test POST data body
26+ Connect To Local Httpbin
27+ ${body } = Set Variable this is a string content
28+ ${resp } = POST On Session ${LOCAL_ALIAS } /anything data=${body }
29+
30+ # Test POST json body
Original file line number Diff line number Diff line change 11*** Settings ***
2- Documentation Http session testing suite example
2+ Documentation Http json testing suite example
33Library RequestsLibrary
44Resource config.robot
55Resource keywords.robot
66
7- Suite Setup Connect To Google
87
98*** Test Cases ***
10- Test GET On Session from Google
11- [Tags] google
12- ${resp } = GET On Session alias=${GOOGLE_ALIAS } url=/
13- Should Contain ${resp.text } Google
14-
15-
16- Test GET on local httpbin with parameters
17- [Tags] local-httpbin
18- Connect To Local Httpbin
19- ${resp } = GET On Session ${LOCAL_ALIAS } /anything params=a=b
20-
21-
22- Test POST data body
23- Connect To Local Httpbin
24- ${body } = Set Variable this is a string content
25- ${resp } = POST On Session ${LOCAL_ALIAS } /anything data=${body }
26-
279
2810Test PUT json body
2911 Connect To Json Placeholder
@@ -33,18 +15,15 @@ Test PUT json body
3315 ... body=new body
3416 ${resp } = PUT On Session ${JSON_ALIAS } posts/1 json=${json_data }
3517
36-
3718Test PATCH json body
3819 Connect To Json Placeholder
3920 ${json_data } = Create Dictionary title=updated
4021 ${resp } = PATCH On Session ${JSON_ALIAS } posts/2 json=${json_data }
4122
42-
4323Test DELETE resource
4424 Connect To Json Placeholder
4525 ${resp } = DELETE On Session ${JSON_ALIAS } posts/3
4626
47-
4827Test filtering resources
4928 Connect To Json Placeholder
5029 ${resp } = GET On Session ${JSON_ALIAS } posts params=userId=1
Original file line number Diff line number Diff line change @@ -3,6 +3,7 @@ Library RequestsLibrary
33
44
55*** Test Cases ***
6+
67Test Json Response
78 Create Session jsonplaceholder https://jsonplaceholder.typicode.com verify=True
89 ${resp } = GET On Session jsonplaceholder /posts/1 expected_status=200
You can’t perform that action at this time.
0 commit comments