Skip to content

yashmahalwal/nirikshak

Repository files navigation

Nirikshak

Test your REST APIs with ease

Commitizen friendly Typescript code style: prettier lerna Conventional commits Code coverage: branches Code coverage: functions Code coverage: lines Code coverage: statements jest

Introduction

Nirikshak is a REST API testing framework. It leverages the REST semantics and provides autonomous testing. That means you get to kick back and relax while we do all the hard work for you.

Disclaimer: The project is still in infancy and is limited in scope and capabilities. But you can extend the framework to suit your needs. For more, read on.

What exactly does it do?

Nirikshak flow

Nirikshak generates test cases, runs them and analyses them for you. The flow can be summarised as below:

  1. It generates a generic suite of test cases on initialisation.
  2. You provide a description of your API to Nirikshak.
  3. It reads that description on runtime and links it to the test cases.
  4. It invokes jest to run your tests cases.
  5. It analyses the test log generated and provides you with a report.

What is the scope of this tool?

Nirikshak works on APIs that:

  1. Are written in typescript
  2. Use JSON as their hypermedia format to expose data
  3. Perform CRUD operations on resources
  4. Follow REST standards

Nirikshak performs unit functional tests on them. At a glance, this seems very restrictive. But the best part is that the framework is extentsible. We expose the internal APIs that we use to make tests work. You can leverage them to write your own tests.

Concepts

  1. Rest semantics and how we interpret them
  2. Possible outcomes to a request
  3. Request relationship graph
  4. Flow of testing
  5. Data analysis

Usage

  1. Preparing your project
  2. Installation
  3. Initialisation
  4. Adding resources
  5. Removing resources

API Reference

  1. @nirikshak/cli: CLI tool that manages tests for your project
  2. @nirikshak/core: Core logic that makes tests work
  3. @nirikshak/reporter: Jest reporter that generates reports for you

About

Test your REST APIs with ease

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published