Skip to content
🚀 Fastest rest api test suite builder
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
tests
.eslintrc.json
.gitignore
.travis.yml
CONTRIBUTING.md
LICENSE
README.md
index.js
package.json
yarn.lock

README.md

fastret-framework

Build Status LICENSE Github Repo Size NPM Downloads

Fastest rest api test suite builder

Give us a ⭐️ if you like our work ❤️

Install

$ npm install fastret-framework --save

Usage

const FastRet = require('fastret-framework');

const TEST_API = [
  {
    'name': 'GET API TEST',
    'url': 'https://jsonplaceholder.typicode.com/todos/1',
    'headers': {},
    'body': {},
    'method': 'GET',
    'skip_keys': ['title'],
    'response': {
      'userId': 1,
      'id': 1,
      'title': 'delectus aut aute',
      'completed': false
    }
  },
  {
    'name': 'GET API WRONG TEST',
    'url': 'https://jsonplaceholder.typicode.com/todos/2',
    'headers': {},
    'body': {},
    'method': 'GET',
    'skip_keys': ['title'],
    'response': {
      'userId': 1,
      'id': 1,
      'title': 'delectus aut aute',
      'completed': false
    }
  }
];

const fastRetSuite = new FastRet(TEST_API);

// Executes all the tests
fastRetSuite.execute();

// Output
// ✔ Passed: GET API TEST
// ✖ Failed: GET API WRONG TEST

API

execute()

Executes all the tests, shows test results in console. Also stores all the test results in results

isValid()

Validates if the input json contains all the required parameters

this.data

Contains the complete input test json

this.results

Contains all the tests results of execute() api

Data Structure
{
  "name": "NAME_OF_THE_API",
  "isPassed": "PASSED_STATUS",
  "errorMessage": "ERROR_MESSAGE" // if api failed with some error message
}

This gets updated once execute api is completed.

Contributing

Interested in contributing to this project? You can log any issues or suggestion related to this library here

Read our contributing guide on getting started with contributing to the codebase

Contributors

Thank you to all the contributors who have helped us in making this project better 🙌

You can’t perform that action at this time.