<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>断言 _ 扒房网</title>
	<atom:link href="https://www.gxjlyf.com/tag/%e6%96%ad%e8%a8%80/feed" rel="self" type="application/rss+xml" />
	<link>https://www.gxjlyf.com</link>
	<description>手机系统教程_手机软件教程_手机app使用教程_电脑软件教程_电脑系统教程</description>
	<lastBuildDate>Fri, 03 Dec 2021 18:33:54 +0000</lastBuildDate>
	<language>zh-Hans</language>
	<sy:updatePeriod>
	hourly	</sy:updatePeriod>
	<sy:updateFrequency>
	1	</sy:updateFrequency>
	
	<item>
		<title>小编教你postman怎么添加断言 postman添加断言方法。</title>
		<link>https://www.gxjlyf.com/204475.html</link>
		
		<dc:creator><![CDATA[bafang18]]></dc:creator>
		<pubDate>Fri, 03 Dec 2021 18:33:54 +0000</pubDate>
				<category><![CDATA[软件教程]]></category>
		<category><![CDATA[postman]]></category>
		<category><![CDATA[断言]]></category>
		<category><![CDATA[方法]]></category>
		<guid isPermaLink="false">https://www.chuwenyu.com/204475.html</guid>

					<description><![CDATA[postman怎么添加断言?很多小伙伴不会操作，下面小编给大家带来postman添加断言方法，我们一起学习下吧 ...]]></description>
										<content:encoded><![CDATA[<p>
	postman怎么添加断言?很多小伙伴不会操作，下面小编给大家带来postman添加断言方法，我们一起学习下吧。
</p>
<p>
	<strong>postman怎么添加断言 postman添加断言方法</strong>
</p>
<p style="text-align:center">
	<strong><img decoding="async" src="https://dz.cwhello.com/wp-content/uploads/2021/12/20211203183334-61aa62febdba0.jpg" alt="postman怎么添加断言 postman添加断言方法" /><br />
</strong>
</p>
<p>
	打开上次保存的postman完成的访问百度经验的一个简单的Get请求。
</p>
<p>
	9postman-测试GET请求
</p>
<p>	<img decoding="async" src="https://dz.cwhello.com/wp-content/uploads/2021/12/20211203183336-61aa63005a85c.jpg" alt="postman怎么添加断言 postman添加断言方法截图" /></p>
<p>
	点击Send，查看响应信息。
</p>
<p>
	这里就设置，检查响应信息里面包含：百度经验——实用生活指南
</p>
<p>
	这几个字。
</p>
<p>
	同时设置响应httpCode为200，断言响应成功。
</p>
<p>	<img decoding="async" src="https://dz.cwhello.com/wp-content/uploads/2021/12/20211203183337-61aa6301e431b.jpg" alt="postman怎么添加断言 postman添加断言方法截图" /></p>
<p>
	点击Url下方的Tests，这里设置断言。
</p>
<p>	<img decoding="async" src="https://dz.cwhello.com/wp-content/uploads/2021/12/20211203183339-61aa630381b06.jpg" alt="postman怎么添加断言 postman添加断言方法截图" /></p>
<p>
	点进来后这里是空的，你如果熟悉postman的函数，可以直接手动输入，如果不熟悉，postman在右侧已经提供了tests片段。
</p>
<p>
	点击Learn more tests可以了解更多代码片段。
</p>
<p>	<img decoding="async" src="https://dz.cwhello.com/wp-content/uploads/2021/12/20211203183340-61aa63047aa8e.jpg" alt="postman怎么添加断言 postman添加断言方法截图" /></p>
<p>
	找到Response body：Contains string
</p>
<p>
	响应body包含字符串。
</p>
<p>
	点击。
</p>
<p>	<img decoding="async" src="https://dz.cwhello.com/wp-content/uploads/2021/12/20211203183342-61aa6306226fe.jpg" alt="postman怎么添加断言 postman添加断言方法截图" /></p>
<p>
	在Tests框内出现一段代码片段，其他不用管，只需要将string_you_want_to_search字符串，替换为：百度经验——实用生活指南
</p>
<p>
	即可，而且代码片段写的很明白，从英文意思就可以了解该如何设置。
</p>
<p>	<img decoding="async" alt="postman怎么添加断言 postman添加断言方法截图" src="https://dz.cwhello.com/wp-content/uploads/2021/12/20211203183344-61aa63085babb.png" width="500" height="99" /></p>
<p>	<img fetchpriority="high" decoding="async" alt="postman怎么添加断言 postman添加断言方法截图" src="https://dz.cwhello.com/wp-content/uploads/2021/12/20211203183345-61aa6309eea84.png" width="500" height="142" /></p>
<p>
	找到代码片段。Status code：code is 200.
</p>
<p>
	点击。
</p>
<p>	<img decoding="async" src="https://dz.cwhello.com/wp-content/uploads/2021/12/20211203183347-61aa630b938e6.jpg" alt="postman怎么添加断言 postman添加断言方法截图" /></p>
<p>
	生成断言httpCode为200的代码片段。
</p>
<p>	<img decoding="async" alt="postman怎么添加断言 postman添加断言方法截图" src="https://dz.cwhello.com/wp-content/uploads/2021/12/20211203183348-61aa630cb6cef.png" width="500" height="143" /></p>
<p>
	Ctrl+s保存一下请求的设置。
</p>
<p>
	然后点击Send发送请求，查看响应信息。
</p>
<p>
	响应中查看Tests Results。
</p>
<p>
	设置的检查全部成功。
</p>
<p>	<img decoding="async" src="https://dz.cwhello.com/wp-content/uploads/2021/12/20211203183351-61aa630f38339.jpg" alt="postman怎么添加断言 postman添加断言方法截图" /></p>
<p>
	以上就是postman添加断言方法，更多精彩教程尽在扒房网!</p>

<p><img src="https://www.gxjlyf.com/postviews/204475.png" /></p>
]]></content:encoded>
					
		
		
			</item>
	</channel>
</rss>
