One of the key things in testing is to
figure out what the risks are, and so in
this video I want to talk a little bit
about some of the risks of using
services and APIs. So one of the key
risks that we have in API testing is the
API changing. So there's a lot of risks
that are specific to any testing that we
do, but with API testing we need to
consider the fact that the APIs can
change. This is especially important if
you're dealing with a third party API, so
an API you don't have control over. What
happens if the version changes? What
happens if something goes on that you
don't know about that causes the
functionality of the API, or the
endpoints or something like that in the
API to change? So considering API changes
is an important risk for us to think
about when we're testing an API. Another
one to think about is availability of an
API. So APIs and the kind that we're
talking about here in this course happen
over the Internet. So you have an
application that is calling the API over
a network of some sort, typically the
internet, and in that case what happens
if the network goes down? What happens if
you send an API call and for some reason
it doesn't come back? What happens if you
send an API call and it can't be sent? So
thinking about the availability of the
network and other factors around APIs
is another important risk to consider.
Another thing that we want to think
about is the timing of responses. So what
happens if a call is out of order? What
happens if a call is really slow and it
takes a long time to come back? And
there's maybe a little overlap here with
availability right, Network issues can
cause things to be slow, but we need to
think about what happens if one calls
fast and another call is slow, and the
calls come back in a different order
than we might expect. So that's another
risk that we need to think about with
API testing, what is the timing of the
responses? What happens to the speed of
the responses? And what happens to the
order that the responses might come back
in? Another one to consider is
performance. Now the reason we want to
think about this carefully with APIs
is that APIs are called
programmatically. So we call them with
code, and that means we can very easily,
sometimes accidentally maybe on purpose,
send a lot of calls in the
short amount of time. So we need to think
about how well does our server handle
getting a lot of calls in a short amount
of time? How well does it scale as the
calls increase? How well can the API
handle it the various parts of the API,
is there areas where we run into
throttling problems, or where we have
issues keeping the performance at the
speed that we needed to be? So
performance is another important
consideration to think about when we're
testing an API. And the last one I have
here on this list is security. Now
security is important anywhere right,
security is just an important part of
testing in today's world. Wwe all know
what happens when data breaches occur in
a company, and so we need to think
carefully about security. Once again we
need to think about this especially in
the API context, because it can be called
programmatically. So once again that
makes it easier for hackers to get into
it, to experiment with it, and to find out
laws that there might be. So security is
another core part of the risks of an API,
and in this course we can't get into too
much depth on security, but it's
something to at least keep in mind that
to think about when you're testing an
API. There of course a lot of other risks
that it comes to, and some risks that
might be specific to the particular API
that you're testing, and so I want make
sure you take the time to think about
this for yourself. What risks are there
in the area that you're testing? This
list here is a starter list, this is a
list of things that are fairly common to
a lot of APIs, but there might be things
you want to consider in your own testing
as well. So that brings us to the end of
this section. In the next section we're
going to start look at getting more
hands-on with API testings. And so in the
next video, we're gonna walk through the
install and setup of some API testing
challenges that will help you learn this
topic in an interactive manner.