From the course: Learning End-to-End Testing with Jest
Unlock this course with a free trial
Join today to access over 25,600 courses taught by industry experts.
Finish up on Login endpoint test
From the course: Learning End-to-End Testing with Jest
Finish up on Login endpoint test
- [Instructor] Four running negative tests on the login endpoints. The first case is when to use or leave the password field empty. This description is, do not sign him in, password field can not be empty. Define the inputs. In this case, we define only the username, no password. Username is admin. Call the login endpoints and send the inputs. Expected statusCode is 400. Expected response body is an objectContaining success false and message username or password can not be empty. Server run test. Two tests passed, our coverage is 51.45%. The second case of negative testing is when to use or leave the username field empty. Description is, do not sign him in, username field can not be empty. Define the inputs, only the password this time. Password is okay. Call the login endpoints and send the inputs. Expected statusCode is 400 and expected response body is an objectContaining success false and message…
Contents
-
-
-
-
-
(Locked)
Test the Login endpoint6m 50s
-
(Locked)
Finish up on Login endpoint test7m 1s
-
(Locked)
Test the Create endpoint5m 16s
-
(Locked)
Finish up on Create endpoint test6m 27s
-
(Locked)
Test the Read endpoint5m 21s
-
(Locked)
Test the Update endpoint6m 44s
-
(Locked)
Finish up on Update endpoint test6m 1s
-
(Locked)
Test the Delete endpoint3m 55s
-
(Locked)
-
-