Accept-Encoding:跟压缩有关,浏览器发送http请求给web服务器,http请求中的header有Accept-Encoding:gzip,deflate(告诉服务器,浏览器支持gzip压缩) Content-Length:发送给HTTP服务器数据的长度。 Content-Type:即是Internet Media Type,互联网媒体类型;也叫做MIME类型,在Http协议消息头中,使用Content-Type来表示具体请求中的媒体类型信息。 例如:Content-Type: application/x-www-form-urlencoded 常见的媒体格式类型如下: text/html : HTML格式 text/plain :纯文本格式 text/xml : XML格式 image/gif :gif图片格式 image/jpeg :jpg图片格式 image/png:png图片格式 以application开头的媒体格式类型: application/xhtml+xml :XHTML格式 application/xml : XML数据格式 application/atom+xml :Atom XML聚合格式 application/json : JSON数据格式 application/pdf :pdf格式 application/msword : Word文档格式 application/octet-stream : 二进制流数据(如常见的文件下载) application/x-www-form-urlencoded :
HTTP/1.1 200 OK Date: Mon, 30 Dec 2019 11:16:45 GMT Content-Type: text/html; charset=utf-8 Connection: keep-alive Vary: Accept-Encoding Content-Length: 19121 DOCTYPE html> <html lang="zh-cn"> <head> <meta charset="utf-8" /> <meta name="viewport" content="width=device-width, initial-scale=1.0" /> <meta name="referrer" content="never" /> <meta property="og:description" content="一、soapUI简介 soapUI是一个开源测试工具,通过soap/http来检查、调用、实现Web Service的功能/负载/符合性测试。该工具既可作为一个单独的测试软件使用,也可利用插件集成到E" /> <meta http-equiv="Cache-Control" content="no-transform" /> <meta http-equiv="Cache-Control" content="no-siteapp" /> <meta http-equiv="X-UA-Compatible" content="IE=edge" /> <title>接口测试工具soapUI(一) - 帅姐 - 博客园title> <link rel="stylesheet" href="/css/blog-common.min.css?v=PyyhYDRKBG1sYtpoHme_xHO5AMd5iN57I45iBKF8FVY" /> <link id="MainCss" rel="stylesheet" href="/skins/summergarden/bundle-summergarden.min.css?v=X4bFXeVITa4R62KibBcxY9PyNj-MkkV0-IpC8y8yg_Q" /> <link id="mobile-style" media="only screen and (max-width: 767px)" type="text/css" rel="stylesheet" href="/skins/summergarden/bundle-summergarden-mobile.min.css?v=-QJralHuYdZVDw2zivi4j5fUWp9jAHwpSH6TIdmjbwI" /> <link type="application/rss+xml" rel="alternate" href="https://www.cnblogs.com/shuaijie/rss" /> <link type="application/rsd+xml" rel="EditURI" href="https://www.cnblogs.com/shuaijie/rsd.xml" /> <link type="application/wlwmanifest+xml" rel="wlwmanifest" href="https://www.cnblogs.com/shuaijie/wlwmanifest.xml" /> <script src="https://common.cnblogs.com/scripts/jquery-2.2.0.min.js">script> <script src="/js/blog-common.min.js?v=9AUvV7CGRXeBxRXvxWjIJxJZemektvGlJfH8yBiYzRQ">script> <script> var currentBlogId = 162206; var currentBlogApp = 'shuaijie'; var cb_enable_mathjax = false; var isLogined = true; script> head> <body> <a name="top">a> <div id="home"> <div id="header"> <div id="blogTitle"> <a href="https://www.cnblogs.com/shuaijie/"><img id="blogLogo" src="/skins/custom/images/logo.gif" alt="返回主页" />a> <h1><a id="Header1_HeaderTitle" class="headermaintitle HeaderMainTitle" href="https://www.cnblogs.com/shuaijie/">架海擎天a> h1> <h2> 越来越好的前提就是越来越努力! h2> div> <div id="navigator"> <ul id="navList"> <li><a id="blog_nav_sitehome" class="menu" href="https://www.cnblogs.com/"> 博客园a> li> <li> <a id="blog_nav_myhome" class="menu" href="https://www.cnblogs.com/shuaijie/"> 首页a> li> <li> <a id="blog_nav_newpost" class="menu" href="https://i.cnblogs.com/EditPosts.aspx?opt=1"> 新随笔a> li> <li> <a id="blog_nav_contact" class="menu" href="https://msg.cnblogs.com/send/%E5%B8%85%E5%A7%90"> 联系a>li> <li> <a id="blog_nav_admin" class="menu" href="https://i.cnblogs.com/"> 管理a> li> <li> <a id="blog_nav_rss" class="menu" href="https://www.cnblogs.com/shuaijie/rss/"> 订阅a> <a id="blog_nav_rss_image" href="https://www.cnblogs.com/shuaijie/rss/"> <img src="/skins/summergarden/images/xml.gif" alt="订阅" /> a>li> ul> <div class="blogStats"> 随笔 - 2 文章 - 39 评论 - 12 div> div> div> <div id="main"> <div id="mainContent"> <div class="forFlow"> <div id="post_detail"> <div id="topics"> <div class="post"> <h1 class = "postTitle"> <a id="cb_post_title_url" class="postTitle2" href="https://www.cnblogs.com/shuaijie/articles/5913750.html">接口测试工具soapUI(一)a> h1> <div class="clear">div> <div class="postBody"> <div id="cnblogs_post_body" class="blogpost-body "> <h3><span style="color: #ff0000; background-color: #ffffff;">一、soapUI简介span>h3> <p> soapUI是一个开源测试工具,通过soap/http来检查、调用、实现Web Service的功能/负载/符合性测试。该工具既可作为一个单独的测试软件使用,也可利用<a href="http://baike.so.com/doc/1483288-1568456.html" target="_blank">插件a>集成到Eclipse,maven2.X,Netbeans 和intellij中使用。soapUI pro是soapUI的商业非开源版本,实现的功能较开源的soapUI更多。p> <h3><span style="color: #ff0000;">二、soapUI初体验span>h3> <h4>1、soapUI安装及破解(参考:http://blog.csdn.net/liuchangxin1982/article/details/47614625)h4> <p>1)安装方法p> <p>先下载SOAPUI,我这里用的是5.1.2 PRO 版p> <p>下载路径:<a href="http://dl.eviware.com/list_soapui2.html?_ga=1.16http://dl.eviware.com/list_soapui2.html?_ga=1.162568764.18578086.14016161482568764.18578086.1401616148" target="_blank">http://dl.eviware.com/list_soapui2.html?_ga=1.16http://dl.eviware.com/list_soapui2.html?_ga=1.162568764.18578086.14016161482568764.18578086.1401616148a>p> <p><img src="http://img.blog.csdn.net/20150813163135699?watermark/2/text/aHR0cDovL2Jsb2cuY3Nkbi5uZXQv/font/5a6L5L2T/fontsize/400/fill/I0JBQkFCMA==/dissolve/70/gravity/Center" alt="" />p> <p>双击安装文件p> <p><img src="http://img.blog.csdn.net/20150813163317254?watermark/2/text/aHR0cDovL2Jsb2cuY3Nkbi5uZXQv/font/5a6L5L2T/fontsize/400/fill/I0JBQkFCMA==/dissolve/70/gravity/Center" alt="" />p> <p> p> <p> p> <p> p> <p><img src="http://img.blog.csdn.net/20150813163421255?watermark/2/text/aHR0cDovL2Jsb2cuY3Nkbi5uZXQv/font/5a6L5L2T/fontsize/400/fill/I0JBQkFCMA==/dissolve/70/gravity/Center" alt="" />p> <p> p> <p><img src="http://img.blog.csdn.net/20150813163435703?watermark/2/text/aHR0cDovL2Jsb2cuY3Nkbi5uZXQv/font/5a6L5L2T/fontsize/400/fill/I0JBQkFCMA==/dissolve/70/gravity/Center" alt="" />p> <p><img src="http://img.blog.csdn.net/20150813163447891?watermark/2/text/aHR0cDovL2Jsb2cuY3Nkbi5uZXQv/font/5a6L5L2T/fontsize/400/fill/I0JBQkFCMA==/dissolve/70/gravity/Center" alt="" />p> <p> p> <p><img src="http://img.blog.csdn.net/20150813163500493?watermark/2/text/aHR0cDovL2Jsb2cuY3Nkbi5uZXQv/font/5a6L5L2T/fontsize/400/fill/I0JBQkFCMA==/dissolve/70/gravity/Center" alt="" />p> <p> p> <p><img src="http://img.blog.csdn.net/20150813163514443?watermark/2/text/aHR0cDovL2Jsb2cuY3Nkbi5uZXQv/font/5a6L5L2T/fontsize/400/fill/I0JBQkFCMA==/dissolve/70/gravity/Center" alt="" />p> <p><img src="http://img.blog.csdn.net/20150813163528381?watermark/2/text/aHR0cDovL2Jsb2cuY3Nkbi5uZXQv/font/5a6L5L2T/fontsize/400/fill/I0JBQkFCMA==/dissolve/70/gravity/Center" alt="" />p> <p> p> <p><img src="http://img.blog.csdn.net/20150813163540270?watermark/2/text/aHR0cDovL2Jsb2cuY3Nkbi5uZXQv/font/5a6L5L2T/fontsize/400/fill/I0JBQkFCMA==/dissolve/70/gravity/Center" alt="" />p> <p> p> <p><img src="http://img.blog.csdn.net/20150813163723434?watermark/2/text/aHR0cDovL2Jsb2cuY3Nkbi5uZXQv/font/5a6L5L2T/fontsize/400/fill/I0JBQkFCMA==/dissolve/70/gravity/Center" alt="" />p> <p><img src="http://img.blog.csdn.net/20150813163731157?watermark/2/text/aHR0cDovL2Jsb2cuY3Nkbi5uZXQv/font/5a6L5L2T/fontsize/400/fill/I0JBQkFCMA==/dissolve/70/gravity/Center" alt="" />p> <p> 安装之后需要破解才能用p> <p>2)破解方法:http://blog.csdn.net/liuchangxin1982/article/details/47614899p> <p>关掉SOAPUI 界面p> <p> p> <p>先将C:\Program Files\SmartBear\SoapUI-Pro-5.1.2\lib\Protection-4.6.jar 删除p> <p>之后用破解文件中的Protection-4.6.jar 去替换p> <p>出现如下画面先按取消p> <p> p> <p><img src="http://img.blog.csdn.net/20150813164224046?watermark/2/text/aHR0cDovL2Jsb2cuY3Nkbi5uZXQv/font/5a6L5L2T/fontsize/400/fill/I0JBQkFCMA==/dissolve/70/gravity/Center" alt="" />p> <p><img src="http://img.blog.csdn.net/20150813164234918?watermark/2/text/aHR0cDovL2Jsb2cuY3Nkbi5uZXQv/font/5a6L5L2T/fontsize/400/fill/I0JBQkFCMA==/dissolve/70/gravity/Center" alt="" />p> <p> p> <p><img src="http://img.blog.csdn.net/20150813164250651?watermark/2/text/aHR0cDovL2Jsb2cuY3Nkbi5uZXQv/font/5a6L5L2T/fontsize/400/fill/I0JBQkFCMA==/dissolve/70/gravity/Center" alt="" />p> <p><img src="http://img.blog.csdn.net/20150813164259945?watermark/2/text/aHR0cDovL2Jsb2cuY3Nkbi5uZXQv/font/5a6L5L2T/fontsize/400/fill/I0JBQkFCMA==/dissolve/70/gravity/Center" alt="" /><img src="http://img.blog.csdn.net/20150813164309573?watermark/2/text/aHR0cDovL2Jsb2cuY3Nkbi5uZXQv/font/5a6L5L2T/fontsize/400/fill/I0JBQkFCMA==/dissolve/70/gravity/Center" alt="" />p> <p><img src="http://img.blog.csdn.net/20150813164328795?watermark/2/text/aHR0cDovL2Jsb2cuY3Nkbi5uZXQv/font/5a6L5L2T/fontsize/400/fill/I0JBQkFCMA==/dissolve/70/gravity/Center" alt="" />p> <p><img src="http://img.blog.csdn.net/20150813164345547?watermark/2/text/aHR0cDovL2Jsb2cuY3Nkbi5uZXQv/font/5a6L5L2T/fontsize/400/fill/I0JBQkFCMA==/dissolve/70/gravity/Center" alt="" />p> <p>出现这种界面说明破解成功p> <h4>2、soapUI界面介绍h4> <p><img src="https://images2015.cnblogs.com/blog/563728/201609/563728-20160927165639922-798461775.png" alt="" />p> <h4>3、创建项目h4> <p>这里创建REST服务p> <p><img src="https://images2015.cnblogs.com/blog/563728/201609/563728-20160927165855156-1967883419.png" alt="" /> <img src="https://images2015.cnblogs.com/blog/563728/201609/563728-20160927170054360-371416171.png" alt="" />p> <p><img src="https://images2015.cnblogs.com/blog/563728/201609/563728-20160927170302797-717584330.png" alt="" />p> <h3><span style="color: #ff0000;">三、soapUI测试用例span>h3> <h4>1、测试数据单一h4> <p>1)新建测试套件:p> <p><img src="https://images2015.cnblogs.com/blog/563728/201609/563728-20160927170439313-1185638577.png" alt="" /> <img src="https://images2015.cnblogs.com/blog/563728/201609/563728-20160927170541766-959494907.png" alt="" />p> <p><img src="https://images2015.cnblogs.com/blog/563728/201609/563728-20160927170707844-715112230.png" alt="" />p> <p><img src="https://images2015.cnblogs.com/blog/563728/201609/563728-20160927170737219-1968722277.png" alt="" />p> <p>增加断言:p> <p> <img src="https://images2015.cnblogs.com/blog/563728/201609/563728-20160927171322797-150400508.png" alt="" />p> <p> p> <p> p> <p> <img src="https://images2015.cnblogs.com/blog/563728/201609/563728-20160927171031219-1530222310.png" alt="" />p> <p>运行结果:p> <p><img src="https://images2015.cnblogs.com/blog/563728/201609/563728-20160927171405672-326372155.png" alt="" />p> <h4>2、测试数据来源于excel:(参考:http://www.cnblogs.com/heiyexiaoguai/p/4852334.html)h4> <p>1)创建测试数据文件:testaccept.xlsxp> <p><img src="https://images2015.cnblogs.com/blog/563728/201609/563728-20160927171640313-1618979686.png" alt="" />p> <p>2)选择测试步骤,添加【Datasource】p> <p><img src="https://images2015.cnblogs.com/blog/563728/201609/563728-20160927171944453-1516662363.png" alt="" />p> <p><img src="https://images2015.cnblogs.com/blog/563728/201609/563728-20160927172015797-1396747397.png" alt="" />p> <p>3)添加请求:p> <p><img src="https://images2015.cnblogs.com/blog/563728/201609/563728-20160927172859531-1306119233.png" alt="" />p> <p> p> <p>4)添加DataSource Loop,又来控制循环取数p> <p><img src="https://images2015.cnblogs.com/blog/563728/201609/563728-20160927173011188-1271496895.png" alt="" /> <img src="https://images2015.cnblogs.com/blog/563728/201609/563728-20160927173041625-846870630.png" alt="" />p> <p>5)增加断言:p> <p><img src="https://images2015.cnblogs.com/blog/563728/201609/563728-20160927173123563-896783351.png" alt="" /><img src="https://images2015.cnblogs.com/blog/563728/201609/563728-20160927173147281-807450919.png" alt="" />p> <p>6)运行结果p> <p><img src="https://images2015.cnblogs.com/blog/563728/201609/563728-20160927173359703-1058437145.png" alt="" />p> <p> p> <p>我们看到测试用例执行失败后,后面的将不会执行,而我们希望即使失败也要执行所有的测试用例,我们做如下设置:取消Abor test if an fasiled TestSteps前面的钩,再运行:p> <p><img src="https://images2015.cnblogs.com/blog/563728/201609/563728-20160927173531047-159260860.png" alt="" /> <img src="https://images2015.cnblogs.com/blog/563728/201609/563728-20160927173600219-547064147.png" alt="" />p> <p><img src="https://images2015.cnblogs.com/blog/563728/201609/563728-20160927173744891-1983102051.png" alt="" />p> <p>7)查看测试结果信息:<img src="https://images2015.cnblogs.com/blog/563728/201609/563728-20160927173830250-406988099.png" alt="" />p> <p>8)导出测试报告p> <p><img src="https://images2015.cnblogs.com/blog/563728/201609/563728-20160927174316766-1741821213.png" alt="" />p> <p> p> <p><img src="https://images2015.cnblogs.com/blog/563728/201609/563728-20160927174250438-1751389417.png" alt="" />p> <h3><span style="color: #ff0000;"> 四、soapUI性能测试span>h3> <p><span style="color: #ff0000;"><span style="color: #000000;">1、创建性能测试用例:span><br />span>p> <p><span style="color: #ff0000;"><span style="color: #000000;"><img src="https://images2015.cnblogs.com/blog/563728/201609/563728-20160928084227500-673632399.png" alt="" /> <img src="https://images2015.cnblogs.com/blog/563728/201609/563728-20160928084249110-1388723561.png" alt="" />span>span>p> <p><img src="https://images2015.cnblogs.com/blog/563728/201609/563728-20160928084311438-1084683055.png" alt="" />p> <p>2)点击运行,运行结果如下:p> <p><img src="https://images2015.cnblogs.com/blog/563728/201609/563728-20160928084555547-382052013.png" alt="" />p> <p>3)参数设置说明:p> <p><img src="https://images2015.cnblogs.com/blog/563728/201609/563728-20160928084727703-2055717051.png" alt="" />p> <p>4)生成性能测试统计图p> <p><img src="https://images2015.cnblogs.com/blog/563728/201609/563728-20160928084853906-684640686.png" alt="" />p> <p> p> div> <div id="MySignature">div> <div class="clear">div> <div id="blog_post_info_block"> <div id="blog_post_info">div> <div class="clear">div> <div id="post_next_prev">div> div> div> <div class="postDesc">posted @ <span id="post-date">2016-09-27 17:46span> <a href="https://www.cnblogs.com/shuaijie/">帅姐a> 阅读(<span id="post_view_count">...span>) 评论(<span id="post_comment_count">...span>) <a href="https://i.cnblogs.com/EditArticles.aspx?postid=5913750" rel="nofollow">编辑a> <a href="javascript:void(0)" onclick="AddToWz(5913750);return false;">收藏a>div> div> div> <script src="https://common.cnblogs.com/highlight/9.12.0/highlight.min.js">script> <script>markdown_highlight();script> <script> var allowComments = true, cb_blogId = 162206, cb_blogApp = 'shuaijie', cb_blogUserGuid = '025de365-9813-e311-8d02-90b11c0b17d6'; var cb_entryId = 5913750, cb_entryCreatedDate = '2016-09-27 17:46', cb_postType = 2; loadViewCount(cb_entryId); script><a name="!comments">a> <div id="blog-comments-placeholder">div> <script> var commentManager = new blogCommentManager(); commentManager.renderComments(0); script> <div id="comment_form" class="commentform"> <a name="commentform">a> <div id="divCommentShow">div> <div id="comment_nav"><span id="span_refresh_tips">span><a href="javascript:void(0);" onclick="return RefreshCommentList();" id="lnk_RefreshComments" runat="server" clientidmode="Static">刷新评论a><a href="#" onclick="return RefreshPage();">刷新页面a><a href="#top">返回顶部a>div> <div id="comment_form_container">div> <div class="ad_text_commentbox" id="ad_text_under_commentbox">div> <div id="ad_t2">div> <div id="opt_under_post">div> <script async="async" src="https://www.googletagservices.com/tag/js/gpt.js">script> <script> var googletag = googletag || {}; googletag.cmd = googletag.cmd || []; script> <script> googletag.cmd.push(function () { googletag.defineSlot("/1090369/C1", [300, 250], "div-gpt-ad-1546353474406-0").addService(googletag.pubads()); googletag.defineSlot("/1090369/C2", [468, 60], "div-gpt-ad-1539008685004-0").addService(googletag.pubads()); googletag.pubads().enableSingleRequest(); googletag.enableServices(); }); script> <div id="cnblogs_c1" class="c_ad_block"> <div id="div-gpt-ad-1546353474406-0" style="height:250px; width:300px;">div> div> <div id="under_post_news">div> <div id="cnblogs_c2" class="c_ad_block"> <div id="div-gpt-ad-1539008685004-0" style="height:60px; width:468px;"> <script> if (new Date() >= new Date(2018, 9, 13)) { googletag.cmd.push(function () { googletag.display("div-gpt-ad-1539008685004-0"); }); } script> div> div> <div id="under_post_kb">div> <div id="HistoryToday" class="c_ad_block">div> <script type="text/javascript"> fixPostBody(); setTimeout(function () { incrementViewCount(cb_entryId); }, 50); deliverAdT2(); deliverAdC1(); deliverAdC2(); loadNewsAndKb(); loadBlogSignature(); LoadPostCategoriesTags(cb_blogId, cb_entryId); LoadPostInfoBlock(cb_blogId, cb_entryId, cb_blogApp, cb_blogUserGuid); GetPrevNextPost(cb_entryId, cb_blogId, cb_entryCreatedDate, cb_postType); loadOptUnderPost(); GetHistoryToday(cb_blogId, cb_blogApp, cb_entryCreatedDate); script> div>div> div> div> <div id="sideBar"> <div id="sideBarMain"> <div id="sidebar_news" class="newsItem"> <script>loadBlogNews();script> div> <div id="calendar"><div id="calendar"><div id="blog-calendar" style="display:none">div>div> <script>loadBlogDefaultCalendar();script>div> <DIV id="leftcontentcontainer"> <div id="blog-sidecolumn">div> <script>loadBlogSideColumn();script> DIV> div> div> <div class="clear">div> div> <div class="clear">div> <div id="footer"> Copyright © 2019 帅姐 <br /><span id="poweredby">Powered by .NET Core 3.1.0 on Linuxspan> div> div> body> html>