Deployed e49ba59 with MkDocs version: 1.1.2
This commit is contained in:
parent
8cd6f4bd30
commit
c10baef2af
12
404.html
12
404.html
|
@ -292,6 +292,18 @@
|
||||||
</li>
|
</li>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<li class="md-nav__item">
|
||||||
|
<a href="/user/run_loadtest/" title="Run load test" class="md-nav__link">
|
||||||
|
Run load test
|
||||||
|
</a>
|
||||||
|
</li>
|
||||||
|
|
||||||
|
|
||||||
</ul>
|
</ul>
|
||||||
</nav>
|
</nav>
|
||||||
</li>
|
</li>
|
||||||
|
|
|
@ -297,6 +297,18 @@
|
||||||
</li>
|
</li>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<li class="md-nav__item">
|
||||||
|
<a href="../user/run_loadtest/" title="Run load test" class="md-nav__link">
|
||||||
|
Run load test
|
||||||
|
</a>
|
||||||
|
</li>
|
||||||
|
|
||||||
|
|
||||||
</ul>
|
</ul>
|
||||||
</nav>
|
</nav>
|
||||||
</li>
|
</li>
|
||||||
|
@ -355,8 +367,36 @@
|
||||||
<ul class="md-nav__list" data-md-scrollfix>
|
<ul class="md-nav__list" data-md-scrollfix>
|
||||||
|
|
||||||
<li class="md-nav__item">
|
<li class="md-nav__item">
|
||||||
<a href="#3013-2020-06-15" class="md-nav__link">
|
<a href="#313-2020-06-30" class="md-nav__link">
|
||||||
3.0.13 (2020-06-15)
|
3.1.3 (2020-06-30)
|
||||||
|
</a>
|
||||||
|
|
||||||
|
</li>
|
||||||
|
|
||||||
|
<li class="md-nav__item">
|
||||||
|
<a href="#312-2020-06-29" class="md-nav__link">
|
||||||
|
3.1.2 (2020-06-29)
|
||||||
|
</a>
|
||||||
|
|
||||||
|
</li>
|
||||||
|
|
||||||
|
<li class="md-nav__item">
|
||||||
|
<a href="#311-2020-06-23" class="md-nav__link">
|
||||||
|
3.1.1 (2020-06-23)
|
||||||
|
</a>
|
||||||
|
|
||||||
|
</li>
|
||||||
|
|
||||||
|
<li class="md-nav__item">
|
||||||
|
<a href="#310-2020-06-21" class="md-nav__link">
|
||||||
|
3.1.0 (2020-06-21)
|
||||||
|
</a>
|
||||||
|
|
||||||
|
</li>
|
||||||
|
|
||||||
|
<li class="md-nav__item">
|
||||||
|
<a href="#3013-2020-06-17" class="md-nav__link">
|
||||||
|
3.0.13 (2020-06-17)
|
||||||
</a>
|
</a>
|
||||||
|
|
||||||
</li>
|
</li>
|
||||||
|
@ -485,8 +525,36 @@
|
||||||
<ul class="md-nav__list" data-md-scrollfix>
|
<ul class="md-nav__list" data-md-scrollfix>
|
||||||
|
|
||||||
<li class="md-nav__item">
|
<li class="md-nav__item">
|
||||||
<a href="#3013-2020-06-15" class="md-nav__link">
|
<a href="#313-2020-06-30" class="md-nav__link">
|
||||||
3.0.13 (2020-06-15)
|
3.1.3 (2020-06-30)
|
||||||
|
</a>
|
||||||
|
|
||||||
|
</li>
|
||||||
|
|
||||||
|
<li class="md-nav__item">
|
||||||
|
<a href="#312-2020-06-29" class="md-nav__link">
|
||||||
|
3.1.2 (2020-06-29)
|
||||||
|
</a>
|
||||||
|
|
||||||
|
</li>
|
||||||
|
|
||||||
|
<li class="md-nav__item">
|
||||||
|
<a href="#311-2020-06-23" class="md-nav__link">
|
||||||
|
3.1.1 (2020-06-23)
|
||||||
|
</a>
|
||||||
|
|
||||||
|
</li>
|
||||||
|
|
||||||
|
<li class="md-nav__item">
|
||||||
|
<a href="#310-2020-06-21" class="md-nav__link">
|
||||||
|
3.1.0 (2020-06-21)
|
||||||
|
</a>
|
||||||
|
|
||||||
|
</li>
|
||||||
|
|
||||||
|
<li class="md-nav__item">
|
||||||
|
<a href="#3013-2020-06-17" class="md-nav__link">
|
||||||
|
3.0.13 (2020-06-17)
|
||||||
</a>
|
</a>
|
||||||
|
|
||||||
</li>
|
</li>
|
||||||
|
@ -599,7 +667,57 @@
|
||||||
|
|
||||||
|
|
||||||
<h1 id="release-history">Release History<a class="headerlink" href="#release-history" title="Permanent link">¶</a></h1>
|
<h1 id="release-history">Release History<a class="headerlink" href="#release-history" title="Permanent link">¶</a></h1>
|
||||||
<h2 id="3013-2020-06-15">3.0.13 (2020-06-15)<a class="headerlink" href="#3013-2020-06-15" title="Permanent link">¶</a></h2>
|
<h2 id="313-2020-06-30">3.1.3 (2020-06-30)<a class="headerlink" href="#313-2020-06-30" title="Permanent link">¶</a></h2>
|
||||||
|
<p><strong>Fixed</strong></p>
|
||||||
|
<ul>
|
||||||
|
<li>fix: validate with variable or function whose evaluation result is "" or not text</li>
|
||||||
|
</ul>
|
||||||
|
<h2 id="312-2020-06-29">3.1.2 (2020-06-29)<a class="headerlink" href="#312-2020-06-29" title="Permanent link">¶</a></h2>
|
||||||
|
<p><strong>Fixed</strong></p>
|
||||||
|
<ul>
|
||||||
|
<li>fix: missing setup/teardown hooks for referenced testcase</li>
|
||||||
|
<li>fix: compatibility for <code>black</code> on Android termux that does not support multiprocessing well</li>
|
||||||
|
<li>fix: mishandling of request header <code>Content-Length</code> for GET method</li>
|
||||||
|
<li>fix: validate with jmespath containing variable or function, e.g. <code>body.locations[$index].name</code></li>
|
||||||
|
</ul>
|
||||||
|
<p><strong>Changed</strong></p>
|
||||||
|
<ul>
|
||||||
|
<li>change: import locust at beginning to monkey patch all modules</li>
|
||||||
|
<li>change: open file in binary mode</li>
|
||||||
|
</ul>
|
||||||
|
<h2 id="311-2020-06-23">3.1.1 (2020-06-23)<a class="headerlink" href="#311-2020-06-23" title="Permanent link">¶</a></h2>
|
||||||
|
<p><strong>Added</strong></p>
|
||||||
|
<ul>
|
||||||
|
<li>feat: add optional message for assertion</li>
|
||||||
|
</ul>
|
||||||
|
<p><strong>Fixed</strong></p>
|
||||||
|
<ul>
|
||||||
|
<li>fix: ValueError when type_match None</li>
|
||||||
|
<li>fix: override referenced testcase export in teststep</li>
|
||||||
|
<li>fix: avoid duplicate import</li>
|
||||||
|
<li>fix: override locust weight</li>
|
||||||
|
</ul>
|
||||||
|
<h2 id="310-2020-06-21">3.1.0 (2020-06-21)<a class="headerlink" href="#310-2020-06-21" title="Permanent link">¶</a></h2>
|
||||||
|
<p><strong>Added</strong></p>
|
||||||
|
<ul>
|
||||||
|
<li>feat: integrate <a href="https://locust.io/">locust</a> v1.0</li>
|
||||||
|
</ul>
|
||||||
|
<p><strong>Changed</strong></p>
|
||||||
|
<ul>
|
||||||
|
<li>change: make converted referenced pytest files always relative to ProjectRootDir</li>
|
||||||
|
<li>change: log function details when call function failed</li>
|
||||||
|
<li>change: do not raise error if failed to get client/server address info</li>
|
||||||
|
</ul>
|
||||||
|
<p><strong>Fixed</strong></p>
|
||||||
|
<ul>
|
||||||
|
<li>fix: path handling error when har2case har file and cwd != ProjectRootDir</li>
|
||||||
|
<li>fix: missing list type for request body</li>
|
||||||
|
</ul>
|
||||||
|
<h2 id="3013-2020-06-17">3.0.13 (2020-06-17)<a class="headerlink" href="#3013-2020-06-17" title="Permanent link">¶</a></h2>
|
||||||
|
<p><strong>Added</strong></p>
|
||||||
|
<ul>
|
||||||
|
<li>feat: log client/server IP and port</li>
|
||||||
|
</ul>
|
||||||
<p><strong>Fixed</strong></p>
|
<p><strong>Fixed</strong></p>
|
||||||
<ul>
|
<ul>
|
||||||
<li>fix: avoid '.csv' been converted to '_csv'</li>
|
<li>fix: avoid '.csv' been converted to '_csv'</li>
|
||||||
|
|
|
@ -297,6 +297,18 @@
|
||||||
</li>
|
</li>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<li class="md-nav__item">
|
||||||
|
<a href="../../user/run_loadtest/" title="Run load test" class="md-nav__link">
|
||||||
|
Run load test
|
||||||
|
</a>
|
||||||
|
</li>
|
||||||
|
|
||||||
|
|
||||||
</ul>
|
</ul>
|
||||||
</nav>
|
</nav>
|
||||||
</li>
|
</li>
|
||||||
|
|
Binary file not shown.
Before Width: | Height: | Size: 354 KiB After Width: | Height: | Size: 369 KiB |
12
index.html
12
index.html
|
@ -353,6 +353,18 @@
|
||||||
</li>
|
</li>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<li class="md-nav__item">
|
||||||
|
<a href="user/run_loadtest/" title="Run load test" class="md-nav__link">
|
||||||
|
Run load test
|
||||||
|
</a>
|
||||||
|
</li>
|
||||||
|
|
||||||
|
|
||||||
</ul>
|
</ul>
|
||||||
</nav>
|
</nav>
|
||||||
</li>
|
</li>
|
||||||
|
|
|
@ -342,6 +342,18 @@
|
||||||
</li>
|
</li>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<li class="md-nav__item">
|
||||||
|
<a href="../user/run_loadtest/" title="Run load test" class="md-nav__link">
|
||||||
|
Run load test
|
||||||
|
</a>
|
||||||
|
</li>
|
||||||
|
|
||||||
|
|
||||||
</ul>
|
</ul>
|
||||||
</nav>
|
</nav>
|
||||||
</li>
|
</li>
|
||||||
|
@ -445,16 +457,17 @@ $ pip3 install -U git+https://github.com/httprunner/httprunner.git@master
|
||||||
|
|
||||||
|
|
||||||
<h2 id="check-installation">Check Installation<a class="headerlink" href="#check-installation" title="Permanent link">¶</a></h2>
|
<h2 id="check-installation">Check Installation<a class="headerlink" href="#check-installation" title="Permanent link">¶</a></h2>
|
||||||
<p>When HttpRunner is installed, 4 commands will be added in your system.</p>
|
<p>When HttpRunner is installed, 5 commands will be added in your system.</p>
|
||||||
<ul>
|
<ul>
|
||||||
<li><code>httprunner</code>: main command, used for all functions</li>
|
<li><code>httprunner</code>: main command, used for all functions</li>
|
||||||
<li><code>hrun</code>: alias for <code>httprunner run</code>, used to run YAML/JSON/pytest testcases</li>
|
<li><code>hrun</code>: alias for <code>httprunner run</code>, used to run YAML/JSON/pytest testcases</li>
|
||||||
<li><code>hmake</code>: alias for <code>httprunner make</code>, used to convert YAML/JSON testcases to pytest files</li>
|
<li><code>hmake</code>: alias for <code>httprunner make</code>, used to convert YAML/JSON testcases to pytest files</li>
|
||||||
<li><code>har2case</code>: alias for <code>httprunner har2case</code>, used to convert HAR to YAML/JSON testcases</li>
|
<li><code>har2case</code>: alias for <code>httprunner har2case</code>, used to convert HAR to YAML/JSON testcases</li>
|
||||||
|
<li><code>locusts</code>: used to run load test with <a href="http://locust.io/">locust</a></li>
|
||||||
</ul>
|
</ul>
|
||||||
<p>To see <code>HttpRunner</code> version:</p>
|
<p>To see <code>HttpRunner</code> version:</p>
|
||||||
<div class="codehilite"><pre><span></span><code>$ httprunner -V # hrun -V
|
<div class="codehilite"><pre><span></span><code>$ httprunner -V # hrun -V
|
||||||
3.0.10
|
3.1.0
|
||||||
</code></pre></div>
|
</code></pre></div>
|
||||||
|
|
||||||
|
|
||||||
|
@ -477,6 +490,11 @@ optional arguments:
|
||||||
-h, --help show this help message and exit
|
-h, --help show this help message and exit
|
||||||
-V, --version show version
|
-V, --version show version
|
||||||
</code></pre></div>
|
</code></pre></div>
|
||||||
|
|
||||||
|
|
||||||
|
<blockquote>
|
||||||
|
<p>Notice: <code>locusts</code> is an individual command, for the reason to monkey patch ssl at beginning to avoid RecursionError when running locust.</p>
|
||||||
|
</blockquote>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -297,6 +297,18 @@
|
||||||
</li>
|
</li>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<li class="md-nav__item">
|
||||||
|
<a href="../user/run_loadtest/" title="Run load test" class="md-nav__link">
|
||||||
|
Run load test
|
||||||
|
</a>
|
||||||
|
</li>
|
||||||
|
|
||||||
|
|
||||||
</ul>
|
</ul>
|
||||||
</nav>
|
</nav>
|
||||||
</li>
|
</li>
|
||||||
|
|
File diff suppressed because one or more lines are too long
22
sitemap.xml
22
sitemap.xml
|
@ -1,39 +1,43 @@
|
||||||
<?xml version="1.0" encoding="UTF-8"?>
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9"><url>
|
<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9"><url>
|
||||||
<loc>None</loc>
|
<loc>None</loc>
|
||||||
<lastmod>2020-06-17</lastmod>
|
<lastmod>2020-07-01</lastmod>
|
||||||
<changefreq>daily</changefreq>
|
<changefreq>daily</changefreq>
|
||||||
</url><url>
|
</url><url>
|
||||||
<loc>None</loc>
|
<loc>None</loc>
|
||||||
<lastmod>2020-06-17</lastmod>
|
<lastmod>2020-07-01</lastmod>
|
||||||
<changefreq>daily</changefreq>
|
<changefreq>daily</changefreq>
|
||||||
</url><url>
|
</url><url>
|
||||||
<loc>None</loc>
|
<loc>None</loc>
|
||||||
<lastmod>2020-06-17</lastmod>
|
<lastmod>2020-07-01</lastmod>
|
||||||
<changefreq>daily</changefreq>
|
<changefreq>daily</changefreq>
|
||||||
</url><url>
|
</url><url>
|
||||||
<loc>None</loc>
|
<loc>None</loc>
|
||||||
<lastmod>2020-06-17</lastmod>
|
<lastmod>2020-07-01</lastmod>
|
||||||
<changefreq>daily</changefreq>
|
<changefreq>daily</changefreq>
|
||||||
</url><url>
|
</url><url>
|
||||||
<loc>None</loc>
|
<loc>None</loc>
|
||||||
<lastmod>2020-06-17</lastmod>
|
<lastmod>2020-07-01</lastmod>
|
||||||
<changefreq>daily</changefreq>
|
<changefreq>daily</changefreq>
|
||||||
</url><url>
|
</url><url>
|
||||||
<loc>None</loc>
|
<loc>None</loc>
|
||||||
<lastmod>2020-06-17</lastmod>
|
<lastmod>2020-07-01</lastmod>
|
||||||
<changefreq>daily</changefreq>
|
<changefreq>daily</changefreq>
|
||||||
</url><url>
|
</url><url>
|
||||||
<loc>None</loc>
|
<loc>None</loc>
|
||||||
<lastmod>2020-06-17</lastmod>
|
<lastmod>2020-07-01</lastmod>
|
||||||
<changefreq>daily</changefreq>
|
<changefreq>daily</changefreq>
|
||||||
</url><url>
|
</url><url>
|
||||||
<loc>None</loc>
|
<loc>None</loc>
|
||||||
<lastmod>2020-06-17</lastmod>
|
<lastmod>2020-07-01</lastmod>
|
||||||
<changefreq>daily</changefreq>
|
<changefreq>daily</changefreq>
|
||||||
</url><url>
|
</url><url>
|
||||||
<loc>None</loc>
|
<loc>None</loc>
|
||||||
<lastmod>2020-06-17</lastmod>
|
<lastmod>2020-07-01</lastmod>
|
||||||
|
<changefreq>daily</changefreq>
|
||||||
|
</url><url>
|
||||||
|
<loc>None</loc>
|
||||||
|
<lastmod>2020-07-01</lastmod>
|
||||||
<changefreq>daily</changefreq>
|
<changefreq>daily</changefreq>
|
||||||
</url>
|
</url>
|
||||||
</urlset>
|
</urlset>
|
BIN
sitemap.xml.gz
BIN
sitemap.xml.gz
Binary file not shown.
|
@ -297,6 +297,18 @@
|
||||||
</li>
|
</li>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<li class="md-nav__item">
|
||||||
|
<a href="../user/run_loadtest/" title="Run load test" class="md-nav__link">
|
||||||
|
Run load test
|
||||||
|
</a>
|
||||||
|
</li>
|
||||||
|
|
||||||
|
|
||||||
</ul>
|
</ul>
|
||||||
</nav>
|
</nav>
|
||||||
</li>
|
</li>
|
||||||
|
@ -511,7 +523,7 @@
|
||||||
<div class="md-footer-nav">
|
<div class="md-footer-nav">
|
||||||
<nav class="md-footer-nav__inner md-grid" aria-label="Footer">
|
<nav class="md-footer-nav__inner md-grid" aria-label="Footer">
|
||||||
|
|
||||||
<a href="../user/testing_report/" title="Testing Report" class="md-footer-nav__link md-footer-nav__link--prev" rel="prev">
|
<a href="../user/run_loadtest/" title="Run load test" class="md-footer-nav__link md-footer-nav__link--prev" rel="prev">
|
||||||
<div class="md-footer-nav__button md-icon">
|
<div class="md-footer-nav__button md-icon">
|
||||||
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M20 11v2H8l5.5 5.5-1.42 1.42L4.16 12l7.92-7.92L13.5 5.5 8 11h12z"/></svg>
|
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M20 11v2H8l5.5 5.5-1.42 1.42L4.16 12l7.92-7.92L13.5 5.5 8 11h12z"/></svg>
|
||||||
</div>
|
</div>
|
||||||
|
@ -520,7 +532,7 @@
|
||||||
<span class="md-footer-nav__direction">
|
<span class="md-footer-nav__direction">
|
||||||
上一页
|
上一页
|
||||||
</span>
|
</span>
|
||||||
Testing Report
|
Run load test
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</a>
|
</a>
|
||||||
|
|
|
@ -382,6 +382,18 @@
|
||||||
</li>
|
</li>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<li class="md-nav__item">
|
||||||
|
<a href="../run_loadtest/" title="Run load test" class="md-nav__link">
|
||||||
|
Run load test
|
||||||
|
</a>
|
||||||
|
</li>
|
||||||
|
|
||||||
|
|
||||||
</ul>
|
</ul>
|
||||||
</nav>
|
</nav>
|
||||||
</li>
|
</li>
|
||||||
|
|
|
@ -0,0 +1,652 @@
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<!doctype html>
|
||||||
|
<html lang="zh" class="no-js">
|
||||||
|
<head>
|
||||||
|
|
||||||
|
<meta charset="utf-8">
|
||||||
|
<meta name="viewport" content="width=device-width,initial-scale=1">
|
||||||
|
|
||||||
|
<meta name="description" content="HttpRunner V3.x User Documentation">
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<meta name="author" content="debugtalk">
|
||||||
|
|
||||||
|
<link rel="shortcut icon" href="../../assets/images/favicon.png">
|
||||||
|
<meta name="generator" content="mkdocs-1.1.2, mkdocs-material-5.2.2">
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<title>Run load test - HttpRunner V3.x Docs</title>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<link rel="stylesheet" href="../../assets/stylesheets/main.a2408e81.min.css">
|
||||||
|
|
||||||
|
<link rel="stylesheet" href="../../assets/stylesheets/palette.a46bcfb3.min.css">
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<meta name="theme-color" content="#3f51b5">
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<link href="https://fonts.gstatic.com" rel="preconnect" crossorigin>
|
||||||
|
<link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Roboto:300,400,400i,700%7CRoboto+Mono&display=fallback">
|
||||||
|
<style>body,input{font-family:"Roboto",-apple-system,BlinkMacSystemFont,Helvetica,Arial,sans-serif}code,kbd,pre{font-family:"Roboto Mono",SFMono-Regular,Consolas,Menlo,monospace}</style>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<link rel="preconnect dns-prefetch" href="https://www.google-analytics.com">
|
||||||
|
<script>window.ga=window.ga||function(){(ga.q=ga.q||[]).push(arguments)},ga.l=+new Date,ga("create","UA-114587036-3","auto"),ga("set","anonymizeIp",!0),ga("send","pageview"),document.addEventListener("DOMContentLoaded",function(){document.forms.search&&document.forms.search.query.addEventListener("blur",function(){if(this.value){var e=document.location.pathname;ga("send","pageview",e+"?q="+this.value)}})}),document.addEventListener("DOMContentSwitch",function(){ga("send","pageview")})</script>
|
||||||
|
<script async src="https://www.google-analytics.com/analytics.js"></script>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
</head>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<body dir="ltr" data-md-color-scheme="" data-md-color-primary="indigo" data-md-color-accent="indigo">
|
||||||
|
|
||||||
|
<input class="md-toggle" data-md-toggle="drawer" type="checkbox" id="__drawer" autocomplete="off">
|
||||||
|
<input class="md-toggle" data-md-toggle="search" type="checkbox" id="__search" autocomplete="off">
|
||||||
|
<label class="md-overlay" for="__drawer"></label>
|
||||||
|
<div data-md-component="skip">
|
||||||
|
|
||||||
|
|
||||||
|
<a href="#run-load-test" class="md-skip">
|
||||||
|
跳转至
|
||||||
|
</a>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
<div data-md-component="announce">
|
||||||
|
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<header class="md-header" data-md-component="header">
|
||||||
|
<nav class="md-header-nav md-grid" aria-label="Header">
|
||||||
|
<a href="../.." title="HttpRunner V3.x Docs" class="md-header-nav__button md-logo" aria-label="HttpRunner V3.x Docs">
|
||||||
|
|
||||||
|
|
||||||
|
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M12 8a3 3 0 003-3 3 3 0 00-3-3 3 3 0 00-3 3 3 3 0 003 3m0 3.54C9.64 9.35 6.5 8 3 8v11c3.5 0 6.64 1.35 9 3.54 2.36-2.19 5.5-3.54 9-3.54V8c-3.5 0-6.64 1.35-9 3.54z"/></svg>
|
||||||
|
|
||||||
|
</a>
|
||||||
|
<label class="md-header-nav__button md-icon" for="__drawer">
|
||||||
|
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M3 6h18v2H3V6m0 5h18v2H3v-2m0 5h18v2H3v-2z"/></svg>
|
||||||
|
</label>
|
||||||
|
<div class="md-header-nav__title" data-md-component="header-title">
|
||||||
|
|
||||||
|
<div class="md-header-nav__ellipsis">
|
||||||
|
<span class="md-header-nav__topic md-ellipsis">
|
||||||
|
HttpRunner V3.x Docs
|
||||||
|
</span>
|
||||||
|
<span class="md-header-nav__topic md-ellipsis">
|
||||||
|
|
||||||
|
Run load test
|
||||||
|
|
||||||
|
</span>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<label class="md-header-nav__button md-icon" for="__search">
|
||||||
|
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M9.5 3A6.5 6.5 0 0116 9.5c0 1.61-.59 3.09-1.56 4.23l.27.27h.79l5 5-1.5 1.5-5-5v-.79l-.27-.27A6.516 6.516 0 019.5 16 6.5 6.5 0 013 9.5 6.5 6.5 0 019.5 3m0 2C7 5 5 7 5 9.5S7 14 9.5 14 14 12 14 9.5 12 5 9.5 5z"/></svg>
|
||||||
|
</label>
|
||||||
|
|
||||||
|
<div class="md-search" data-md-component="search" role="dialog">
|
||||||
|
<label class="md-search__overlay" for="__search"></label>
|
||||||
|
<div class="md-search__inner" role="search">
|
||||||
|
<form class="md-search__form" name="search">
|
||||||
|
<input type="text" class="md-search__input" name="query" aria-label="搜索" placeholder="搜索" autocapitalize="off" autocorrect="off" autocomplete="off" spellcheck="false" data-md-component="search-query" data-md-state="active">
|
||||||
|
<label class="md-search__icon md-icon" for="__search">
|
||||||
|
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M9.5 3A6.5 6.5 0 0116 9.5c0 1.61-.59 3.09-1.56 4.23l.27.27h.79l5 5-1.5 1.5-5-5v-.79l-.27-.27A6.516 6.516 0 019.5 16 6.5 6.5 0 013 9.5 6.5 6.5 0 019.5 3m0 2C7 5 5 7 5 9.5S7 14 9.5 14 14 12 14 9.5 12 5 9.5 5z"/></svg>
|
||||||
|
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M20 11v2H8l5.5 5.5-1.42 1.42L4.16 12l7.92-7.92L13.5 5.5 8 11h12z"/></svg>
|
||||||
|
</label>
|
||||||
|
<button type="reset" class="md-search__icon md-icon" aria-label="Clear" data-md-component="search-reset" tabindex="-1">
|
||||||
|
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M19 6.41L17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12 19 6.41z"/></svg>
|
||||||
|
</button>
|
||||||
|
</form>
|
||||||
|
<div class="md-search__output">
|
||||||
|
<div class="md-search__scrollwrap" data-md-scrollfix>
|
||||||
|
<div class="md-search-result" data-md-component="search-result">
|
||||||
|
<div class="md-search-result__meta">
|
||||||
|
Initializing search
|
||||||
|
</div>
|
||||||
|
<ol class="md-search-result__list"></ol>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
<div class="md-header-nav__source">
|
||||||
|
|
||||||
|
<a href="https://github.com/httprunner/httprunner" title="前往 GitHub 仓库" class="md-source">
|
||||||
|
<div class="md-source__icon md-icon">
|
||||||
|
|
||||||
|
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 448 512"><path d="M439.55 236.05L244 40.45a28.87 28.87 0 00-40.81 0l-40.66 40.63 51.52 51.52c27.06-9.14 52.68 16.77 43.39 43.68l49.66 49.66c34.23-11.8 61.18 31 35.47 56.69-26.49 26.49-70.21-2.87-56-37.34L240.22 199v121.85c25.3 12.54 22.26 41.85 9.08 55a34.34 34.34 0 01-48.55 0c-17.57-17.6-11.07-46.91 11.25-56v-123c-20.8-8.51-24.6-30.74-18.64-45L142.57 101 8.45 235.14a28.86 28.86 0 000 40.81l195.61 195.6a28.86 28.86 0 0040.8 0l194.69-194.69a28.86 28.86 0 000-40.81z"/></svg>
|
||||||
|
</div>
|
||||||
|
<div class="md-source__repository">
|
||||||
|
HttpRunner
|
||||||
|
</div>
|
||||||
|
</a>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
</nav>
|
||||||
|
</header>
|
||||||
|
|
||||||
|
<div class="md-container" data-md-component="container">
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<main class="md-main" data-md-component="main">
|
||||||
|
<div class="md-main__inner md-grid">
|
||||||
|
|
||||||
|
|
||||||
|
<div class="md-sidebar md-sidebar--primary" data-md-component="navigation">
|
||||||
|
<div class="md-sidebar__scrollwrap">
|
||||||
|
<div class="md-sidebar__inner">
|
||||||
|
<nav class="md-nav md-nav--primary" aria-label="Navigation" data-md-level="0">
|
||||||
|
<label class="md-nav__title" for="__drawer">
|
||||||
|
<a href="../.." title="HttpRunner V3.x Docs" class="md-nav__button md-logo" aria-label="HttpRunner V3.x Docs">
|
||||||
|
|
||||||
|
|
||||||
|
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M12 8a3 3 0 003-3 3 3 0 00-3-3 3 3 0 00-3 3 3 3 0 003 3m0 3.54C9.64 9.35 6.5 8 3 8v11c3.5 0 6.64 1.35 9 3.54 2.36-2.19 5.5-3.54 9-3.54V8c-3.5 0-6.64 1.35-9 3.54z"/></svg>
|
||||||
|
|
||||||
|
</a>
|
||||||
|
HttpRunner V3.x Docs
|
||||||
|
</label>
|
||||||
|
|
||||||
|
<div class="md-nav__source">
|
||||||
|
|
||||||
|
<a href="https://github.com/httprunner/httprunner" title="前往 GitHub 仓库" class="md-source">
|
||||||
|
<div class="md-source__icon md-icon">
|
||||||
|
|
||||||
|
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 448 512"><path d="M439.55 236.05L244 40.45a28.87 28.87 0 00-40.81 0l-40.66 40.63 51.52 51.52c27.06-9.14 52.68 16.77 43.39 43.68l49.66 49.66c34.23-11.8 61.18 31 35.47 56.69-26.49 26.49-70.21-2.87-56-37.34L240.22 199v121.85c25.3 12.54 22.26 41.85 9.08 55a34.34 34.34 0 01-48.55 0c-17.57-17.6-11.07-46.91 11.25-56v-123c-20.8-8.51-24.6-30.74-18.64-45L142.57 101 8.45 235.14a28.86 28.86 0 000 40.81l195.61 195.6a28.86 28.86 0 0040.8 0l194.69-194.69a28.86 28.86 0 000-40.81z"/></svg>
|
||||||
|
</div>
|
||||||
|
<div class="md-source__repository">
|
||||||
|
HttpRunner
|
||||||
|
</div>
|
||||||
|
</a>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<ul class="md-nav__list" data-md-scrollfix>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<li class="md-nav__item">
|
||||||
|
<a href="../.." title="Introduction" class="md-nav__link">
|
||||||
|
Introduction
|
||||||
|
</a>
|
||||||
|
</li>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<li class="md-nav__item">
|
||||||
|
<a href="../../installation/" title="Installation" class="md-nav__link">
|
||||||
|
Installation
|
||||||
|
</a>
|
||||||
|
</li>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<li class="md-nav__item md-nav__item--active md-nav__item--nested">
|
||||||
|
|
||||||
|
<input class="md-nav__toggle md-toggle" data-md-toggle="nav-3" type="checkbox" id="nav-3" checked>
|
||||||
|
|
||||||
|
<label class="md-nav__link" for="nav-3">
|
||||||
|
User Guide
|
||||||
|
<span class="md-nav__icon md-icon">
|
||||||
|
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M8.59 16.58L13.17 12 8.59 7.41 10 6l6 6-6 6-1.41-1.42z"/></svg>
|
||||||
|
</span>
|
||||||
|
</label>
|
||||||
|
<nav class="md-nav" aria-label="User Guide" data-md-level="1">
|
||||||
|
<label class="md-nav__title" for="nav-3">
|
||||||
|
<span class="md-nav__icon md-icon">
|
||||||
|
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M20 11v2H8l5.5 5.5-1.42 1.42L4.16 12l7.92-7.92L13.5 5.5 8 11h12z"/></svg>
|
||||||
|
</span>
|
||||||
|
User Guide
|
||||||
|
</label>
|
||||||
|
<ul class="md-nav__list" data-md-scrollfix>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<li class="md-nav__item">
|
||||||
|
<a href="../scaffold/" title="Scaffold" class="md-nav__link">
|
||||||
|
Scaffold
|
||||||
|
</a>
|
||||||
|
</li>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<li class="md-nav__item">
|
||||||
|
<a href="../gen_tests/" title="Record & Generate testcase" class="md-nav__link">
|
||||||
|
Record & Generate testcase
|
||||||
|
</a>
|
||||||
|
</li>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<li class="md-nav__item">
|
||||||
|
<a href="../write_testcase/" title="Write Testcase" class="md-nav__link">
|
||||||
|
Write Testcase
|
||||||
|
</a>
|
||||||
|
</li>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<li class="md-nav__item">
|
||||||
|
<a href="../run_testcase/" title="Run Testcase" class="md-nav__link">
|
||||||
|
Run Testcase
|
||||||
|
</a>
|
||||||
|
</li>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<li class="md-nav__item">
|
||||||
|
<a href="../testing_report/" title="Testing Report" class="md-nav__link">
|
||||||
|
Testing Report
|
||||||
|
</a>
|
||||||
|
</li>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<li class="md-nav__item md-nav__item--active">
|
||||||
|
|
||||||
|
<input class="md-nav__toggle md-toggle" data-md-toggle="toc" type="checkbox" id="__toc">
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<a href="./" title="Run load test" class="md-nav__link md-nav__link--active">
|
||||||
|
Run load test
|
||||||
|
</a>
|
||||||
|
|
||||||
|
</li>
|
||||||
|
|
||||||
|
|
||||||
|
</ul>
|
||||||
|
</nav>
|
||||||
|
</li>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<li class="md-nav__item">
|
||||||
|
<a href="../../sponsors/" title="Sponsors" class="md-nav__link">
|
||||||
|
Sponsors
|
||||||
|
</a>
|
||||||
|
</li>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<li class="md-nav__item">
|
||||||
|
<a href="../../CHANGELOG/" title="CHANGELOG" class="md-nav__link">
|
||||||
|
CHANGELOG
|
||||||
|
</a>
|
||||||
|
</li>
|
||||||
|
|
||||||
|
|
||||||
|
</ul>
|
||||||
|
</nav>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
<div class="md-sidebar md-sidebar--secondary" data-md-component="toc">
|
||||||
|
<div class="md-sidebar__scrollwrap">
|
||||||
|
<div class="md-sidebar__inner">
|
||||||
|
|
||||||
|
<nav class="md-nav md-nav--secondary" aria-label="目录">
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
</nav>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
<div class="md-content">
|
||||||
|
<article class="md-content__inner md-typeset">
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<h1 id="run-load-test">Run load test<a class="headerlink" href="#run-load-test" title="Permanent link">¶</a></h1>
|
||||||
|
<blockquote>
|
||||||
|
<p>Integrated since HttpRunner 3.1.0</p>
|
||||||
|
</blockquote>
|
||||||
|
<p>With reuse of <a href="http://locust.io/"><code>Locust</code></a>, you can run load test without extra work.</p>
|
||||||
|
<div class="codehilite"><pre><span></span><code>$ locusts -V
|
||||||
|
locust 1.0.3
|
||||||
|
</code></pre></div>
|
||||||
|
|
||||||
|
|
||||||
|
<p>For full usage, you can run <code>locusts -h</code> to see help, and you will find that it is the same with <code>locust -h</code>.</p>
|
||||||
|
<p>The only difference is the <code>-f/--locustfile</code> argument. When you specify <code>-f</code> with a YAML/JSON testcase file, it will convert to pytest first and then run load test with HttpRunner's builtin locustfile(httprunner/ext/locust/locustfile.py).</p>
|
||||||
|
<div class="codehilite"><pre><span></span><code>$ locusts -f examples/postman_echo/request_methods/request_with_variables.yml
|
||||||
|
2020-06-18 18:14:29.877 | INFO | httprunner.make:make_testcase:317 - start to make testcase: /Users/debugtalk/MyProjects/HttpRunner-dev/HttpRunner/examples/postman_echo/request_methods/request_with_variables.yml
|
||||||
|
2020-06-18 18:14:29.878 | INFO | httprunner.make:make_testcase:390 - generated testcase: /Users/debugtalk/MyProjects/HttpRunner-dev/HttpRunner/examples/postman_echo/request_methods/request_with_variables_test.py
|
||||||
|
2020-06-18 18:14:29.878 | INFO | httprunner.make:format_pytest_with_black:154 - format pytest cases with black ...
|
||||||
|
reformatted /Users/debugtalk/MyProjects/HttpRunner-dev/HttpRunner/examples/postman_echo/request_methods/request_with_variables_test.py
|
||||||
|
All done! ✨ 🍰 ✨
|
||||||
|
1 file reformatted, 1 file left unchanged.
|
||||||
|
[2020-06-18 18:14:30,241] LeodeMacBook-Pro.local/INFO/locust.main: Starting web interface at http://:8089
|
||||||
|
[2020-06-18 18:14:30,249] LeodeMacBook-Pro.local/INFO/locust.main: Starting Locust 1.0.3
|
||||||
|
</code></pre></div>
|
||||||
|
|
||||||
|
|
||||||
|
<p>In this case, you can reuse all features of <a href="http://locust.io/"><code>Locust</code></a>.</p>
|
||||||
|
<div class="codehilite"><pre><span></span><code>$ locusts -h
|
||||||
|
Usage: locust [OPTIONS] [UserClass ...]
|
||||||
|
|
||||||
|
Common options:
|
||||||
|
-h, --help show this help message and exit
|
||||||
|
-f LOCUSTFILE, --locustfile LOCUSTFILE
|
||||||
|
Python module file to import, e.g. '../other.py'.
|
||||||
|
Default: locustfile
|
||||||
|
--config CONFIG Config file path
|
||||||
|
-H HOST, --host HOST Host to load test in the following format:
|
||||||
|
http://10.21.32.33
|
||||||
|
-u NUM_USERS, --users NUM_USERS
|
||||||
|
Number of concurrent Locust users. Only used together
|
||||||
|
with --headless
|
||||||
|
-r HATCH_RATE, --hatch-rate HATCH_RATE
|
||||||
|
The rate per second in which users are spawned. Only
|
||||||
|
used together with --headless
|
||||||
|
-t RUN_TIME, --run-time RUN_TIME
|
||||||
|
Stop after the specified amount of time, e.g. (300s,
|
||||||
|
20m, 3h, 1h30m, etc.). Only used together with
|
||||||
|
--headless
|
||||||
|
-l, --list Show list of possible User classes and exit
|
||||||
|
|
||||||
|
Web UI options:
|
||||||
|
--web-host WEB_HOST Host to bind the web interface to. Defaults to '*'
|
||||||
|
(all interfaces)
|
||||||
|
--web-port WEB_PORT, -P WEB_PORT
|
||||||
|
Port on which to run web host
|
||||||
|
--headless Disable the web interface, and instead start the load
|
||||||
|
test immediately. Requires -u and -t to be specified.
|
||||||
|
--web-auth WEB_AUTH Turn on Basic Auth for the web interface. Should be
|
||||||
|
supplied in the following format: username:password
|
||||||
|
--tls-cert TLS_CERT Optional path to TLS certificate to use to serve over
|
||||||
|
HTTPS
|
||||||
|
--tls-key TLS_KEY Optional path to TLS private key to use to serve over
|
||||||
|
HTTPS
|
||||||
|
|
||||||
|
Master options:
|
||||||
|
Options for running a Locust Master node when running Locust distributed. A Master node need Worker nodes that connect to it before it can run load tests.
|
||||||
|
|
||||||
|
--master Set locust to run in distributed mode with this
|
||||||
|
process as master
|
||||||
|
--master-bind-host MASTER_BIND_HOST
|
||||||
|
Interfaces (hostname, ip) that locust master should
|
||||||
|
bind to. Only used when running with --master.
|
||||||
|
Defaults to * (all available interfaces).
|
||||||
|
--master-bind-port MASTER_BIND_PORT
|
||||||
|
Port that locust master should bind to. Only used when
|
||||||
|
running with --master. Defaults to 5557.
|
||||||
|
--expect-workers EXPECT_WORKERS
|
||||||
|
How many workers master should expect to connect
|
||||||
|
before starting the test (only when --headless used).
|
||||||
|
|
||||||
|
Worker options:
|
||||||
|
|
||||||
|
Options for running a Locust Worker node when running Locust distributed.
|
||||||
|
Only the LOCUSTFILE (-f option) need to be specified when starting a Worker, since other options such as -u, -r, -t are specified on the Master node.
|
||||||
|
|
||||||
|
--worker Set locust to run in distributed mode with this
|
||||||
|
process as worker
|
||||||
|
--master-host MASTER_HOST
|
||||||
|
Host or IP address of locust master for distributed
|
||||||
|
load testing. Only used when running with --worker.
|
||||||
|
Defaults to 127.0.0.1.
|
||||||
|
--master-port MASTER_PORT
|
||||||
|
The port to connect to that is used by the locust
|
||||||
|
master for distributed load testing. Only used when
|
||||||
|
running with --worker. Defaults to 5557.
|
||||||
|
|
||||||
|
Tag options:
|
||||||
|
Locust tasks can be tagged using the @tag decorator. These options let specify which tasks to include or exclude during a test.
|
||||||
|
|
||||||
|
-T [TAG [TAG ...]], --tags [TAG [TAG ...]]
|
||||||
|
List of tags to include in the test, so only tasks
|
||||||
|
with any matching tags will be executed
|
||||||
|
-E [TAG [TAG ...]], --exclude-tags [TAG [TAG ...]]
|
||||||
|
List of tags to exclude from the test, so only tasks
|
||||||
|
with no matching tags will be executed
|
||||||
|
|
||||||
|
Request statistics options:
|
||||||
|
--csv CSV_PREFIX Store current request stats to files in CSV format.
|
||||||
|
Setting this option will generate three files:
|
||||||
|
[CSV_PREFIX]_stats.csv, [CSV_PREFIX]_stats_history.csv
|
||||||
|
and [CSV_PREFIX]_failures.csv
|
||||||
|
--csv-full-history Store each stats entry in CSV format to
|
||||||
|
_stats_history.csv file
|
||||||
|
--print-stats Print stats in the console
|
||||||
|
--only-summary Only print the summary stats
|
||||||
|
--reset-stats Reset statistics once hatching has been completed.
|
||||||
|
Should be set on both master and workers when running
|
||||||
|
in distributed mode
|
||||||
|
|
||||||
|
Logging options:
|
||||||
|
--skip-log-setup Disable Locust's logging setup. Instead, the
|
||||||
|
configuration is provided by the Locust test or Python
|
||||||
|
defaults.
|
||||||
|
--loglevel LOGLEVEL, -L LOGLEVEL
|
||||||
|
Choose between DEBUG/INFO/WARNING/ERROR/CRITICAL.
|
||||||
|
Default is INFO.
|
||||||
|
--logfile LOGFILE Path to log file. If not set, log will go to
|
||||||
|
stdout/stderr
|
||||||
|
|
||||||
|
Step load options:
|
||||||
|
--step-load Enable Step Load mode to monitor how performance
|
||||||
|
metrics varies when user load increases. Requires
|
||||||
|
--step-users and --step-time to be specified.
|
||||||
|
--step-users STEP_USERS
|
||||||
|
User count to increase by step in Step Load mode. Only
|
||||||
|
used together with --step-load
|
||||||
|
--step-time STEP_TIME
|
||||||
|
Step duration in Step Load mode, e.g. (300s, 20m, 3h,
|
||||||
|
1h30m, etc.). Only used together with --step-load
|
||||||
|
|
||||||
|
Other options:
|
||||||
|
--show-task-ratio Print table of the User classes' task execution ratio
|
||||||
|
--show-task-ratio-json
|
||||||
|
Print json data of the User classes' task execution
|
||||||
|
ratio
|
||||||
|
--version, -V Show program's version number and exit
|
||||||
|
--exit-code-on-error EXIT_CODE_ON_ERROR
|
||||||
|
Sets the process exit code to use when a test result
|
||||||
|
contain any failure or error
|
||||||
|
-s STOP_TIMEOUT, --stop-timeout STOP_TIMEOUT
|
||||||
|
Number of seconds to wait for a simulated user to
|
||||||
|
complete any executing task before exiting. Default is
|
||||||
|
to terminate immediately. This parameter only needs to
|
||||||
|
be specified for the master process when running
|
||||||
|
Locust distributed.
|
||||||
|
|
||||||
|
User classes:
|
||||||
|
UserClass Optionally specify which User classes that should be
|
||||||
|
used (available User classes can be listed with -l or
|
||||||
|
--list)
|
||||||
|
</code></pre></div>
|
||||||
|
|
||||||
|
|
||||||
|
<p>Enjoy!</p>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
</article>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</main>
|
||||||
|
|
||||||
|
|
||||||
|
<footer class="md-footer">
|
||||||
|
|
||||||
|
<div class="md-footer-nav">
|
||||||
|
<nav class="md-footer-nav__inner md-grid" aria-label="Footer">
|
||||||
|
|
||||||
|
<a href="../testing_report/" title="Testing Report" class="md-footer-nav__link md-footer-nav__link--prev" rel="prev">
|
||||||
|
<div class="md-footer-nav__button md-icon">
|
||||||
|
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M20 11v2H8l5.5 5.5-1.42 1.42L4.16 12l7.92-7.92L13.5 5.5 8 11h12z"/></svg>
|
||||||
|
</div>
|
||||||
|
<div class="md-footer-nav__title">
|
||||||
|
<div class="md-ellipsis">
|
||||||
|
<span class="md-footer-nav__direction">
|
||||||
|
上一页
|
||||||
|
</span>
|
||||||
|
Testing Report
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</a>
|
||||||
|
|
||||||
|
|
||||||
|
<a href="../../sponsors/" title="Sponsors" class="md-footer-nav__link md-footer-nav__link--next" rel="next">
|
||||||
|
<div class="md-footer-nav__title">
|
||||||
|
<div class="md-ellipsis">
|
||||||
|
<span class="md-footer-nav__direction">
|
||||||
|
下一页
|
||||||
|
</span>
|
||||||
|
Sponsors
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="md-footer-nav__button md-icon">
|
||||||
|
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M4 11v2h12l-5.5 5.5 1.42 1.42L19.84 12l-7.92-7.92L10.5 5.5 16 11H4z"/></svg>
|
||||||
|
</div>
|
||||||
|
</a>
|
||||||
|
|
||||||
|
</nav>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="md-footer-meta md-typeset">
|
||||||
|
<div class="md-footer-meta__inner md-grid">
|
||||||
|
<div class="md-footer-copyright">
|
||||||
|
|
||||||
|
<div class="md-footer-copyright__highlight">
|
||||||
|
Copyright © 2017 - 2020 debugtalk
|
||||||
|
</div>
|
||||||
|
|
||||||
|
Made with
|
||||||
|
<a href="https://squidfunk.github.io/mkdocs-material/" target="_blank" rel="noopener">
|
||||||
|
Material for MkDocs
|
||||||
|
</a>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="md-footer-social">
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<a href="https://debugtalk.com" target="_blank" rel="noopener" title="debugtalk.com" class="md-footer-social__link">
|
||||||
|
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M12 8a3 3 0 003-3 3 3 0 00-3-3 3 3 0 00-3 3 3 3 0 003 3m0 3.54C9.64 9.35 6.5 8 3 8v11c3.5 0 6.64 1.35 9 3.54 2.36-2.19 5.5-3.54 9-3.54V8c-3.5 0-6.64 1.35-9 3.54z"/></svg>
|
||||||
|
</a>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<a href="https://github.com/httprunner" target="_blank" rel="noopener" title="github.com" class="md-footer-social__link">
|
||||||
|
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 480 512"><path d="M186.1 328.7c0 20.9-10.9 55.1-36.7 55.1s-36.7-34.2-36.7-55.1 10.9-55.1 36.7-55.1 36.7 34.2 36.7 55.1zM480 278.2c0 31.9-3.2 65.7-17.5 95-37.9 76.6-142.1 74.8-216.7 74.8-75.8 0-186.2 2.7-225.6-74.8-14.6-29-20.2-63.1-20.2-95 0-41.9 13.9-81.5 41.5-113.6-5.2-15.8-7.7-32.4-7.7-48.8 0-21.5 4.9-32.3 14.6-51.8 45.3 0 74.3 9 108.8 36 29-6.9 58.8-10 88.7-10 27 0 54.2 2.9 80.4 9.2 34-26.7 63-35.2 107.8-35.2 9.8 19.5 14.6 30.3 14.6 51.8 0 16.4-2.6 32.7-7.7 48.2 27.5 32.4 39 72.3 39 114.2zm-64.3 50.5c0-43.9-26.7-82.6-73.5-82.6-18.9 0-37 3.4-56 6-14.9 2.3-29.8 3.2-45.1 3.2-15.2 0-30.1-.9-45.1-3.2-18.7-2.6-37-6-56-6-46.8 0-73.5 38.7-73.5 82.6 0 87.8 80.4 101.3 150.4 101.3h48.2c70.3 0 150.6-13.4 150.6-101.3zm-82.6-55.1c-25.8 0-36.7 34.2-36.7 55.1s10.9 55.1 36.7 55.1 36.7-34.2 36.7-55.1-10.9-55.1-36.7-55.1z"/></svg>
|
||||||
|
</a>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</footer>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<script src="../../assets/javascripts/vendor.d710d30a.min.js"></script>
|
||||||
|
<script src="../../assets/javascripts/bundle.5f27aba8.min.js"></script><script id="__lang" type="application/json">{"clipboard.copy": "\u590d\u5236", "clipboard.copied": "\u5df2\u590d\u5236", "search.config.lang": "ja", "search.config.pipeline": "trimmer, stopWordFilter", "search.config.separator": "[\\uff0c\\u3002]+", "search.result.placeholder": "\u952e\u5165\u4ee5\u5f00\u59cb\u641c\u7d22", "search.result.none": "\u6ca1\u6709\u627e\u5230\u7b26\u5408\u6761\u4ef6\u7684\u7ed3\u679c", "search.result.one": "\u627e\u5230 1 \u4e2a\u7b26\u5408\u6761\u4ef6\u7684\u7ed3\u679c", "search.result.other": "# \u4e2a\u7b26\u5408\u6761\u4ef6\u7684\u7ed3\u679c"}</script>
|
||||||
|
|
||||||
|
<script>
|
||||||
|
app = initialize({
|
||||||
|
base: "../..",
|
||||||
|
features: [],
|
||||||
|
search: Object.assign({
|
||||||
|
worker: "../../assets/javascripts/worker/search.27c6a5e6.min.js"
|
||||||
|
}, typeof search !== "undefined" && search)
|
||||||
|
})
|
||||||
|
</script>
|
||||||
|
|
||||||
|
|
||||||
|
</body>
|
||||||
|
</html>
|
|
@ -348,6 +348,13 @@
|
||||||
TestCase ID & Request ID
|
TestCase ID & Request ID
|
||||||
</a>
|
</a>
|
||||||
|
|
||||||
|
</li>
|
||||||
|
|
||||||
|
<li class="md-nav__item">
|
||||||
|
<a href="#client-server-ipport" class="md-nav__link">
|
||||||
|
Client & Server IP:PORT
|
||||||
|
</a>
|
||||||
|
|
||||||
</li>
|
</li>
|
||||||
|
|
||||||
<li class="md-nav__item">
|
<li class="md-nav__item">
|
||||||
|
@ -376,6 +383,18 @@
|
||||||
</li>
|
</li>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<li class="md-nav__item">
|
||||||
|
<a href="../run_loadtest/" title="Run load test" class="md-nav__link">
|
||||||
|
Run load test
|
||||||
|
</a>
|
||||||
|
</li>
|
||||||
|
|
||||||
|
|
||||||
</ul>
|
</ul>
|
||||||
</nav>
|
</nav>
|
||||||
</li>
|
</li>
|
||||||
|
@ -463,6 +482,13 @@
|
||||||
TestCase ID & Request ID
|
TestCase ID & Request ID
|
||||||
</a>
|
</a>
|
||||||
|
|
||||||
|
</li>
|
||||||
|
|
||||||
|
<li class="md-nav__item">
|
||||||
|
<a href="#client-server-ipport" class="md-nav__link">
|
||||||
|
Client & Server IP:PORT
|
||||||
|
</a>
|
||||||
|
|
||||||
</li>
|
</li>
|
||||||
|
|
||||||
<li class="md-nav__item">
|
<li class="md-nav__item">
|
||||||
|
@ -886,6 +912,25 @@ timestamp_six_digits = str(int(time.time() * 1000))[-6:])
|
||||||
|
|
||||||
|
|
||||||
<p>In other words, all requests in one testcase will have the same <code>HRUN-Request-ID</code> prefix, and each request will have a unique <code>HRUN-Request-ID</code> suffix.</p>
|
<p>In other words, all requests in one testcase will have the same <code>HRUN-Request-ID</code> prefix, and each request will have a unique <code>HRUN-Request-ID</code> suffix.</p>
|
||||||
|
<h2 id="client-server-ipport">Client & Server IP:PORT<a class="headerlink" href="#client-server-ipport" title="Permanent link">¶</a></h2>
|
||||||
|
<p>Sometimes, logging remote server IP and port can be great helpful for trouble shooting, especially when there are multiple servers and we want to checkout which one returns error.</p>
|
||||||
|
<p>Since version <code>3.0.13</code>, HttpRunner will log client & server IP:Port in debug level. </p>
|
||||||
|
<div class="codehilite"><pre><span></span><code>2020-06-18 11:32:38.366 | INFO | httprunner.runner:__run_step:278 - run step begin: post raw text >>>>>>
|
||||||
|
2020-06-18 11:32:38.687 | DEBUG | httprunner.client:request:187 - client IP: 10.90.205.63, Port: 62802
|
||||||
|
2020-06-18 11:32:38.687 | DEBUG | httprunner.client:request:195 - server IP: 34.233.204.163, Port: 443
|
||||||
|
</code></pre></div>
|
||||||
|
|
||||||
|
|
||||||
|
<p>as well as testcase summary.</p>
|
||||||
|
<div class="codehilite"><pre><span></span><code>"address": {
|
||||||
|
"client_ip": "10.90.205.63",
|
||||||
|
"client_port": 62802,
|
||||||
|
"server_ip": "34.233.204.163",
|
||||||
|
"server_port": 443
|
||||||
|
},
|
||||||
|
</code></pre></div>
|
||||||
|
|
||||||
|
|
||||||
<h2 id="arguments-for-v2x-compatibility">arguments for v2.x compatibility<a class="headerlink" href="#arguments-for-v2x-compatibility" title="Permanent link">¶</a></h2>
|
<h2 id="arguments-for-v2x-compatibility">arguments for v2.x compatibility<a class="headerlink" href="#arguments-for-v2x-compatibility" title="Permanent link">¶</a></h2>
|
||||||
<p>Besides all the arguments of <code>pytest</code>, <code>hrun</code> also has several other arguments to keep compatibility with HttpRunner v2.x.</p>
|
<p>Besides all the arguments of <code>pytest</code>, <code>hrun</code> also has several other arguments to keep compatibility with HttpRunner v2.x.</p>
|
||||||
<ul>
|
<ul>
|
||||||
|
|
|
@ -355,6 +355,18 @@
|
||||||
</li>
|
</li>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<li class="md-nav__item">
|
||||||
|
<a href="../run_loadtest/" title="Run load test" class="md-nav__link">
|
||||||
|
Run load test
|
||||||
|
</a>
|
||||||
|
</li>
|
||||||
|
|
||||||
|
|
||||||
</ul>
|
</ul>
|
||||||
</nav>
|
</nav>
|
||||||
</li>
|
</li>
|
||||||
|
|
|
@ -348,6 +348,18 @@
|
||||||
</li>
|
</li>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<li class="md-nav__item">
|
||||||
|
<a href="../run_loadtest/" title="Run load test" class="md-nav__link">
|
||||||
|
Run load test
|
||||||
|
</a>
|
||||||
|
</li>
|
||||||
|
|
||||||
|
|
||||||
</ul>
|
</ul>
|
||||||
</nav>
|
</nav>
|
||||||
</li>
|
</li>
|
||||||
|
@ -508,13 +520,13 @@
|
||||||
</a>
|
</a>
|
||||||
|
|
||||||
|
|
||||||
<a href="../../sponsors/" title="Sponsors" class="md-footer-nav__link md-footer-nav__link--next" rel="next">
|
<a href="../run_loadtest/" title="Run load test" class="md-footer-nav__link md-footer-nav__link--next" rel="next">
|
||||||
<div class="md-footer-nav__title">
|
<div class="md-footer-nav__title">
|
||||||
<div class="md-ellipsis">
|
<div class="md-ellipsis">
|
||||||
<span class="md-footer-nav__direction">
|
<span class="md-footer-nav__direction">
|
||||||
下一页
|
下一页
|
||||||
</span>
|
</span>
|
||||||
Sponsors
|
Run load test
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="md-footer-nav__button md-icon">
|
<div class="md-footer-nav__button md-icon">
|
||||||
|
|
|
@ -552,6 +552,18 @@
|
||||||
</li>
|
</li>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<li class="md-nav__item">
|
||||||
|
<a href="../run_loadtest/" title="Run load test" class="md-nav__link">
|
||||||
|
Run load test
|
||||||
|
</a>
|
||||||
|
</li>
|
||||||
|
|
||||||
|
|
||||||
</ul>
|
</ul>
|
||||||
</nav>
|
</nav>
|
||||||
</li>
|
</li>
|
||||||
|
@ -971,11 +983,12 @@
|
||||||
<h5 id="assert_xxx">.assert_XXX<a class="headerlink" href="#assert_xxx" title="Permanent link">¶</a></h5>
|
<h5 id="assert_xxx">.assert_XXX<a class="headerlink" href="#assert_xxx" title="Permanent link">¶</a></h5>
|
||||||
<p>Extract JSON response body with <a href="https://jmespath.org/">jmespath</a> and validate with expected value.</p>
|
<p>Extract JSON response body with <a href="https://jmespath.org/">jmespath</a> and validate with expected value.</p>
|
||||||
<blockquote>
|
<blockquote>
|
||||||
<p>assert_XXX(jmes_path: Text, expected_value: Any)</p>
|
<p>assert_XXX(jmes_path: Text, expected_value: Any, message: Text = "")</p>
|
||||||
</blockquote>
|
</blockquote>
|
||||||
<ul>
|
<ul>
|
||||||
<li>jmes_path: jmespath expression, refer to <a href="https://jmespath.org/tutorial.html">JMESPath Tutorial</a> for more details</li>
|
<li>jmes_path: jmespath expression, refer to <a href="https://jmespath.org/tutorial.html">JMESPath Tutorial</a> for more details</li>
|
||||||
<li>expected_value: the specified expected value, variable or function reference can also be used here</li>
|
<li>expected_value: the specified expected value, variable or function reference can also be used here</li>
|
||||||
|
<li>message (optional): used to indicate assertion error reason</li>
|
||||||
</ul>
|
</ul>
|
||||||
<p>The image below shows HttpRunner builtin validators.</p>
|
<p>The image below shows HttpRunner builtin validators.</p>
|
||||||
<p><img alt="" src="/images/httprunner-step-request-validate.png" /></p>
|
<p><img alt="" src="/images/httprunner-step-request-validate.png" /></p>
|
||||||
|
|
Loading…
Reference in New Issue