playback-api

0.2.0 • Public • Published

Playback-Api

Purpose

To replay sets of test data for automated test evaluation of the final output of headless deamons, scripts, etc.. that POST to an external API with no testing/staging/sandbox environment.

  • Takes an xml based POST (and variants e.g. application/atom+xml) and saves it to an in-memory data store
  • POSTed data can be played back from the /test/:testId endpoint for evaluation; data is expected to be keyed to a given run of the test suite
    • (TODO: how to key data sets? app version, TeamCity build #, Environment Var, ???)

Usage

npm start spins up the server listening on the listenPort value in config

testId as a URL parameter in the routes refers to a given run of the acceptance test suite; all test data should be grouped together for any single run of the test suite

Routes:

  • /test/:testId POST/GET/DELETE data corresponding to a testId
    • POST: append data to this testId
    • GET: return list of data POSTed under this testId
    • DELETE: delete the list of data under this testId
  • /test/all DELETE all data in memory

TODO:

  • Cap the node-cache total size to something reasonable
  • Parse non-xml inputs

Readme

Keywords

none

Package Sidebar

Install

npm i playback-api

Weekly Downloads

0

Version

0.2.0

License

MIT

Last publish

Collaborators

  • mhockenbury