Wiremock忽略请求参数

时间:2019-02-19 19:04:05

标签: android ios mocking mockito wiremock

我正在尝试使用WireMock模拟API请求/响应,但是由于该API被多个客户端使用,因此参数会根据我们在哪里运行测试而更改

{
  "url" : "/phoneservices/authentication.aws",
  "absoluteUrl" : 
  "http://localhost:8080/phoneservices/authentication.aws",
  "method" : "HEAD",
  "clientIp" : "0:0:0:0:0:0:0:1",
  "headers" : {
    "Accept" : "*/*",
    "Cache-Control" : "no-cache",
    "Connection" : "keep-alive",
    "Host" : "localhost:8080",
    "Accept-Encoding" : "gzip, deflate",
    "Accept-Language" : "en-us",
    "Content-Length" : "0"
  },
  "cookies" : { },
  "browserProxyRequest" : false,
  "loggedDate" : 1550599716395,
  "bodyAsBase64" : "",
  "body" : "",
  "loggedDateString" : "2019-02-19T18:08:36Z",
  "queryParams" : { }
}

除了URL,我想通过Wiremock忽略其中的大多数。有什么办法吗?

0 个答案:

没有答案