Q
Get started Bring yourself up to speed with our introductory content.

First time REST testing? It's easier than you think

It can be challenging to test something new for the first time. Expert Gerie Owen explains why you do not need to worry about REST API testing.

I have to test an application that uses REST APIs. I'm afraid that I have no clue about this technology, but don't...

want to appear uninformed. Can you give me some pointers?

REST stands for Representational State Transfer. It is a technique developed by researcher Roy Fielding in his doctoral dissertation about 15 years ago. It's a type of programming interface that relies on the standards of the World Wide Web. This type of interface has the characteristic of being able to execute a wide variety of code and return different types of results based on how that code is executed.

REST testing sounds complicated, but it's really not. The key is the link that code is directed to. The code goes to the URL (or URI, uniform resource identifier), just as a person may navigate to such a link manually. In doing so, it is able to pass data into the API, and get results in return after the underlying code is executed.

One of the most important characteristics of a REST API is its stateless nature. That means that each and every call is independent and not dependent upon the state of the calling application. It simply accepts data in and returns data as a result. In this sense, it is much like a Web service.

How you would test such an interface is very dependent on what it is being used for, and who is using it. Remember that what you are doing is passing in data and looking at the results. It's not a lot different than other types of API. So when REST testing, you should focus on getting back correct results, or appropriate error messages if the input data is bad or out of range.

Next Steps

Need a REST primer? Try this

REST and test and the cloud – here's what you need to know in the cloud

Some think REST makes testing harder. What do you think?

This was last published in May 2016

Dig Deeper on Software Security Testing and Quality Assurance

PRO+

Content

Find more PRO+ content and other member only offers, here.

Have a question for an expert?

Please add a title for your question

Get answers from a TechTarget expert on whatever's puzzling you.

You will be able to add details on the next page.

Join the conversation

2 comments

Send me notifications when other members comment.

By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy

Please create a username to comment.

What's your secret to testing REST?
Cancel
Two ways to test REST API.  one is via commandlne like with cURL or the HTTParty gem for ruby (or in code), or with a client like ReadyAPI or Postman.  Its a lot of fun.
Cancel

-ADS BY GOOGLE

SearchMicroservices

TheServerSide

SearchCloudApplications

SearchAWS

SearchBusinessAnalytics

SearchFinancialApplications

SearchHealthIT

Close