【问题标题】:postman testing on 'response body contains string' does not work对“响应正文包含字符串”的邮递员测试不起作用
【发布时间】:2017-11-09 01:35:32
【问题描述】:

为了缩小问题范围,我将响应正文更改为像 text/plain 这样简单的一句话。

this is a test

但是,以下非常基本的功能仍然失败:

tests["Body matches string"] = responseBody.has("this");    

具有讽刺意味的是,这个测试有效:

tests["Body matches string"] = responseBody.has("t");    

我使用的是最新的 postman v4.11.1。这看起来像是邮递员的根本缺陷。

【问题讨论】:

    标签: testing postman


    【解决方案1】:

    原来邮递员不支持unicode。如果我将编码更改为 utf-8,一切正常。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2016-07-20
      • 1970-01-01
      • 1970-01-01
      • 2019-04-29
      • 1970-01-01
      • 1970-01-01
      • 2018-11-29
      • 2020-11-04
      相关资源
      最近更新 更多