ABCDEFGHIJKLMNOPQRSTUVWXYZ
1
IDEndpointRequestDescriptionRequest DataStatusHTTP ResponseExpected ResultActual Result
2
1baseURL/api/EmployeesPOSTValidate that an Employee can be added with only the required fields{
"firstName": "JOHN",
"lastName": "TESTING",
"username": "BetterCallJohn"
}
FAILED200 OKThe new Employee should be created with the firstName, lastName and username from the Request Data{
"partitionKey": "TestUser813",
"sortKey": "0f4fdc18-b561-4576-a1b8-dd91b99a17c3",
"username": "TestUser813",
"id": "0f4fdc18-b561-4576-a1b8-dd91b99a17c3",
"firstName": "JOHN",
"lastName": "TESTING",
...
The username is the username from the Authentication token.
3
2baseURL/api/EmployeesPOSTValidate that an Employee cann't be added when readOnly values (partitionKey, sortkey, gross, benefitsCost and net) are added into the request data
{
"firstName": "PAUL",
"lastName": "ALLEN",
"username": "PAULLEN",
"partitionKey": "PAULLEN",
"sortKey": "0f4fdc18-b561-4576-a1b8-ddaaaaaa",
"salary": 52000,
"gross": 2000,
"benefitsCost": 400,
"net": 1961.5385
}
FAILED200 OKThe New Employee shouldn't be created, or the Response should be a 400 Bad Request, since some ReadOnly values were given a value.{
"partitionKey": "TestUser813",
"sortKey": "78881af1-a53c-4a1d-9f73-ae21b1191d9f",
"username": "TestUser813",
"id": "78881af1-a53c-4a1d-9f73-ae21b1191d9f",
"firstName": "PAUL",
"lastName": "ALLEN",
"dependants": 0,
"salary": 52000,
"gross": 2000,
"benefitsCost": 38.46154,
"net": 1961.5385
}

The username and partitionKey are the username from the Authentication token. The benefitsCost and sortKey got overwritten.
The Respose was 200 OK
4
3baseURL/api/EmployeesGETValidate that the GET endpoint is working correctlyPASS200 OKThe list of all registered Employees should be in the response's Body.All registered Employees were presented
5
4baseURL/api/EmployeesPUTValidate that a details registered employee can be modified using the PUT endpoint and is working correctly using invalid request data{
"partitionKey": "SomePartition",
"sortKey": "78881000-a53c-4000-9000-ae21b1191000",
"username": "SomeUsername",
"id": "78881af1-a53c-4a1d-9f73-ae21b1191d9f",
"firstName": "Not Paul",
"lastName": "Not Allen",
"dependants": 10,
"salary": 260000,
"gross": 10000,
"benefitsCost": 192.3077,
"net": 9807.6923
}
FAILED200 OKThe Employee shouldn't be edited, the Response should be a 400 Bad Request since some ReadOnly values were given a value.
The Salary should have a control where it could only accept 52000 (2000 * 26) since the assuption is that all employees are paid 2000 per paycheck.
{
"partitionKey": "TestUser813",
"sortKey": "78881af1-a53c-4a1d-9f73-ae21b1191d9f",
"username": "TestUser813",
"id": "78881af1-a53c-4a1d-9f73-ae21b1191d9f",
"firstName": "Not Paul",
"lastName": "Not Allen",
"dependants": 10,
"salary": 260000,
"gross": 10000,
"benefitsCost": 230.76926,
"net": 9769.23
}
6
5baseURL/api/EmployeesPUTValidate that a details registered employee can be modified using the PUT endpoint and is working correctly using valid request data{
"id": "78881af1-a53c-4a1d-9f73-ae21b1191d9f",
"firstName": "TESTINGS",
"lastName": "FUNNY APIS",
"dependants": 32
}
PASS200 OKThe Employee with that ID should now have the new firstName, lastName, dependants, and benefitsCost fields.{
"partitionKey": "TestUser813",
"sortKey": "78881af1-a53c-4a1d-9f73-ae21b1191d9f",
"username": "TestUser813",
"id": "78881af1-a53c-4a1d-9f73-ae21b1191d9f",
"firstName": "TESTINGS",
"lastName": "FUNNY APIS",
"dependants": 32,
"salary": 260000,
"gross": 10000,
"benefitsCost": 653.8462,
"net": 9346.154
}
7
6baseURL/api/Employees/{id}DELETEValidate that an existing Employee can be deleted using the DELETE endpoint{{base_url}}/api/Employees/{{employeeId}}/78881af1-a53c-4a1d-9f73-ae21b1191d9fPASS200 OKAfter deleting an Employee it should not be found using the GET request.The Employee with the ID from the endpoint is no longer found.
8
7baseURL/api/Employees/{id}DELETEValidate that a non existing Employee can't be deleted using the DELETE endpoint{{base_url}}/api/Employees/78881af1-a53c-4a1d-9f73-ae21b1191d9fFAILED200 OKThe system should return a 404 Not Found status, ideally with a "Employee not found" message.The system returns a 200 OK status.
9
8baseURL/api/Employees/{id}GETValidate that an existing Employee can be found using the GET/ID endpoint{{base_url}}/api/Employees/dca4b641-750a-47c0-baa2-d89f24e4f991
PASS200 OKThe system should return a 200 OK status, and the Details of that Employee.The system returns a 200 OK status, and the details of the Employee.
10
9baseURL/api/Employees/{id}GETValidate that a non existing Employee can't be found using the GET/ID endpoint{{base_url}}/api/Employees/78881af1-a53c-4a1d-9f73-ae21b1191d9fFAILED200 OKThe system should return a 404 Not Found status, ideally with a "Employee not found" message.The system returns a 200 OK status.
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
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100