Chakram Offers Scalable REST API Testing Framework

Chakram was developed as an API testing framework to run end-to-end tests on JSON REST endpoints. Chakram offers a behavior-driven development (BDD) testing style to exploit JavaScript promises. The method hopes to results in clear, simple, descriptive tests without concern for the asynchronous nature of REST APIs. 

Chakram requires Node.js and NPM. To get started, a user should create a Node.js app that contains the API tests. To run Chakram tests, users must first install the Mocha testing framework. Mocha can be installed globally or as a dev dependency. Tests are then run through the Mocha command line. Mocha includes native support for promises, which Chakram exploits. Request and expectations return promises that fulfill to Chakram response objects.

Chakram is hosted at GitHub. The author has made full documentation available. Additionally, Chakram contains its own tests that demonstrate all of its functionality. As the API economy continues to expand, the number of API testing tools grows accordingly. However, as APIs and associated tests increase in complexity, most API testing frameworks break down. Developers are forced to hack and work around the intended framework. Chakram, through its BDD design, provides a scalable framework that it hopes will work equally well from the most basic to the most complex task.

Be sure to read the next Testing article: Cloud Platform IP Address Assignments Cause Headaches

 

Comments (0)