0

Is there a way to tag stubs of an imposter with some identifiers so that while debugging, we can easily get the matches for a specific stub?

Currently the stub has a matches field, but when we want to verify programmatically if a certain stub has really been called, there is no way to get the matches for a specific stub we are interested in.

If there was a way to tag a stub, then we can filter the stub based on the tag and get the matches for that specific stub.

SolveProblem
  • 83
  • 1
  • 9
Aravindh S
  • 1,185
  • 11
  • 19

1 Answers1

2

You can add whatever information you want to the stub and see it reflected when you request the imposter details. For example:

{
  "protocol": "http",
  "port": 3000,
  "stubs": [{
    "name": "example",
    "responses": [...]
  }]
}

Then you'll see that "name" field when you send a GET request to http://localhost:2525/imposters/3000.

-Brandon

bbyars
  • 406
  • 3
  • 3