Insomnia Response Validator-Unit Test Plugin

Insomnia Response Validator-Unit Test Plugin

Overview

This is a plugin for Insomnia API client that can validate the response based upon expected result.

Installation

Install insomnia-plugin-response-validator plugin from Preferences > Plugins.

Usage

Add a header INSOMNIA-RESPONSE-VALIDATOR with a json comprising of jsonpath and expected values.

Setup the Header

Validator

Key: JSONPATH Value: Expected Value

Note: To validate the response code of the request add "INSA-ResponseCode":"200".

{ "INSA-ResponseCode":"200", "$.status" : "success", "$.data[10].employee_name" : "Jena Gaines" }

Test Execution Result

Test Execution result will be appended at the top of the response as follows

More info for Debug

View-->Toggle DevTools-->Console

Links:

To view or add a comment, sign in

More articles by Sumit Ghosh

  • soft-assert: Ruby Gem

    Popular Ruby testing frameworks, including Minitest and Test::Unit, lack a built-in soft-assert feature. To address…

    3 Comments
  • TruePath: Relative XPath On Click

    TruePath: is a web extension designed for Chrome & Firefox browser. Once installed, when a user right clicks on any web…

Explore content categories