Okay I think it's time for another
challenge. In this video we'll do a
challenge called find the 500, and for
this challenge it's going to put
together a lot of what we've been
learning. We've learned a lot about API
testing over the last few videos, and so
now we're gonna take a few minutes and
try and put into action. So for this
challenge we call the finding the 500,
and what we mean by that is find the 500
error. So I have an API, a sample API,
which if you followed the setup and
install instructions you should have
available for you already. And in this
API there are at least two 500 errors
hidden in there. To successfully solve
this challenge you're going to need to
use all the testing knowledge that
you've learned so far, you're gonna need
to use POST, and PUT, and GET calls as you
investigate this. So there should be a
way to help you put into practice
everything we've been talking about so
far. So let's take a look at this. I'm in
the folder here where I've got the
challenges checked out, which if you
followed along the install video you
should have as well. And then I can start
up the server by calling node, and then
find the 500 server ojs. So we'll start
that server up, and we can see that
request can be accessed here. So let's
just copy that, and take it over to
Postman. So we'll put this here in
Postman, and let's here's one of our URLs.
So we'll say blog posts, and let's just
send a GET call here make sure
everything's set up and working, and
there you can see we've got a couple of
blog posts in this. So the schema or the
structure of this data in the in this
challenge is similar to kinds of data
that we've looked at in previous videos,
so hopefully this is something you can
figure out fairly quickly. As before
there's also documentation available on
GitHub. So you can see here this is on my
profile, the same place that you
downloaded this from when you set things
up, the API testing challenges. And then
if we go down here to find the 500, we
can see the ropes that are available for
this challenge, and then the POST and PUT
commands that are available as well. And
to get the
data that you want for these POST and
PUT commands you can do what we just did
here we did it GET, and we can just copy
this structure. So we need the parameters
that it needs are an ID, a tight little,
body, and a profile, the idea actually is
optional. And you would copy that
structure and use that structure as your
parameters, you could use it as keys here
or in the body of it as the JSON data as
well, as we've shown in previous videos.
So this challenge will probably stretch
you a bit, and I would encourage you to
let it do that. Struggle with it for a
bit, see what you can figure out on your
own, it really is one of the best ways to
learn something. As challenging as API
testing is, you have to kind of struggle
with it a little bit to really get it. So
one note as well, this service is
designed to have some bugs in it, and so
you might run into issues while testing
it. So if you do kind of get stuck and
you think that maybe something just went
wrong, you can reset it. And the easiest
way to do that would be to go to your
git so here I've got GitHub desktop, and
you can see I've you know added
something to my database. So I did a POST
call and added something to it. If I
wanted to reset this, I can just do a
reset and get. So here I can just say
discard all changes. So if I do that, say
yes I do want to discard those changes,
and now those the everything has been
reset. So if you do that you will then
want go over to where you have your
server running, just do ctrl C to kill it,
and then you can do up arrow probably in
your command prompt, and enter to run the
server again and to restart it. So also
if you get stuck you can turn to the
solution video and get some hints, but I
hope you have some fun figuring out on
your own. Happy testing and hope to see
you in the solution video soon.