You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
${SuiteJson} {"name":"This is a new test suite","description": "Use the description to add additional context details"}
10
+
${SectionJson} {"name":"Automated Section"}
11
+
${CaseJson} {"title": "This is a test case","type_id": 1,"priority_id": 3,"estimate": "3m","custom_steps_separated": [{"content": "Step 1","expected": "Expected Result 1"},{"content": "Step 2","expected": "Expected Result 2"}]}
12
+
${UpdateCaseJson} {"title": "This is a updated test case","type_id": 2,"priority_id": 2,"estimate": "15s","custom_steps_separated": [{"content": "Step 1","expected": "Expected Result 1"},{"content": "Step 2","expected": "Expected Result 2"}]}
13
+
14
+
*** Test Cases ***
15
+
GET PROJECT
16
+
&{resp}= GET index.php?/api/v2/get_project/1 headers=${headers}
17
+
Output schema response body
18
+
Output response body
19
+
Should Contain ${resp.body}.name Demo
20
+
Integer response body id 1
21
+
String response body name DemoAutomation
22
+
Integer response status 200
23
+
Output response body ${EXECDIR}/Reports/temp.json
24
+
25
+
ADD SECTION
26
+
POST index.php?/api/v2/add_section/1 body=${SectionJson} headers=${headers}
27
+
Output response body ${CURDIR}/temp.json
28
+
${json_object}= Load JSON From File ${CURDIR}/temp.json
29
+
Remove File ${CURDIR}/temp.json
30
+
${values}= Get Value From Json ${json_object} $.id
31
+
Set Suite Variable ${Section_id}${values[0]}
32
+
Integer response status 200
33
+
Integer response body id ${Section_id}
34
+
35
+
ADD CASE
36
+
POST index.php?/api/v2/add_case/${Section_id} body=${CaseJson} headers=${headers}
37
+
Output response body ${CURDIR}/temp.json
38
+
${json_object}= Load JSON From File ${CURDIR}/temp.json
39
+
Remove File ${CURDIR}/temp.json
40
+
${values}= Get Value From Json ${json_object} $.id
41
+
Set Suite Variable ${Case_id}${values[0]}
42
+
Integer response status 200
43
+
Integer response body id ${Case_id}
44
+
45
+
UPDATE CASE
46
+
POST index.php?/api/v2/update_case/${Case_id} body=${UpdateCaseJson} headers=${headers}
47
+
Integer response status 200
48
+
49
+
DELETE CASE
50
+
POST index.php?/api/v2/delete_case/${Case_id} body=${UpdateCaseJson} headers=${headers}
51
+
Integer response status 200
52
+
53
+
DELETE SECTION
54
+
POST index.php?/api/v2/delete_section/${Section_id} headers=${headers}
0 commit comments