From the course: API Testing and Validation (2017)

Unlock the full course today

Join today to access over 22,400 courses taught by industry experts or purchase this course individually.

Make your first authenticated request

Make your first authenticated request

From the course: API Testing and Validation (2017)

Start my 1-month free trial

Make your first authenticated request

- [Instructor] To test authentication in GitHub, let's start with a real world scenario that's relatively simple. We'll create a new file called my-repos.feature. In this case we'll just get a list of my repositories. So our scenario is, I want a list of my repositories. So notice I am saying a list of my repositories. Therefore there will be some context if I am logged in. Given I am an authenticated user. When I request a list of my repositories. Then the results should include a repository called swapi. Let's say named swapi just to be sure. Swapi is the Stars Wars API, just in case you're interested in checking that out on your own time. We won't be using it in this course though. Let's see I believe we have a typo here, so let's make sure that's correct. Because remember, the strings that will be generated on the back end in terms of the functions, have to match these exactly. Now we go back to our command line. So we do vendor/bin/behat just like usual. Our previous tests…

Contents