API Driver Implementation in Simulato - GannettDigital/simulato GitHub Wiki

Purpose: The first step towards plug and play drivers in Simulato is to implement an additional driver to handle use cases other than user interfaces.

Approach: Four components are necessary in the next iteration of driver implementation for Simulato:

  • API Driver
  • Request Objects
  • Response Objects
  • API Expected State

Descriptions: (Not finalized may be augmented later)

API Driver

  • Must be able to handle requests and responses from the API

Request

  • Type of Request
  • Related payload or parameters
  • Pre-conditions made of responses

Response

  • Type of Response
  • Related payload

API Expected State

  • BuildResponse(options)
  • GetPayload(request)
  • GetPayload(response)
  • CompareResponse(comparedResponse)
  • RegisterResponse(request)

Simulato Changes

  • Split Expected State between UI and API
  • Include switch in driverHandler to use UI or API driver
    • Possibly Include driver type in test to know which driver that test would need