Advertisement
Guest User

Untitled

a guest
Aug 20th, 2019
106
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.68 KB | None | 0 0
  1. 1 Patient Email Address is successfully updated
  2. 2 Patient is a Mobile App User
  3. 3 Patient has transmitted one or more transmissions
  4.  
  5. Description:
  6.  
  7. 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.
  8.  
  9. Restful API tests
  10.  
  11. API segment: /patient/{id}/email
  12. Test Case 1: TEST on /PUT or POST
  13. 1. Assign an email through the above-referenced API in a /POST to /patient/{id}/email
  14. 2. Re-assign an email through API /POST to /patient/1234/email with a body of "newEmail@new.com"
  15. 3. Perform a /GET on the above-referenced API to ensure the email "newEmail@new.com" is returned
  16.  
  17. API segment: /patient/{id}/mobileFlag
  18. Test Case 2: TEST Mobile Flag
  19. 1. Assign a mobile flag of 0 to the above-referenced API /patient/{id}/mobileFlag through a /POST request with a body of "0"
  20. 2. Perform a /GET on the above-referenced API to ensure the mobile flag is returned as "0"
  21. 3. Assign a mobile flag of 1 to /patient/{id}/mobileFlag through a /POST request with a body of "1"
  22. 4. Perform a /GET on the above-referenced API to ensure the mobile flag is returned as "1"
  23.  
  24. More Extensive Tests:
  25. # Ensure Database contains data
  26. # Ensure frontend contains the appropriate data
  27. # Test optimistic concurrency on several writes to ensure last write wins
  28.  
  29. API segment: /patient/{id}/transmissions/{transmissionId}
  30. Test Case 3: Test Transmission API
  31. 1. Perform a /POST request with a body that includes the data "1234foobar" to the above-referenced API
  32. 2. Perform a /GET on the above-referenced API to ensure the data was set to "1234foobar"
  33. 3. Ensure Database contains data
  34. 4. Ensure frontend contains the above-referenced data
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement