Lesson 8 - Applying what we've learned - Implement another POST check!

Title: Implement another POST check

Time: 10-15 minutes

Purpose: To practice our skills writing checks similar to one we’ve already written (a simple POST check).

Introduction:
At the end of Lesson 8 I challenged you to write another POST check to practice

Activity:

  • Choose a scenario to automate
    • It can be a scenario from our priority list, or you can make one up
    • It should be simple, and for a POST method
    • Some examples:
      • Check that an item missing the CanAccess header returns a 401 response
      • Try a POST with an item that is missing the Name value (this might be a tough one!) returns a 400 response
      • Try a POST with an item that has a Name with >255 characters returns a 400 response
  • Write your check, and verify that it passes
  • Share on this thread:
    • What scenario did you try?
    • Are you stuck anywhere?

I did

request.AddHeader("CanAccess", false);

and checked if the status code is Unauthorized.

Guess what happened?

1 Like