Skip to content

Latest commit

 

History

History
55 lines (51 loc) · 3.17 KB

File metadata and controls

55 lines (51 loc) · 3.17 KB

Testing /posts Route

  • Testing was conducted for this Node.js application. Cases were test to pass, test to fail, and boundary condition testing
  • One assumption I made when testing was that the 'tags' query parameter needs to be included but does not have to come before other parameters in the query. If it needed to be, a quick check at index 0 in the query array could be done but this did not seem imperative.

Test to pass

using just tags query

Multiple tags

  • Test: GET: http://localhost:5000/api/posts?tags=science,tech
  • Expected result: Array of posts in order of ascending post id. This array should be longer than the last. Each post's 'tags' array property contains either 'science' or 'tech'
  • Result: PASSED

Using sortBy query

Using direction query

Using all queries

Test this node.js API alongside provided API solution "https://api.hatchways.io/assessment/solution"

Test to fail

No tags parameter/empty string tags parameter

Invalid sortBy parameter value

Invalid direction parameter value

Invalid parameter type

Testing /ping Route

Test to pass

Request to /ping