Saturday, October 6, 2018

Chakram: A Rest API testing framework for JavaScript

Rest API test automation is becoming popular day by day. As Jenkins makes our CI/CD life easier, automation testers are now showing their tendency to automate their rest APIs. When some features changes in an API, they have to test all the related APIs. In microservice arena, number of services are increasing day by day. Postman, Insomnia, SoapUI, Fiddler, JMeter etc. are still a first choice of our testers but I am googling a JavaScript based framework where I can write my test using JavaScript and I got Chakram.

Chakram is an API testing framework that can perform end to end tests on JSON REST endpoints.

Features:

  • Chakram can perform a BDD style testing.
  • It support JavaScript promises.
  • Tests are simple, clear and expressive.
  • It is built on node.js, mocha and chai.
  • It extends Chai.js, adding HTTP specific assertions.
  • It allows simple verification of returned status codes, the compression used, cookies, headers.
  • It also returns JSON objects and the schema of the JSON response and response times.
  • It uses BDD formatting and hooks so that complex tests can be constructed with the necessary setup and tear down operations.
  • It allows new assertions to be added to the framework.
  • It supports Plugin and Debugging.
  • It exports results in a variety of formats.

That’s all for now. In the next post, I will explain how to write Chakram test and run through command line.

Monday, August 15, 2016

Protractor: How to check npm, node and protractor current version and install the new update

Sometimes we need to know the current version on npm, node and protractor. Since the community is releasing the latest version continuously, we have to install those updated release frequently.

The following commands are needed to check the version and install the latest one. For this we need to open a command prompt and write the following code command.

npm:

  • Version

npm -v

  • To install the latest version: npm install npm@latest –g

Now check the new version: npm –v

Node:

  • Version: node –v
  • To install the latest version:
    • Just go to Node JS site and install the latest version.

Protractor:

  • Version: npm protractor –version
  • To install the latest version:
    • npm install protractor@latest -g

Cypress: How to handle browser-based authentication pop up dialog in Cypress

Five years ago I have written a blog on how to handle browser-based authentication for selenium webdriver.   Now it is for cypress. Cypress...