Skip to main content

Posts

Showing posts from April, 2016

How to Setup Frisby on Linux

Frisby is a REST API testing framework built on node.js and Jasmine that makes testing API endpoints easy, fast, and fun. Its as simple as tossing a frisby. Lets quickly setup Frisby on a Linux system.

Install NodeJS and Jasmine node:
curl --silent --location https://rpm.nodesource.com/setup_6.x | sudo bash - yum install -y nodejs npm install -g jasmine-node
Install the required modules:
cd /usr/lib/node_modules/jasmine-node #Form-Data for uploading files using REST API  npm install --save form-data #For sending and receiving WEB requests npm install --save request #Express is a minimal and flexible Node.js web application framework that #provides a robust set of features for web and mobile applications. npm install --save express #For reading and validate the raw body of a readable stream npm install --save raw-body #Our core framework for playing with REST APIs npm install --save-dev frisby #Used for sequencing REST calls or rather for sending synchronous #REST calls to t…

Welcome to the Cognitive Era

Short video about IBM past, present and future. Welcome to the cognitive era! This video reminds us as to why IBM is such a great company, with a rich history and a visionary future.

Think IBM from Luiz Silveira on Vimeo

Frisby as a REST API Automation Framework

For writing your REST API automation test cases there are many tools available like Runscope, Fit Selenium, PyRestTest, REST-assured and many such more. Before selecting the right tool for REST automation some important aspects to consider are:

Architecture
The framework components need to be loosely coupled to each other and there should be a generic way to invoke test cases and retrieving results. The framework design should be such that, any changes in REST API should least impact the automation scripts.

Data structures
The framework should support all the data formats supported by REST APIs like XML, JSON, Multi-Part data, plain text etc.

Assertions
Most of your REST API testing will revolve around validations. A good framework should provide out of the box support for such validations/comparisons. Some validation examples: verifying API response code, response headers, verifying the response body.

Reporting
A testing framework is of no use if it lacks the ability to generate reports…