mirror of
https://github.com/YMFE/yapi.git
synced 2024-12-21 05:19:42 +08:00
225 lines
9.9 KiB
HTML
225 lines
9.9 KiB
HTML
<!DOCTYPE html>
|
||
<html lang="zh-CN">
|
||
|
||
<head>
|
||
<meta charset="UTF-8">
|
||
<meta name="viewport" content="width=device-width,minimum-scale=1.0,maximum-scale=1.0,user-scalable=no" />
|
||
<meta name="format-detection" content="telephone=no,email=no" />
|
||
<meta http-equiv="X-UA-Compatible" content="ie=edge, chrome=1">
|
||
<meta name="description" content="description of your site">
|
||
<meta name="author" content="author of the site">
|
||
<title>YApi 使用手册</title>
|
||
<link rel="stylesheet" href="source/main.css" />
|
||
|
||
|
||
|
||
<link rel="stylesheet" href="styles/theme.css" />
|
||
|
||
|
||
</head>
|
||
<body>
|
||
<div class="ydoc">
|
||
<header class="ydoc-header">
|
||
<div class="ydoc-header-area">
|
||
|
||
<a href="http://ued.qunar.com/ymfe/" class="navbar-brand">YMFE</a>
|
||
|
||
<button class="ydocIcon navbar-toggle"></button>
|
||
<nav class="ydoc-nav">
|
||
<ul class="navbar-left">
|
||
|
||
<li class="active">
|
||
|
||
<a href="index.html">使用手册</a>
|
||
</li>
|
||
|
||
<li class="">
|
||
|
||
<a href="api.html"></a>
|
||
</li>
|
||
|
||
</ul>
|
||
</nav>
|
||
</div>
|
||
</header>
|
||
|
||
<!-- <header style="height:20px"></header> -->
|
||
|
||
<!-- Docs page layout -->
|
||
|
||
<div class="ydoc-banner-bg">
|
||
<div class="ydoc-banner ">
|
||
<div class="ydoc-banner-area">
|
||
<h1 >YApi</h1>
|
||
<p class="desc ">高效、易用、功能强大的api管理平台,旨在为开发、产品、测试人员提供更优雅的接口管理服务。</p>
|
||
|
||
</div>
|
||
</div>
|
||
|
||
|
||
<div class="ydoc-container">
|
||
|
||
<div class="ydoc-container-content ">
|
||
|
||
|
||
<div class="content-left staticsidenav" role="complementary">
|
||
<nav class="docs-sidebar hidden-print hidden-xs hidden-sm">
|
||
<ul class="nav docs-sidenav">
|
||
|
||
<!-- <li > -->
|
||
<li >
|
||
|
||
<a href="index-认识 YApi.html">认识 YApi</a>
|
||
</li>
|
||
|
||
<!-- <li > -->
|
||
<li >
|
||
|
||
<a href="index-创建第一个API.html">创建第一个API</a>
|
||
</li>
|
||
|
||
<!-- <li > -->
|
||
<li >
|
||
|
||
<a href="index-管理分组与项目.html">管理分组与项目</a>
|
||
</li>
|
||
|
||
<!-- <li > -->
|
||
<li >
|
||
|
||
<a href="index-项目操作.html">项目操作</a>
|
||
</li>
|
||
|
||
<!-- <li > -->
|
||
<li >
|
||
|
||
<a href="index-接口操作.html">接口操作</a>
|
||
</li>
|
||
|
||
<!-- <li > -->
|
||
<li >
|
||
|
||
<a href="index-使用mock功能.html">使用mock功能</a>
|
||
</li>
|
||
|
||
<!-- <li class="active" class="active" > -->
|
||
<li class="active" >
|
||
|
||
<a href="index-使用测试集.html">使用测试集</a>
|
||
</li>
|
||
|
||
<ul class="nav docs-sidenav-extend" >
|
||
|
||
<li >
|
||
<a href="#介绍">介绍</a>
|
||
</li>
|
||
|
||
<li >
|
||
<a href="#添加测试集">添加测试集</a>
|
||
</li>
|
||
|
||
<li >
|
||
<a href="#添加接口用例">添加接口用例</a>
|
||
</li>
|
||
|
||
<li >
|
||
<a href="#查看接口用例">查看接口用例</a>
|
||
</li>
|
||
|
||
</ul>
|
||
|
||
<!-- <li > -->
|
||
<li >
|
||
|
||
<a href="index-常见问题.html">常见问题</a>
|
||
</li>
|
||
|
||
</ul>
|
||
</nav>
|
||
</div>
|
||
|
||
<div class="content-right markdown-body use-sidebar" role="main">
|
||
|
||
<h2 class="subject" id="介绍">介绍 <a class="hashlink" href="#介绍">#</a></h2><p style='text-indent:2em;line-height:1.8em'>测试集是接口用例的集合。接口用例用来保存接口运行请求参数,方便我们下次再测试接口,无需再填请求参数。</p>
|
||
|
||
<h2 class="subject" id="添加测试集">添加测试集 <a class="hashlink" href="#添加测试集">#</a></h2><p>添加测试集,我们可以创建个人测试集、环境测试集或者功能测试集等等。每个测试集只是接口用例的集合,可以按照任何维度去创建。</p>
|
||
<p>项目接口页面,测试集合 tab 下面『加号』按钮添加测试集。</p>
|
||
<p><img src="./images/case_col_add.jpg" /></p>
|
||
<p>添加测试集必须填写集合名,然后可以选填集合简介。</p>
|
||
<p><img src="./images/case_col_add_modal.jpg" /></p>
|
||
<h2 class="subject" id="添加接口用例">添加接口用例 <a class="hashlink" href="#添加接口用例">#</a></h2><p>当我们在运行、调试某个接口时,为了把当前的测试请求数据保存下来,方便下次测试。我们可以将接口当前的测试数据,保存为该接口的测试用例。</p>
|
||
<p>在接口运行页面,点击保存按钮,添加接口用例。</p>
|
||
<p><img src="./images/case_add.jpg" /></p>
|
||
<p>然后选择用例需要添加到的集合。如何还没有集合,可以新建。</p>
|
||
<p><img src="./images/case_add_modal.jpg" /></p>
|
||
<h2 class="subject" id="查看接口用例">查看接口用例 <a class="hashlink" href="#查看接口用例">#</a></h2><p>添加完用例,我们可以在接口集合 tab 下面看到,当前项目的所有测试集合和接口用例。接口用例和接口运行一样,只不过默认带上了一些请求参数。
|
||
<img src="./images/case_list.jpg" /></p>
|
||
|
||
</div>
|
||
</div>
|
||
|
||
</div>
|
||
|
||
</div>
|
||
|
||
<footer class="footer">
|
||
<div class="copyright">
|
||
© 2016 <a href="http://ued.qunar.com/ymfe/">YMFE</a> Team. Build by <a href="http://ued.qunar.com/ydoc/">ydoc</a>.
|
||
</div>
|
||
</footer>
|
||
</div>
|
||
|
||
|
||
<div class="open-panel"></div>
|
||
<div class="mask"></div>
|
||
|
||
|
||
<script src="source/main.js"></script>
|
||
<script src="source/app.js"></script>
|
||
|
||
<script>
|
||
var lineHeight = 18;
|
||
var EXAMPLE_MAX_HEIGHT;
|
||
|
||
function fold() {
|
||
// 折叠code
|
||
$('.markdown-body pre').css({
|
||
"line-height": lineHeight + "px"
|
||
});
|
||
$('.markdown-body pre').map(function(i, item) {
|
||
var $item = $(item);
|
||
var foldnumber = $item.data('foldnumber');
|
||
EXAMPLE_MAX_HEIGHT = lineHeight * (foldnumber || 6);
|
||
if ($item.height() > EXAMPLE_MAX_HEIGHT) {
|
||
$item.css({
|
||
"padding-bottom": 30
|
||
});
|
||
$item.find('code').height(EXAMPLE_MAX_HEIGHT);
|
||
$item.append('<span class="extend">展开更多……</span>');
|
||
};
|
||
});
|
||
$('.ydoc-example').delegate('.extend', 'click', function() {
|
||
var $this = $(this);
|
||
$this.removeClass('extend').addClass('fold');
|
||
$this.html('折叠代码');
|
||
$this.parent().children('.js-code').height('auto');
|
||
$this.parent().height('auto');
|
||
});
|
||
$('.ydoc-example').delegate('.fold', 'click', function() {
|
||
var $this = $(this);
|
||
var foldnumber = $this.parent().data('foldnumber');
|
||
EXAMPLE_MAX_HEIGHT = lineHeight * (foldnumber || 6);
|
||
$this.removeClass('fold').addClass('extend');
|
||
$this.parent().height(EXAMPLE_MAX_HEIGHT); // pre
|
||
$this.parent().children('.js-code').height(EXAMPLE_MAX_HEIGHT); // code
|
||
$this.html("展开更多……");
|
||
});
|
||
}
|
||
$(document).ready(fold);
|
||
</script>
|
||
|
||
|
||
</body>
|
||
|
||
</html>
|