msgraph-sdk-dotnet icon indicating copy to clipboard operation
msgraph-sdk-dotnet copied to clipboard

GiraffeHandler - test handler for injecting error responses

Open MIchaelMainer opened this issue 5 years ago • 0 comments

A outer handler that is used during testing to provide error responses. We want to make sure that our client can handle random/different responses throughout the pipeline.

This handler can produce:

  1. random error response - to help us and customers create robust error handling
  2. preset error responses - to help us and customers tests expected error conditions
  3. preset successful responses - to help us and customers test variations of successful responses
  4. mock throttling

Design spec is required. The design should be applicable to all of our supported platforms.

This will be used internally and by customers that use our client libraries. The idea is that this will be a final handler that will mimic responses.

Some ideas:

  • Preconfigured responses
  • Can be used to mimic any response from the service. This can be a service mock as far as the client is concerned.
  • Rules based inspection of httprequestmessage contents to provide responses.
  • Access to serializers for mocking response objects.

Are we moving beyond giraffe handler? Should part of this be put in a test handler? Let's have the conversation.

We should brainstorm on how we and customers might use this. AB#7323

MIchaelMainer avatar Apr 09 '19 08:04 MIchaelMainer