Skip to content

Add support for slow responses #37

Closed as not planned
Closed as not planned
@waldekmastykarz

Description

@waldekmastykarz

Extend the proxy with ability to test slow API responses.

Rationale

One aspect of testing how applications use an API is how they respond to slow API responses. Is it obvious that content is loading? Is the whole application unresponsive? Is the application failing because it expects a response in a certain timeframe? Graph Developer Proxy can help developers validate the user experience when the API responds slowly.

Spec

  • introduce app setting named minDelayMs, that defines the lower range of the delay in milliseconds added to API response. Default value 500
  • introduce app setting named maxDelayMs, that defines the upper range of the delay in milliseconds added to API response. Default value 10000
  • introduce option named --min-delay that allows users to override the value of minDelayMs as configured in appSettings. When not specified, uses the value from appSettings.
  • introduce option named --max-delay that allows users to override the value of maxDelayMs as configured in appSettings. When not specified, uses the value from appSettings.
  • introduce option named --slow-responses which is a flag. When used, it will cause the proxy to add a random delay from range minDelayMs <= x <= maxDelayMs to each API response (mocked or not)

Metadata

Metadata

Assignees

No one assigned

    Labels

    duplicateThis issue or pull request already exists

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions