Skip to content

Design Document

Prakhar Srivastav edited this page Mar 26, 2014 · 2 revisions

Feature set

  • Ability to run single or multiple collection using a postman-exported collection format
  • Some default test-cases to indicate success / failure of build
  • Provide an extendable module that allows the users to add test cases
  • Ability to control build failure based on failing testcases (e.g allow the build even if testcases fail)
  • Ability to pass in a environment using a postman-exported environment format
  • Set up globals (for the entire collection)
  • Configurable response / status logging ability (STDOUT / File)

Design

Inputs

  • A collection (file or url)
  • A set of flags

Output

  • Responses received on running the collection
  • Results of test-cases
  • Build pass / fail status

Modules

  • Abstract Runner (extended by)
    • Collection Runner
    • Test Runner
    • Input
      • Set of Requests (array?)
    • Output
      • on error will call - Errorhandler (error in this case is only requestTimeout)
      • on valid response calls - ResponseHandler
  • Marshallers
    • CollectionMarshaller -
      • Responsibility: Marshals the collection into a fixed format that is sent to the runner.
    • ErrorHandler
      • Responsibility: Handles an error that is generated either by the Runner or the test-case
      • Ability to stop a build (via STDERR) or not can be customized here
      • Calls the logger to log an error
  • Logger * Responsibility: Logs a response or error either to a file or STDOUT
  • ResponseHandler * Responsibility: Gets a valid response from the runner and handles it by running a set of test cases
  • TestCase Handler

Flow Chart

Design Flow Chart