Testing Flow for Lite

Number of APIs: 40

Read the blog Negative testing for more resilient APIs

broken bridge

Unbreakable API Lite is a simplified version of Unbreakable API used in the How to Break an API livestream. Instead of managing authorization for multiple roles, the role of admin is removed and employee is renamed to user. In Unbreakable API Lite, once you create a user and set the returned token, you will have access to all available endpoints.

Get Started

  1. Fork the collection: Fork the collection [Testing Flow for Lite] from this public workspace to your own workspace. You may need to enable your public profile if you haven’t already.
  2. Create a new user: In the Create User folder, update the values under the Body tab to create a new user. { "email": "hello@world.com", "password": "password123" }

Hit Send to create the new user, and also set a collection variable called userToken that can be used in subsequent calls. 1. Step through the collection: In the remaining folders, explore the various positive and negative test scenarios. Review the Authorization type under the Authorization tab. Review setup and teardown under the Pre-request Script and Tests tabs. This is code that executes before and after you send each request. 1. Run the collection automatically: This collection can also be run using the [Runner] [Newman] or [Monitors] to automate your testing. Remember to set up a new, unique user before running the collection in its entirety.

  1. Negative-Misc Token Values-Customers-DELETE - Customer - Delete Customer - No Token DELETE {{baseUrl}}/api/customers/

  2. Negative-Misc Token Values-Movies-PUT - Movies - Update Movie - No Token PUT {{baseUrl}}/api/movies/

  3. Positive-Customer - All customers GET {{baseUrl}}/api/customers/all

  4. Negative-Misc Token Values-Movies-POST - Movies - Create Movie - Invalid Token POST {{baseUrl}}/api/inventory/

  5. Negative-Misc Token Values-Movies-GET - Movies - Valid Token When Not Needed GET {{baseUrl}}/api/movies/?id=1

  6. Negative-Misc Token Values-Movies-POST - Movies - Create Movie - No Token POST {{baseUrl}}/api/movies/

  7. Negative-Misc Token Values-Movies-DELETE - Movies - Delete Movie - No Token DELETE {{baseUrl}}/api/movies/?id=2924

  8. Negative-Misc Token Values-Inventory-GET - Inventory - Valid Token When Not Needed GET {{baseUrl}}/api/inventory/?id=1

  9. Negative-Misc Token Values-Inventory-POST - Inventory - Create Inventory - No Token POST {{baseUrl}}/api/inventory/

  10. Negative-Misc Token Values-Rental-GET - Rentals - Current - Valid Admin Token When Not Needed GET {{baseUrl}}/api/rentals/current?id=1