/rio-js

Typescript SDK for Rio HTTP/gPRC mocking

Primary LanguageTypeScriptApache License 2.0Apache-2.0

Use Rio as a mock server to test Rest API

sdk-ci

Introduction

Suppose you want to perform integration tests for an API which is dependent on a 3rd party API, these services are deployed on different testing servers as the below diagram

Component

This repository provides examples how to use Rio as a mock server to simulate HTTP/gRPC endpoints. While this can be used for mocking HTTP requests in a JS based application, it is NOT recommended

Why mock?

  • Create stable test suites by isolating your system with 3rd parties
  • Able to simulate diversed scenarios to test how your system handles responses

Structure

  • sdk: TypeScript SDK to build and submit stubs to Rio remote server
  • example: Examples for using Postman or SDK in JavaScript/TypeScript
  • server: A sample test target API
  • docker: A docker-compose example to deploy Rio