Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- 1 Patient Email Address is successfully updated
- 2 Patient is a Mobile App User
- 3 Patient has transmitted one or more transmissions
- Description:
- Presumably, the Rest API is shaped to capture each event. I have developed a prototype API with respect to these three events that would theoretically trigger test cases.
- Restful API tests
- API segment: /patient/{id}/email
- Test Case 1: TEST on /PUT or POST
- 1. Assign an email through the above-referenced API in a /POST to /patient/{id}/email
- 2. Re-assign an email through API /POST to /patient/1234/email with a body of "newEmail@new.com"
- 3. Perform a /GET on the above-referenced API to ensure the email "newEmail@new.com" is returned
- API segment: /patient/{id}/mobileFlag
- Test Case 2: TEST Mobile Flag
- 1. Assign a mobile flag of 0 to the above-referenced API /patient/{id}/mobileFlag through a /POST request with a body of "0"
- 2. Perform a /GET on the above-referenced API to ensure the mobile flag is returned as "0"
- 3. Assign a mobile flag of 1 to /patient/{id}/mobileFlag through a /POST request with a body of "1"
- 4. Perform a /GET on the above-referenced API to ensure the mobile flag is returned as "1"
- More Extensive Tests:
- # Ensure Database contains data
- # Ensure frontend contains the appropriate data
- # Test optimistic concurrency on several writes to ensure last write wins
- API segment: /patient/{id}/transmissions/{transmissionId}
- Test Case 3: Test Transmission API
- 1. Perform a /POST request with a body that includes the data "1234foobar" to the above-referenced API
- 2. Perform a /GET on the above-referenced API to ensure the data was set to "1234foobar"
- 3. Ensure Database contains data
- 4. Ensure frontend contains the above-referenced data
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement