我得到的是HTML格式的endpoint响应,我需要验证标记中的某些json。HTML响应如下所示:
"<table cellpadding='5' cellspacing='5'>
<tr>
<th align='left'>Entry Id</th>
<th align='left'>Refrence Id</th>
<th align='left'>Contact</th>
<th align='left'>Error Message</th>
<th align='left'>Verified</th>
<th align='left'>Delivered</th>
</tr>
<tr>
<td>0c4e9a69-7c18-4568-b635-3fec0a265ada</td>
<td>0c3f7cae-be20-497c-a4d8-79c07d1f911e</td>
<td>\"{\\\"id\\\":\\\"9945\\\",\\\"firstName\\\":\\\"Donthave\\\",\\\"lastName\\\":\\\"Mail\\\",\\\"email\\\":\\\"omair@gsquad.com\\\"}\"
</td>
<td>500, unable to push the contact to the target {error}:Error: getaddrinfo ENOTFOUND showcare.io</td>
<td style='text-align:center' class='verified'>
<img src='data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAOEAAADhCAMAAAAJbSJIAAAAw1BMVEUAgAD///8AfgAAfAAAegAAeAB9vX0AgQD3+vcAgwD6/fr9//37/vvk8eT0+vTB3sGczJyMxIzr9evU6NTh8eEAhwAAiwCTyJOl0aWw1rBir2LF3cXK5MqNvo3x+fGWx5YbkBu32Lc1lzVlqmVMmUxUpFTP5s8/lz89mT3Z7NkkkCS22rYUiBRLpUvc6dwskSw5nTlhqGGx0LGbwptpqGktjC1Wq1Z0tHRwtHBZp1l+v34wmTB+tn5ls2VDlkOmyqaRvZGQJe7WAAAJoklEQVR4nO3daXuiOAAH8BxYBYogeGA90ZGqpbV27eHWbef7f6oNtLOC3AJC0v2/m3me2c3vScwJBMDCIwpCo9GQTENXlF6LZKLofVlTyV8Kglj4/x4U+R9vqtLDQG/dPHZBjYRzxf5zffp4c6WbD5LaLLAQhQklbfA02q/5GocxQiAwCGHM1fj3xeFpoEnXxRSkEKE6NP7azXjbFkzzQbnObP77aagWUJj8he3+aLfsJMS5mBh3lruRvsq7PDkL28ru1waEtcp4JbA+dkq+yDyFTX3/bJ2r+0+JrOeFPs6vVLkJG8YLH9qlpK5L/k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GC1Cbh2PE0JzSgURzyKA0UIodyloqKgbBYwR0kBEHd8FuWmE1V/xB9wAnE4o3m0qTUSzwCvjUwih0K8yEc2M66xCQqxuQyXAsKlMCiEUjap2N2gti7HFTyC0b0asJBF1YzqZ5EIyaFRw6MeJgAmF0Kzezg1aBu3KnC2Ew0XZopPU98mAiYVQm1dqvWi9JQQmF8L2oV6Zlor4lhRf4rRCOFaq0qXijh6865RRCAVjXYkulZvKcROZM4Xkx7jHpVcjwjfhC/rMQtjsWSUT0VqPnahlEZLBf1Fmh4Osbci2aH5CKB3Km4nj2SR0Ty0/IVkybvlSjIifxy0G8xGSalRKmMQhdKsnHgSzCqFgvl3614g7By1dF5NJSDpV4712QSPC98PGeSU9V0jqsXexKQ5CUz3FGJ+XkPwcrzbgAkgElr2A8/lLCMma6vUZFWxE/EfvnA4mJyEU5MOmyIkcri8mSZdJxQht42iGCpqQY377mdGXg5B0q9rngs/fiHDnTc7UPnMTklmOar518h08UK17pWXoX47JRWhnPHnHef0iSau/vztz+PMlNyFJu7V4rmftWxGqPy+U1PPr8OQpJDF721sLnKsk/8762PXSro+ik7MQwuuhPtoteZxWiTAGm+1IjzztPCe5C+1Iw6ff+zXPJfxhIoQ5frP9/Smn2p5ImEKEJELbHDyN9lNQs51hUNtWA9P7w+dAk85aOcSnKKGTpio9DPTDzWMX10g4jmgx5pyQP6Pu9OVKNx8kdRx/hHR2ChV+RRQajYaqDY2+0rq6umrZUfrDVZP8tVBQxbnyLytYqBcn8DRbAAAAAElFTkSuQmCC' width='10' /></td>
<td style='text-align:center' class='notDelivered'>
<img src='data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAOEAAADhCAMAAAAJbSJIAAAAkFBMVEX/AAD////1/v7rAAD6AADv+fn7///yAADZ19fRNTXt9vb5///y/Pz8AADNqKjNWVndISHPx8fcLCzNYGDMubnl8PDZMDDkExPORUXQk5PUTk7Q0dHlAADb39/OwcHNbW3PdnbPgYHAjo7dFxfMsbHOZ2fCgYHNT0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jSV+zHa1DUZEEO0lLnI+FFW70IYZj1V1mp4p2oP5TREKJQzpgbkpXtoQ+Qem2/GzpG4+SLAMGvGpi+WmnE1YA1D5KybnMT11oQdXoGG2aAaNZUbx1H1IRTCEHXDZo4WDapMQ0ENs8SxEX8GLt1wpAgwQ4RGntjMkXrcHyCQYZY5PHHtmHp8GQLW8NxXByLGnPFgUzjSzAGEIULD0IfOHT0/qff9XYExzFh+QX6QwVeN/HAPmGE26CTvMJWV/Z5AdM9/ABpmxBu/rqTtb6rV8GXAGmbE09eUd1reSV+nsHpIgGGG0//cVb9G5GU3X9TNfThEGJ5xF6do1mNLIuPeLDot6mc+PKIMz1hx6K2eU5vcaTt2+rzywhgmL+ARafhN14r7oTd/i54Gs0mQPr48psFkNniK3uZe2I8t1u0HboQb3tC1HMd1XccRr3VDk4Zy+DXUn19D/THf8C89CINEkBPZtgAAAABJRU5ErkJggg==' width='10' /></td>
</tr>
</table>"
我想在json响应中验证以下内容:
{\\\"id\\\":\\\"9945\\\",\\\"firstName\\\":\\\"Donthave\\\",\\\"lastName\\\":\\\"Mail\\\",\\\"email\\\":\\\"omair@gsquad.com\\\"}
和
0c3f7cae-be20-497c-a4d8-79c07d1f911e
如何实现?
您可以使用Postman中的“测试”选项卡进行测试。当您在“邮递员”选项卡中创建请求时,您将在顶部找到“测试”选项卡。您可以编写以下脚本来断言所需的响应。
pm.test("Body contains text",() => {
pm.expect(pm.response.text()).to.include("0c3f7cae-be20-497c-a4d8-79c07d1f911e");
});
您可以使用下面的链接尝试相同的方法。
邮差测试示例
问题内容: 验证文档是否遵循某种版本的HTML(最好是我可以指定)的最佳方法是什么?我希望能够知道失败发生的地方,例如基于Web的验证器,但本机Python应用程序除外。 问题答案: XHTML很简单,请使用lxml。 HTML更加困难,因为传统上对HTML人群的验证没有太大兴趣(通过验证器yikes运行StackOverflow本身)。最简单的解决方案是执行诸如nsgmls或OpenJade之类
请求帮助Postman请求配置Docuign身份验证。需求是服务集成。因此,我对可用的RestAPI发出的第一个请求如下 我得到的只是Postman中的一堆超文本标记语言。有人能告诉我这里做错了什么吗?此外,请建议服务集成流程中的后续步骤,以便在成功身份验证后获取访问令牌。 感谢您的帮助。提前表示感谢。
问题内容: 我想用Java验证HTML代码。 像这样: 有哪些Java库可以做到这一点? 问题答案: 您可以尝试JTidy。JTidy是HTML Tidy的Java端口,HTML Tidy是HTML语法检查器和漂亮的打印机。 http://jtidy.sourceforge.net/
我有一个放心的回复,其中包含以下正文: 我想验证嵌套在2个数组中的状态“已接受”和原因“已通过验证”。我尝试将原因存储为列表,在此示例中进行了概述,但我收到以下错误: 代码: 有没有办法做到:
我正在使用Springs的Webclient进行HTTP GET调用。 我如何验证响应对象的属性,我收到作为我的HTTP调用的响应。 我试图通过阻止响应对象来验证平板地图中的出生日期,但这看起来不是最有效的方法。 以下是我代码的摘录。 任何帮助都非常感谢。
我试图断言Json响应在我的jmetm使用Beanshell断言。下面是我的代码。 下面是我必须验证的Json路径 运行脚本后,我得到以下脚本。 断言失败消息:org。阿帕奇。乔芬。util。JMeterException:调用bsh方法时出错:评估源文件:内联评估:``导入组织。json。JSONObject;导入组织。json。杰索纳雷;导入java。lang.String;…'':类型化变量