Deployed 9c1b7e0 with MkDocs version: 1.2.3

This commit is contained in:
debugtalk
2021-11-15 21:03:11 +08:00
parent eb455182d4
commit cac0eadcb8
43 changed files with 11206 additions and 3488 deletions

View File

@@ -1,6 +1,4 @@
<!doctype html>
<html lang="zh" class="no-js">
<head>
@@ -14,8 +12,9 @@
<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">
<link rel="icon" href="../../assets/images/favicon.png">
<meta name="generator" content="mkdocs-1.2.3, mkdocs-material-7.3.6">
@@ -23,33 +22,43 @@
<link rel="stylesheet" href="../../assets/stylesheets/main.a2408e81.min.css">
<link rel="stylesheet" href="../../assets/stylesheets/palette.a46bcfb3.min.css">
<link rel="stylesheet" href="../../assets/stylesheets/main.a57b2b03.min.css">
<link rel="stylesheet" href="../../assets/stylesheets/palette.3f5d1f46.min.css">
<meta name="theme-color" content="#4051b5">
<meta name="theme-color" content="#3f51b5">
<link href="https://fonts.gstatic.com" rel="preconnect" crossorigin>
<link rel="preconnect" href="https://fonts.gstatic.com" 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>
<style>:root{--md-text-font-family:"Roboto";--md-code-font-family:"Roboto Mono"}</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>
<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(){var e;this.value&&(e=document.location.pathname,ga("send","pageview",e+"?q="+this.value))}),"undefined"!=typeof location$&&location$.subscribe(function(e){ga("send","pageview",e.pathname)})})</script>
<script async src="https://www.google-analytics.com/analytics.js"></script>
</head>
@@ -58,8 +67,13 @@
<body dir="ltr" data-md-color-scheme="" data-md-color-primary="indigo" data-md-color-accent="indigo">
<script>function __prefix(e){return new URL("../..",location).pathname+"."+e}function __get(e,t=localStorage){return JSON.parse(t.getItem(__prefix(e)))}</script>
<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>
@@ -75,54 +89,64 @@
</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">
<header class="md-header" data-md-component="header">
<nav class="md-header__inner md-grid" aria-label="Header">
<a href="../.." title="HttpRunner V3.x Docs" class="md-header__button md-logo" aria-label="HttpRunner V3.x Docs" data-md-component="logo">
<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>
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M12 8a3 3 0 0 0 3-3 3 3 0 0 0-3-3 3 3 0 0 0-3 3 3 3 0 0 0 3 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">
<label class="md-header__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">
<div class="md-header__title" data-md-component="header-title">
<div class="md-header__ellipsis">
<div class="md-header__topic">
<span class="md-ellipsis">
HttpRunner V3.x Docs
</span>
<span class="md-header-nav__topic md-ellipsis">
</div>
<div class="md-header__topic" data-md-component="header-topic">
<span class="md-ellipsis">
Run Testcase
</span>
</div>
</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 class="md-header__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 0 1 16 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 0 1 9.5 16 6.5 6.5 0 0 1 3 9.5 6.5 6.5 0 0 1 9.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">
<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" required>
<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="M9.5 3A6.5 6.5 0 0 1 16 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 0 1 9.5 16 6.5 6.5 0 0 1 3 9.5 6.5 6.5 0 0 1 9.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>
<nav class="md-search__options" aria-label="Search">
<button type="reset" class="md-search__icon md-icon" aria-label="Clear" tabindex="-1">
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M19 6.41 17.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>
</nav>
</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>
@@ -132,12 +156,12 @@
</div>
<div class="md-header-nav__source">
<div class="md-header__source">
<a href="https://github.com/httprunner/httprunner" title="前往 GitHub 仓库" class="md-source">
<a href="https://github.com/httprunner/httprunner" title="前往仓库" class="md-source" data-md-component="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>
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 448 512"><path d="M439.55 236.05 244 40.45a28.87 28.87 0 0 0-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 0 1-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 0 0 0 40.81l195.61 195.6a28.86 28.86 0 0 0 40.8 0l194.69-194.69a28.86 28.86 0 0 0 0-40.81z"/></svg>
</div>
<div class="md-source__repository">
HttpRunner
@@ -146,28 +170,33 @@
</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 md-sidebar--primary" data-md-component="sidebar" data-md-type="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">
<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">
<a href="../.." title="HttpRunner V3.x Docs" class="md-nav__button md-logo" aria-label="HttpRunner V3.x Docs" data-md-component="logo">
<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>
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M12 8a3 3 0 0 0 3-3 3 3 0 0 0-3-3 3 3 0 0 0-3 3 3 3 0 0 0 3 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
@@ -175,10 +204,10 @@
<div class="md-nav__source">
<a href="https://github.com/httprunner/httprunner" title="前往 GitHub 仓库" class="md-source">
<a href="https://github.com/httprunner/httprunner" title="前往仓库" class="md-source" data-md-component="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>
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 448 512"><path d="M439.55 236.05 244 40.45a28.87 28.87 0 0 0-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 0 1-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 0 0 0 40.81l195.61 195.6a28.86 28.86 0 0 0 40.8 0l194.69-194.69a28.86 28.86 0 0 0 0-40.81z"/></svg>
</div>
<div class="md-source__repository">
HttpRunner
@@ -192,24 +221,15 @@
<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">
<a href="../.." class="md-nav__link">
Introduction
</a>
</li>
@@ -217,115 +237,141 @@
<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="../concepts/" title="Concepts" class="md-nav__link">
Concepts
</a>
</li>
<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="../../installation/" class="md-nav__link">
Installation
</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">
<label class="md-nav__link md-nav__link--active" for="__toc">
<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"></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"></span>
User Guide
</label>
<ul class="md-nav__list" data-md-scrollfix>
<li class="md-nav__item">
<a href="../concepts/" class="md-nav__link">
Concepts
</a>
</li>
<li class="md-nav__item">
<a href="../scaffold/" class="md-nav__link">
Scaffold
</a>
</li>
<li class="md-nav__item">
<a href="../gen_tests/" class="md-nav__link">
Record & Generate testcase
</a>
</li>
<li class="md-nav__item">
<a href="../write_testcase/" class="md-nav__link">
Write Testcase
</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">
<label class="md-nav__link md-nav__link--active" for="__toc">
Run Testcase
<span class="md-nav__icon md-icon"></span>
</label>
<a href="./" class="md-nav__link md-nav__link--active">
Run Testcase
<span class="md-nav__icon md-icon">
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M3 9h14V7H3v2m0 4h14v-2H3v2m0 4h14v-2H3v2m16 0h2v-2h-2v2m0-10v2h2V7h-2m0 6h2v-2h-2v2z"/></svg>
</span>
</label>
<a href="./" title="Run Testcase" class="md-nav__link md-nav__link--active">
Run Testcase
</a>
</a>
<nav class="md-nav md-nav--secondary" aria-label="目录">
<label class="md-nav__title" for="__toc">
<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>
<span class="md-nav__icon md-icon"></span>
目录
</label>
<ul class="md-nav__list" data-md-scrollfix>
<ul class="md-nav__list" data-md-component="toc" data-md-scrollfix>
<li class="md-nav__item">
<a href="#run-testcases-in-diverse-ways" class="md-nav__link">
@@ -379,61 +425,74 @@
</ul>
</nav>
</li>
</li>
<li class="md-nav__item">
<a href="../testing_report/" class="md-nav__link">
Testing Report
</a>
</li>
<li class="md-nav__item">
<a href="../run_loadtest/" class="md-nav__link">
Run load test
</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">
<a href="../run_loadtest/" title="Run load test" class="md-nav__link">
Run load test
</a>
</li>
</ul>
</nav>
</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="../../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>
<li class="md-nav__item">
<a href="../../CHANGELOG/" class="md-nav__link">
CHANGELOG
</a>
</li>
</ul>
@@ -443,23 +502,25 @@
</div>
<div class="md-sidebar md-sidebar--secondary" data-md-component="toc">
<div class="md-sidebar md-sidebar--secondary" data-md-component="sidebar" data-md-type="toc" >
<div class="md-sidebar__scrollwrap">
<div class="md-sidebar__inner">
<nav class="md-nav md-nav--secondary" aria-label="目录">
<label class="md-nav__title" for="__toc">
<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>
<span class="md-nav__icon md-icon"></span>
目录
</label>
<ul class="md-nav__list" data-md-scrollfix>
<ul class="md-nav__list" data-md-component="toc" data-md-scrollfix>
<li class="md-nav__item">
<a href="#run-testcases-in-diverse-ways" class="md-nav__link">
@@ -518,55 +579,45 @@
</div>
<div class="md-content">
<div class="md-content" data-md-component="content">
<article class="md-content__inner md-typeset">
<h1 id="run-testcase">Run Testcase<a class="headerlink" href="#run-testcase" title="Permanent link">&para;</a></h1>
<p>Once testcase is ready, you can run testcase with <code>hrun</code> command.</p>
<p>Notice, <code>hrun</code> is an command alias of <code>httprunner run</code>, they have the same effect.</p>
<div class="codehilite"><pre><span></span><code>hrun = httprunner run
</code></pre></div>
<h2 id="run-testcases-in-diverse-ways">run testcases in diverse ways<a class="headerlink" href="#run-testcases-in-diverse-ways" title="Permanent link">&para;</a></h2>
<p><code>HttpRunner</code> can run testcases in diverse ways.</p>
<p>You can run single testcase by specifying testcase file path.</p>
<div class="codehilite"><pre><span></span><code>$ hrun path/to/testcase1
</code></pre></div>
<p>You can also run several testcases by specifying multiple testcase file paths.</p>
<div class="codehilite"><pre><span></span><code>$ hrun path/to/testcase1 path/to/testcase2
</code></pre></div>
<p>If you want to run testcases of a whole project, you can achieve this goal by specifying the project folder path.</p>
<div class="codehilite"><pre><span></span><code>$ hrun path/to/testcase_folder/
</code></pre></div>
<h2 id="run-yamljson-testcases">run YAML/JSON testcases<a class="headerlink" href="#run-yamljson-testcases" title="Permanent link">&para;</a></h2>
<p>If your testcases are written in YAML/JSON format, <code>hrun</code> will firstly convert YAML/JSON testcases to pytest(python) files, and run with <code>pytest</code> command.</p>
<p>That is to say,</p>
<div class="codehilite"><pre><span></span><code>hrun = make + pytest
</code></pre></div>
<p>In most cases, the generated pytest files are in the same folder next to origin YAML/JSON files, with the same file name except adding <code>_test</code> suffix and replace extension <code>.yml/yaml/.json</code> with <code>.py</code>.</p>
<div class="codehilite"><pre><span></span><code>/path/to/example.yml =&gt; /path/to/example_test.py
</code></pre></div>
<p>However, if the testcase folder name or file name contains symbols like dot, hyphen or space, these symbols will be replaced with underscore in order to avoid syntax error in python class importing (testcase reference). Also, folder/file name starts with digit will be adding a prefix <code>T</code> because python module and class name can not be started with digit.</p>
<div class="codehilite"><pre><span></span><code>path 1/a.b-2/3.yml =&gt; path_1/a_b_2/T3_test.py
</code></pre></div>
<h2 id="run-pytest-testcases">run pytest testcases<a class="headerlink" href="#run-pytest-testcases" title="Permanent link">&para;</a></h2>
<p>If your testcases are written in pytest format, or you want to run pytest files converted from YAML/JSON testcases, <code>hrun</code> and <code>pytest</code> commands are both okay. What you need to remember is that <code>hrun</code> only wraps <code>pytest</code>, thus all the arguments of <code>pytest</code> can be used with <code>hrun</code>.</p>
<div class="codehilite"><pre><span></span><code>$ hrun -h
@@ -804,7 +855,6 @@ to see available fixtures type: pytest --fixtures
(shown according to specified file_or_dir or current dir if not specified; fixtures with leading &#39;_&#39; are only shown with the &#39;-v&#39; option
</code></pre></div>
<h2 id="execution-logs">execution logs<a class="headerlink" href="#execution-logs" title="Permanent link">&para;</a></h2>
<p>By default, <code>hrun</code> will not print details of request and response data.</p>
<div class="codehilite"><pre><span></span><code>$ hrun examples/postman_echo/request_methods/request_with_functions.yml
@@ -826,7 +876,6 @@ examples/postman_echo/request_methods/request_with_functions_test.py .
======================================================================= 1 passed in 2.98s =======================================================================
</code></pre></div>
<p>If you want to view details of request &amp; response data, extraction and validation, you can add an argument <code>-s</code> (shortcut for <code>--capture=no</code>). </p>
<div class="codehilite"><pre><span></span><code>$ hrun -s examples/postman_echo/request_methods/request_with_functions.yml
2020-06-17 15:42:54.369 | INFO | httprunner.make:make_testcase:317 - start to make testcase: /Users/debugtalk/MyProjects/HttpRunner-dev/HttpRunner/examples/postman_echo/request_methods/request_with_functions.yml
@@ -914,7 +963,6 @@ body : {
======================================================================= 1 passed in 2.13s =======================================================================
</code></pre></div>
<p>Also, an execution log file will be generated for each testcase, located in <code>&lt;ProjectRootDir&gt;/logs/TestCaseID.run.log</code>.</p>
<h2 id="testcase-id-request-id">TestCase ID &amp; Request ID<a class="headerlink" href="#testcase-id-request-id" title="Permanent link">&para;</a></h2>
<p>For the sake of troubleshooting, each testcase will generate a unique ID (uuid4), and each request headers will be added a <code>HRUN-Request-ID</code> field with testcase ID automatically.</p>
@@ -922,7 +970,6 @@ body : {
timestamp_six_digits = str(int(time.time() * 1000))[-6:])
</code></pre></div>
<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 &amp; Server IP:PORT<a class="headerlink" href="#client-server-ipport" title="Permanent link">&para;</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>
@@ -932,7 +979,6 @@ timestamp_six_digits = str(int(time.time() * 1000))[-6:])
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>&quot;address&quot;: {
&quot;client_ip&quot;: &quot;10.90.205.63&quot;,
@@ -942,7 +988,6 @@ timestamp_six_digits = str(int(time.time() * 1000))[-6:])
},
</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">&para;</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>
<ul>
@@ -960,58 +1005,62 @@ timestamp_six_digits = str(int(time.time() * 1000))[-6:])
</article>
</div>
</div>
</main>
<footer class="md-footer">
<div class="md-footer-nav">
<nav class="md-footer-nav__inner md-grid" aria-label="Footer">
<nav class="md-footer__inner md-grid" aria-label="Footer">
<a href="../write_testcase/" title="Write Testcase" 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>
<a href="../write_testcase/" class="md-footer__link md-footer__link--prev" aria-label="上一页: Write Testcase" rel="prev">
<div class="md-footer__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__title">
<div class="md-ellipsis">
<span class="md-footer__direction">
上一页
</span>
Write Testcase
</div>
<div class="md-footer-nav__title">
<div class="md-ellipsis">
<span class="md-footer-nav__direction">
上一页
</span>
Write Testcase
</div>
</div>
</a>
</div>
</a>
<a href="../testing_report/" title="Testing Report" 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>
Testing Report
</div>
<a href="../testing_report/" class="md-footer__link md-footer__link--next" aria-label="下一页: Testing Report" rel="next">
<div class="md-footer__title">
<div class="md-ellipsis">
<span class="md-footer__direction">
下一页
</span>
Testing Report
</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>
<div class="md-footer__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 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 &copy; 2017 - 2020 debugtalk
Copyright &copy; 2017 - 2021 debugtalk
</div>
Made with
<a href="https://squidfunk.github.io/mkdocs-material/" target="_blank" rel="noopener">
Material for MkDocs
</a>
Made with
<a href="https://squidfunk.github.io/mkdocs-material/" target="_blank" rel="noopener">
Material for MkDocs
</a>
</div>
<div class="md-footer-social">
@@ -1022,7 +1071,7 @@ timestamp_six_digits = str(int(time.time() * 1000))[-6:])
<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>
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M12 8a3 3 0 0 0 3-3 3 3 0 0 0-3-3 3 3 0 0 0-3 3 3 3 0 0 0 3 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>
@@ -1041,19 +1090,13 @@ timestamp_six_digits = str(int(time.time() * 1000))[-6:])
</footer>
</div>
<div class="md-dialog" data-md-component="dialog">
<div class="md-dialog__inner md-typeset"></div>
</div>
<script id="__config" type="application/json">{"base": "../..", "features": [], "translations": {"clipboard.copy": "\u590d\u5236", "clipboard.copied": "\u5df2\u590d\u5236", "search.config.lang": "ja", "search.config.pipeline": "trimmer, stemmer", "search.config.separator": "[\\uff0c\\u3002]+", "search.placeholder": "\u641c\u7d22", "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", "search.result.more.one": "1 more on this page", "search.result.more.other": "# more on this page", "search.result.term.missing": "Missing", "select.version.title": "Select version"}, "search": "../../assets/javascripts/workers/search.fcfe8b6d.min.js", "version": null}</script>
<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>
<script src="../../assets/javascripts/bundle.b1047164.min.js"></script>
</body>