Skip to content

Commit fc3743d

Browse files
author
luccasdasilvacandido
committed
[test]: add api tests to delete users
1 parent fbe963d commit fc3743d

File tree

2 files changed

+38
-0
lines changed

2 files changed

+38
-0
lines changed
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
*** Settings ***
2+
Documentation Test suite to verify a deletion of users in the API with invalid
3+
... data. Ensuring that the application returns appropriate error
4+
... messages when attempting to delete a user with invalid ID.
5+
6+
Resource ../../../../resources/api/api_common.resource
7+
8+
Suite Setup Start Api Session
9+
Test Setup Create User
10+
Suite Teardown Close Api Session
11+
Test Template Delete User With Invalid Data
12+
13+
*** Test Cases *** ID
14+
Invalid Id ${INVALID_DATA}
15+
16+
*** Keywords ***
17+
Delete User With Invalid Data
18+
[Arguments] ${id}
19+
${messages} Get fixture users response errors
20+
Send DELETE Request ${USERS}/${id} 200
21+
Response Should Contain Message ${DELETE_RESPONSE} message ${messages}[noRegistration]
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
*** Settings ***
2+
Documentation Test suite to verify a deletion of users in the API with valid
3+
... data. Ensuring that the application returns appropriate success
4+
... messages when attempting to delete a user with valid ID.
5+
6+
Resource ../../../../resources/api/api_common.resource
7+
8+
Suite Setup Start Api Session
9+
Test Setup Create User
10+
Suite Teardown Close Api Session
11+
12+
*** Test Cases ***
13+
Delete User
14+
${messages} Get fixture users response success
15+
Send DELETE Request /${USERS}/${POST_RESPONSE}[_id] 200
16+
Response Should Contain Message ${DELETE_RESPONSE} message ${messages}[successDelete]
17+

0 commit comments

Comments
 (0)