background preloader

Rest API's

Facebook Twitter

Learn API testing in 10 minutes!!! Learn API testing in 10 minutes!!!

Learn API testing in 10 minutes!!!

What is API Testing? API testing is checking Application Programming Interface of a Software System. In order to check API , it needs to be called from the calling software . Necessary test environment, database, server, application setup needs to be prepared before doing API Testing. API testing is focused on the functionality of the software's business logic and it is entirely different from GUI testing. Set-up of API environment and different types of test cases: Normally, setting up the API environment is very complex as it doesn't involve user interface. Output of API could be Any type of data Status (say Pass or Fail) Call to another API function. The output is compared with the expected outcome. For example - REST Testing. Hack St. - Http debugging made easy. REST Console. Getting Started with REST Testing. NOTE: As of version 4.6 of SoapUI, the functionality described in this article has been revised and improved.

Getting Started with REST Testing

If you're using an earlier version, please upgrade! SoapUI supports extensive testing of REST services and their resources, representations, etc. Let's start with a quick demo using the Google Maps API to get you started! Also, please try out a free 14-day trial of SoapUI Pro to tag along in the tutorial. While REST-testing isn't a Pro-specific feature, all tutorials on SoapUI.org are done using SoapUI Pro, so you'll have a better understanding of the feature if you do. The way to create REST testing requests has been greatly simplified in SoapUI 4.6 – fewer steps are needed. Start by creating a new REST project from the File menu by choosing the "New REST Project" option in the File menu: Specify the following Google Map API URL in the Service Endpoint Field: In the "Parameters" table, you can see that SoapUI has automatically extracted the different query-arguments from the path.

API Reference - Google+ Platform.

Jasmine

Testing Applications and APIs. Posted by George Pirocanac, Test Engineering Manager Earlier Blog entries described the strategy and methodology for testing the functionality of various kinds of applications.

Testing Applications and APIs

The basic approach is to isolate the logic of the application from the external API calls that the application makes through the use of various constructs called mocks, fakes, dummy routines, etc. Depending on how the application is designed and written, this can lead to smaller, simpler tests that cover more, execute more quickly, and lead to quicker diagnosis of problems than the larger end-to-end or system tests. On the other hand, they are not a complete replacement for end-to-end testing. By their very nature, the small tests don't test the assumptions and interactions between the application and the APIs that it calls. What about testing the APIs themselves? The third approach is to pull out the big hammer. Learn REST: A Tutorial: 1. What is REST? REST stands for Representational State Transfer.

Learn REST: A Tutorial: 1. What is REST?

(It is sometimes spelled "ReST".) It relies on a stateless, client-server, cacheable communications protocol -- and in virtually all cases, the HTTP protocol is used. REST is an architecture style for designing networked applications. The idea is that, rather than using complex mechanisms such as CORBA, RPC or SOAP to connect between machines, simple HTTP is used to make calls between machines. In many ways, the World Wide Web itself, based on HTTP, can be viewed as a REST-based architecture. Testing web API using jasmine and node.js. RESTful Services Quick Tips. Whether it's technically RESTful or not (according to the six constraints mentioned previously), here are a few recommended REST-like concepts.

RESTful Services Quick Tips

These six quick tips will result in better, more usable services. Use HTTP Verbs to Mean Something API consumers are capable of sending GET, POST, PUT, and DELETE verbs, and these verbs greatly enhance the clarity of what a given request does. Also, GET requests must not change any underlying resource data. Measurements and tracking may still occur, which updates data, but not resource data identified by the URI.

Generally, the four primary HTTP verb are used as follows: Read a specific resource (by an identifier) or a collection of resources. Update a specific resource (by an identifier) or a collection of resources. Remove/delete a specific resource by an identifier. Create a new resource. Provide Sensible Resource Names Producing a great API is 80% art and 20% science. Here are some quick-hit rules for URL path (resource name) design: REST API Tutorial.