Repository navigation
Expand file tree
/
Copy pathindex5.html
More file actions
483 lines (433 loc) · 29.6 KB
/
Copy pathindex5.html
File metadata and controls
483 lines (433 loc) · 29.6 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
<!DOCTYPE html>
<html lang="cn">
<head>
<meta charset="utf-8" />
<title>python自动化测试人工智能</title>
<link rel="stylesheet" href="/theme/css/main.css" />
</head>
<body id="index" class="home">
<header id="banner" class="body">
<h1><a href="/">python自动化测试人工智能 </a></h1>
<nav><ul>
<li><a href="/category/ba-zi.html">八字</a></li>
<li><a href="/category/ce-shi.html">测试</a></li>
<li><a href="/category/ce-shi-kuang-jia.html">测试框架</a></li>
<li><a href="/category/common.html">common</a></li>
<li><a href="/category/da-shu-ju.html">大数据</a></li>
<li><a href="/category/feng-shui.html">风水</a></li>
<li><a href="/category/ji-qi-xue-xi.html">机器学习</a></li>
<li><a href="/category/jie-meng.html">解梦</a></li>
<li><a href="/category/linux.html">linux</a></li>
<li><a href="/category/python.html">python</a></li>
<li><a href="/category/shu-ji.html">书籍</a></li>
<li><a href="/category/shu-ju-fen-xi.html">数据分析</a></li>
<li><a href="/category/zhong-cao-yao.html">中草药</a></li>
<li><a href="/category/zhong-yi.html">中医</a></li>
</ul></nav>
</header><!-- /#banner -->
<section id="content" class="body">
<ol id="posts-list" class="hfeed" start="9">
<li><article class="hentry">
<header>
<h1><a href="/cv_install.html" rel="bookmark"
title="Permalink to 安装人工智能图像处理工具OpenCV">安装人工智能图像处理工具OpenCV</a></h1>
</header>
<div class="entry-content">
<footer class="post-info">
<abbr class="published" title="2018-12-06T08:40:00+08:00">
Published: 四 06 十二月 2018
</abbr>
<address class="vcard author">
By <a class="url fn" href="/author/andrew.html">andrew</a>
</address>
<p>In <a href="/category/ce-shi-kuang-jia.html">测试框架</a>.</p>
</footer><!-- /.post-info --> <ul>
<li><a href="https://china-testing.github.io/practices.html">python测试开发项目实战-目录</a></li>
<li><a href="https://china-testing.github.io/python_books.html">python工具书籍下载-持续更新</a></li>
<li><a href="https://china-testing.github.io/python3_quick.html">python 3.7极速入门教程 - 目录</a></li>
</ul>
<p><img alt="图片.png" src="https://upload-images.jianshu.io/upload_images/12713060-3b72904a89216ebf.png?imageMogr2/auto-orient/strip%7CimageView2/2/w/1240"></p>
<h2 id="python">python版本安装</h2>
<p>适合所有平台:</p>
<div class="highlight"><pre><span></span><span class="err">$</span> <span class="n">sudo</span> <span class="n">pip</span> <span class="n">install</span> <span class="n">opencv</span><span class="o">-</span><span class="n">python</span>
<span class="err">$</span> <span class="n">sudo</span> <span class="n">pip</span> <span class="n">install</span> <span class="n">opencv</span><span class="o">-</span><span class="n">contrib</span><span class="o">-</span><span class="n">python</span>
</pre></div>
<h2 id="windows">Windows</h2>
<p>https://sourceforge.net/projects/opencvlibrary/ 下载对应的exe安装即可。</p>
<h2 id="macos-x">macOS X</h2>
<p>brew install opencv --with-tbb --with-opengl</p>
<h3 id="opencv">安装OpenCV依赖</h3>
<div class="highlight"><pre><span></span><span class="err">$</span> <span class="n">sudo</span> <span class="n">apt</span><span class="o">-</span><span class="n">get</span> <span class="n">update</span>
<span class="err">$</span> <span class="n">sudo</span> <span class="n">apt</span><span class="o">-</span><span class="n">get</span> <span class="n">upgrade</span>
<span class="c1"># 开发工具</span>
<span class="err">$</span> <span class="n">sudo</span> <span class="n">apt</span><span class="o">-</span><span class="n">get</span> <span class="n">install</span> <span class="n">build</span><span class="o">-</span><span class="n">essential</span> <span class="n">cmake …</span></pre></div>
<a class="readmore" href="/cv_install.html">read more</a>
</div><!-- /.entry-content -->
</article></li>
<li><article class="hentry">
<header>
<h1><a href="/jenkins_books.html" rel="bookmark"
title="Permalink to 持续集成工具jenkins书籍">持续集成工具jenkins书籍</a></h1>
</header>
<div class="entry-content">
<footer class="post-info">
<abbr class="published" title="2018-12-06T08:20:00+08:00">
Published: 四 06 十二月 2018
</abbr>
<address class="vcard author">
By <a class="url fn" href="/author/andrew.html">andrew</a>
</address>
<p>In <a href="/category/python.html">python</a>.</p>
</footer><!-- /.post-info --> <ul>
<li><a href="https://china-testing.github.io/practices.html">python测试开发项目实战-目录</a></li>
<li><a href="https://china-testing.github.io/python_books.html">python工具书籍下载-持续更新</a></li>
<li><a href="https://china-testing.github.io/python3_quick.html">python 3.7极速入门教程 - 目录</a></li>
</ul>
<h3 id="continuous-delivery-with-docker-and-jenkins-2017pdf"><a href="https://itbooks.pipipan.com/fs/18113597-323355259">Continuous Delivery with Docker and Jenkins - 2017.pdf</a></h3>
<p>使用Docker和Jenkins持续交付pdf</p>
<p>主要特点</p>
<ul>
<li>使用Docker容器构建可靠且安全的应用程序。</li>
<li>使用Docker,Jenkins和Ansible创建完整的Continuous Delivery管道。</li>
<li>直接在Docker Swarm集群上提供应用程序。</li>
<li>使用多容器和数据库迁移创建更复杂的解决方案。</li>
<li>严重依赖python</li>
</ul>
<p>你将学到什么</p>
<ul>
<li>掌握Docker基础知识以及如何将应用程序停靠在持续交付流程中</li>
<li>配置Jenkins并使用基于Docker的代理进行扩展</li>
<li>了解成功的持续交付管道的原则和技术方面</li>
<li>使用现代工具创建完整的持续交付流程:Docker,Jenkins和Ansible</li>
<li>使用Cucumber编写验收测试,并使用Jenkins在Docker生态系统中运行它们</li>
<li>使用Docker Compose创建多容器应用程序</li>
<li>管理持续交付流程中的数据库更改,并了解有效的框架,如Cucumber和Flyweight</li>
<li>使用Docker Swarm使用Jenkins构建群集应用程序</li>
<li>将构建的Docker镜像发布到Docker Registry,并使用社区最佳实践部署Jenkins管道的循环</li>
</ul>
<p><img alt="图片.png" src="https://upload-images.jianshu.io/upload_images/12713060-f53128c7458b7732.png?imageMogr2/auto-orient/strip%7CimageView2/2/w/1240"></p>
<h3 id="jenkins-2x-continuous-integration-cookbook3rd-2017pdf"><a href="https://itbooks.ctfile.com/fs/18113597-323355315">Jenkins 2.x Continuous Integration Cookbook(3rd …</a></h3>
<a class="readmore" href="/jenkins_books.html">read more</a>
</div><!-- /.entry-content -->
</article></li>
<li><article class="hentry">
<header>
<h1><a href="/merge_excel_rows.html" rel="bookmark"
title="Permalink to python数据分析工具pandas作业:合并excel重复行">python数据分析工具pandas作业:合并excel重复行</a></h1>
</header>
<div class="entry-content">
<footer class="post-info">
<abbr class="published" title="2018-12-06T07:20:00+08:00">
Published: 四 06 十二月 2018
</abbr>
<address class="vcard author">
By <a class="url fn" href="/author/andrew.html">andrew</a>
</address>
<p>In <a href="/category/python.html">python</a>.</p>
</footer><!-- /.post-info --> <ul>
<li><a href="https://china-testing.github.io/practices.html">python测试开发项目实战-目录</a></li>
<li><a href="https://china-testing.github.io/python_books.html">python工具书籍下载-持续更新</a></li>
<li><a href="https://china-testing.github.io/python3_quick.html">python 3.7极速入门教程 - 目录</a></li>
</ul>
<h3 id="pythonpandasexcel">python数据分析工具pandas作业:合并excel重复行</h3>
<p>工作中经常有些数据,从多个EXCEL表中汇总后,会出现同一项目多条记录的情况,需要合并这些对应的记录。</p>
<p>数据示例:</p>
<p>下图中,我们state和year能确定一个项目,但是有2条记录,我们需要把对应记录的pop值相加。</p>
<p><img alt="图片.png" src="https://upload-images.jianshu.io/upload_images/12713060-fb1ab91e4def81e7.png?imageMogr2/auto-orient/strip%7CimageView2/2/w/1240"></p>
<h3 id="_1">代码</h3>
<div class="highlight"><pre><span></span><span class="ch">#!/usr/bin/python3</span>
<span class="c1"># -*- coding: utf-8 -*-</span>
<span class="c1"># 技术支持:https://www.jianshu.com/u/69f40328d4f0 </span>
<span class="c1"># 技术支持 https://china-testing.github.io/merge_excel_rows.html</span>
<span class="c1"># https://github.com/china-testing/python-api-tesing/blob/master/practices/pandas/merge_excel_rows.py</span>
<span class="c1"># 项目实战讨论QQ群630011153 144081101 …</span></pre></div>
<a class="readmore" href="/merge_excel_rows.html">read more</a>
</div><!-- /.entry-content -->
</article></li>
<li><article class="hentry">
<header>
<h1><a href="/cv1.html" rel="bookmark"
title="Permalink to python opencv工具作业:使用tkinter展示边缘检测">python opencv工具作业:使用tkinter展示边缘检测</a></h1>
</header>
<div class="entry-content">
<footer class="post-info">
<abbr class="published" title="2018-12-04T07:00:00+08:00">
Published: 二 04 十二月 2018
</abbr>
<address class="vcard author">
By <a class="url fn" href="/author/andrew.html">andrew</a>
</address>
<p>In <a href="/category/python.html">python</a>.</p>
</footer><!-- /.post-info --> <p>pandas是一个功能强大的开源Python库,用于数据分析,处理和可视化,当前版本:0.23.4。用户在1000万左右,并成为Python数据科学工具包中的“必须使用”的工具。</p>
<p>许多数据科学家都向我提出过这样的问题:</p>
<p>pandas 可靠吗?</p>
<p>以后还会维护么?</p>
<p>为什么没有发布1.0版本!</p>
<p>版本号可用于表示产品的成熟度。但在开源世界中,版本号并不一定能告诉关于库的成熟度或可靠性的信息。 实际上 pandas既成熟又可靠!不过版本号传达了API的稳定性。</p>
<ul>
<li><a href="https://china-testing.github.io/practices.html">python测试开发项目实战-目录</a></li>
<li><a href="https://china-testing.github.io/python_books.html">python工具书籍下载-持续更新</a></li>
<li><a href="https://china-testing.github.io/python3_quick.html">python 3.7极速入门教程 - 目录</a></li>
</ul>
<h3 id="pandas-10">走向pandas 1.0</h3>
<ul>
<li>推荐使用方法链</li>
</ul>
<p>不使用方法链的例子:</p>
<div class="highlight"><pre><span></span><span class="kn">import</span> <span class="nn">pandas</span>
<span class="n">df</span> <span class="o">=</span> <span class="n">pandas</span><span class="o">.</span><span class="n">read_csv</span><span class="p">(</span><span class="s1">'data/titanic.csv.gz'</span><span class="p">)</span>
<span class="n">df</span> <span class="o">=</span> <span class="n">df</span><span class="p">[</span><span class="n">df</span><span class="o">.</span><span class="n">Age</span> <span class="o"><</span> <span class="n">df</span><span class="o">.</span><span class="n">Age …</span></pre></div>
<a class="readmore" href="/cv1.html">read more</a>
</div><!-- /.entry-content -->
</article></li>
<li><article class="hentry">
<header>
<h1><a href="/pil1.html" rel="bookmark"
title="Permalink to python图像处理pillow工具作业:合并拼接图片">python图像处理pillow工具作业:合并拼接图片</a></h1>
</header>
<div class="entry-content">
<footer class="post-info">
<abbr class="published" title="2018-12-03T19:25:00+08:00">
Published: 一 03 十二月 2018
</abbr>
<address class="vcard author">
By <a class="url fn" href="/author/andrew.html">andrew</a>
</address>
<p>In <a href="/category/python.html">python</a>.</p>
</footer><!-- /.post-info --> <ul>
<li><a href="https://china-testing.github.io/practices.html">python测试开发项目实战-目录</a></li>
<li><a href="https://china-testing.github.io/python_books.html">python工具书籍下载-持续更新</a></li>
<li><a href="https://china-testing.github.io/python3_quick.html">python 3.7极速入门教程 - 目录</a></li>
</ul>
<h3 id="pillow">pillow简介</h3>
<p>Python Imaging Library给Python解释器增加了图像处理能力。</p>
<p>该库提供了广泛的文件格式支持,高效的内部展现,以及十分强大的图像处理能力。</p>
<p>核心图像库专为以几种存储为基本像素格式数据的快速访问而设计。它为通用图像处理工具提供了坚实的基础。</p>
<p>我们来看看这个库的用途。</p>
<ul>
<li>图像存储</li>
</ul>
<p>PIL适合图像归档和图像批量处理,你可以使用它建立缩略图,转换格式,打印图片等。</p>
<p>现在的版本可以识别和读取大量的图片格式,写入常用的转换和表示格式。</p>
<ul>
<li>图像显示</li>
</ul>
<p>当前版本包含了Tk <a href="https://pillow.readthedocs.io/en/latest/reference/ImageTk.html#PIL.ImageTk.PhotoImage">PhotoImage</a>和<a href="https://pillow.readthedocs.io/en/latest/reference/ImageTk.html#PIL.ImageTk.BitmapImage">BitmapImage</a>接口, 以及<a href="https://pillow.readthedocs.io/en/latest/reference/ImageTk.html#PIL.ImageTk.BitmapImage">Windows DIB interface</a> ,可以在PythonWin和其他基于Windows的工具包中使用。许多其他GUI工具包带有某种类型的PIL支持。</p>
<p>为了方便调试还提供了show()方法,可以保存图像到磁盘并调用外显示。它将图像保存到磁盘,并调用外部显示工具。</p>
<ul>
<li>图像处理</li>
</ul>
<p>这个库包含了基本的图像处理功能,包括点操作,使用内置卷积内核过滤,色彩空间转换。</p>
<p>这个库还支持更改图像大小、旋转、任意仿射变换。</p>
<p>直方图方法允许你统计图像,这可以用于对比度增强和全局统计分析 …</p>
<a class="readmore" href="/pil1.html">read more</a>
</div><!-- /.entry-content -->
</article></li>
<li><article class="hentry">
<header>
<h1><a href="/python3_lib_pil.html" rel="bookmark"
title="Permalink to python库介绍-图像处理工具pillow中文文档-手册(2018 5.*)">python库介绍-图像处理工具pillow中文文档-手册(2018 5.*)</a></h1>
</header>
<div class="entry-content">
<footer class="post-info">
<abbr class="published" title="2018-12-03T19:20:00+08:00">
Published: 一 03 十二月 2018
</abbr>
<address class="vcard author">
By <a class="url fn" href="/author/andrew.html">andrew</a>
</address>
<p>In <a href="/category/python.html">python</a>.</p>
</footer><!-- /.post-info --> <ul>
<li><a href="https://china-testing.github.io/practices.html">python测试开发项目实战-目录</a></li>
<li><a href="https://china-testing.github.io/python_books.html">python工具书籍下载-持续更新</a></li>
<li><a href="https://china-testing.github.io/python3_quick.html">python 3.7极速入门教程 - 目录</a></li>
</ul>
<h2 id="_1">概述</h2>
<p>Python Imaging Library给Python解释器增加了图像处理能力。</p>
<p>该库提供了广泛的文件格式支持,高效的内部展现,以及十分强大的图像处理能力。</p>
<p>核心图像库专为以几种存储为基本像素格式数据的快速访问而设计。它为通用图像处理工具提供了坚实的基础。</p>
<p>我们来看看这个库的用途。</p>
<ul>
<li>图像存储</li>
</ul>
<p>PIL适合图像归档和图像批量处理,你可以使用它建立缩略图,转换格式,打印图片等。</p>
<p>现在的版本可以识别和读取大量的图片格式,写入常用的转换和表示格式。</p>
<ul>
<li>图像显示</li>
</ul>
<p>当前版本包含了Tk <a href="https://pillow.readthedocs.io/en/latest/reference/ImageTk.html#PIL.ImageTk.PhotoImage">PhotoImage</a>和<a href="https://pillow.readthedocs.io/en/latest/reference/ImageTk.html#PIL.ImageTk.BitmapImage">BitmapImage</a>接口, 以及<a href="https://pillow.readthedocs.io/en/latest/reference/ImageTk.html#PIL.ImageTk.BitmapImage">Windows DIB interface</a> ,可以在PythonWin和其他基于Windows的工具包中使用。许多其他GUI工具包带有某种类型的PIL支持。</p>
<p>为了方便调试还提供了show()方法,可以保存图像到磁盘并调用外显示。它将图像保存到磁盘,并调用外部显示工具。</p>
<ul>
<li>图像处理</li>
</ul>
<p>这个库包含了基本的图像处理功能,包括点操作,使用内置卷积内核过滤,色彩空间转换。</p>
<p>这个库还支持更改图像大小、旋转、任意仿射变换。</p>
<p>直方图方法允许你统计图像,这可以用于对比度增强和全局统计分析 …</p>
<a class="readmore" href="/python3_lib_pil.html">read more</a>
</div><!-- /.entry-content -->
</article></li>
<li><article class="hentry">
<header>
<h1><a href="/network_traceroute.html" rel="bookmark"
title="Permalink to python网络作业:使用python的socket库实现ICMP协议的traceroute">python网络作业:使用python的socket库实现ICMP协议的traceroute</a></h1>
</header>
<div class="entry-content">
<footer class="post-info">
<abbr class="published" title="2018-12-01T07:25:00+08:00">
Published: 六 01 十二月 2018
</abbr>
<address class="vcard author">
By <a class="url fn" href="/author/andrew.html">andrew</a>
</address>
<p>In <a href="/category/python.html">python</a>.</p>
</footer><!-- /.post-info --> <p><a href="https://china-testing.github.io/practices.html">python测试开发项目实战-目录</a></p>
<p>直接上代码:</p>
<div class="highlight"><pre><span></span><span class="ch">#!/usr/bin/python3</span>
<span class="c1"># -*- coding: utf-8 -*-</span>
<span class="c1"># 技术支持:https://www.jianshu.com/u/69f40328d4f0 </span>
<span class="c1"># 技术支持 https://china-testing.github.io/</span>
<span class="c1"># https://github.com/china-testing/python-api-tesing/blob/master/practices/traceroute.py</span>
<span class="c1"># 项目实战讨论QQ群630011153 144081101</span>
<span class="c1"># CreateDate: 2018-11-26</span>
<span class="kn">import</span> <span class="nn">socket</span>
<span class="kn">import</span> <span class="nn">io</span>
<span class="kn">import</span> <span class="nn">struct</span>
<span class="kn">import</span> <span class="nn">sys</span>
<span class="k">class</span> <span class="nc">flushfile</span><span class="p">(</span><span class="n">io</span><span class="o">.</span><span class="n">FileIO</span><span class="p">):</span>
<span class="k">def</span> <span class="fm">__init__</span><span class="p">(</span><span class="bp">self</span><span class="p">,</span> <span class="n">f</span><span class="p">):</span>
<span class="bp">self …</span></pre></div>
<a class="readmore" href="/network_traceroute.html">read more</a>
</div><!-- /.entry-content -->
</article></li>
<li><article class="hentry">
<header>
<h1><a href="/pygame_house.html" rel="bookmark"
title="Permalink to python绘图作业:使用pygame库画房子">python绘图作业:使用pygame库画房子</a></h1>
</header>
<div class="entry-content">
<footer class="post-info">
<abbr class="published" title="2018-11-30T08:25:00+08:00">
Published: 五 30 十一月 2018
</abbr>
<address class="vcard author">
By <a class="url fn" href="/author/andrew.html">andrew</a>
</address>
<p>In <a href="/category/python.html">python</a>.</p>
</footer><!-- /.post-info --> <ul>
<li><a href="https://china-testing.github.io/practices.html">python测试开发项目实战-目录</a></li>
<li><a href="https://china-testing.github.io/python_books.html">python工具书籍下载-持续更新</a></li>
</ul>
<h3 id="pygame">使用pygame库画如下房子</h3>
<p><img alt="图片.png" src="https://upload-images.jianshu.io/upload_images/12713060-6ee6370cd104bf46.png?imageMogr2/auto-orient/strip%7CimageView2/2/w/1240"></p>
<h3 id="_1">参考资料</h3>
<ul>
<li><a href="https://china-testing.github.io/pygame_house.html">本文最新版本地址</a></li>
<li><a href="https://github.com/china-testing/python-api-tesing">本文涉及的python测试开发库</a> 谢谢点赞!</li>
<li><a href="https://github.com/china-testing/python-api-tesing/blob/master/books.md">本文相关海量书籍下载</a> </li>
</ul>
<h3 id="_2">代码</h3>
<div class="highlight"><pre><span></span><span class="ch">#!/usr/bin/python3</span>
<span class="c1"># -*- coding: utf-8 -*-</span>
<span class="c1"># 技术支持:https://www.jianshu.com/u/69f40328d4f0 </span>
<span class="c1"># 技术支持 https://china-testing.github.io/</span>
<span class="c1"># https://github.com/china-testing/python-api-tesing/blob/master/practices/pygame_house.py</span>
<span class="c1"># 项目实战讨论QQ群630011153 144081101</span>
<span class="c1"># CreateDate: 2018-12-01</span>
<span class="kn">import</span> <span class="nn">pygame</span>
<span class="n">pygame</span><span class="o">.</span><span class="n">init</span><span class="p">()</span>
<span class="n">screen</span> <span class="o">=</span> <span class="n">pygame</span><span class="o">.</span><span class="n">display</span><span class="o">.</span><span class="n">set_mode</span><span class="p">((</span><span class="mi">640</span><span class="p">,</span><span class="mi">480 …</span></pre></div>
<a class="readmore" href="/pygame_house.html">read more</a>
</div><!-- /.entry-content -->
</article></li>
<li><article class="hentry">
<header>
<h1><a href="/flask_api.html" rel="bookmark"
title="Permalink to 使用python3和flask构建RESTful API(接口测试服务与mockserver工具)">使用python3和flask构建RESTful API(接口测试服务与mockserver工具)</a></h1>
</header>
<div class="entry-content">
<footer class="post-info">
<abbr class="published" title="2018-11-30T08:20:00+08:00">
Published: 五 30 十一月 2018
</abbr>
<address class="vcard author">
By <a class="url fn" href="/author/andrew.html">andrew</a>
</address>
<p>In <a href="/category/ce-shi-kuang-jia.html">测试框架</a>.</p>
</footer><!-- /.post-info --> <ul>
<li><a href="https://china-testing.github.io/practices.html">python测试开发项目实战-目录</a></li>
<li><a href="https://china-testing.github.io/flask_books.html">web开发工具flask中文英文书籍下载-持续更新</a></li>
</ul>
<h2 id="_1">引言</h2>
<p>构建RESTful API貌似是开发的工作,和测试有和关系?</p>
<p>其实测试开发需要构建RESTful API的场景很多。比如测试Android应用,一般的接口测试只考虑了服务器端,至于客户端在网络异常或者服务端异常时如何反应,多数天朝的测试人员是没有考虑到的。客户端在对这些异常处理不够充分的时候,会出现崩溃等各种莫名其妙的问题。</p>
<p>为此一些走在前沿的测试人员会自己写一些RESTful API, 把服务端的域名劫持到自己的API,故意返回各种异常,看客户端的稳定性。</p>
<p>另外测试开发的测试工具需要和其他系统对接等场景也经常需要API。</p>
<h2 id="_2">参考资料</h2>
<ul>
<li><a href="https://www.codementor.io/dongido/how-to-build-restful-apis-with-python-and-flask-fh5x7zjrx">How to Build RESTful APIs with Python and Flask</a></li>
<li><a href="https://china-testing.github.io/flask_api.html">本文地址</a></li>
<li><a href="https://github.com/china-testing/python-api-tesing/tree/master/flask/api_demo">本文源码地址</a></li>
<li><a href="https://github.com/china-testing/python-api-tesing">本文涉及的python测试开发库</a> 谢谢点赞!</li>
<li><a href="https://github.com/china-testing/python-api-tesing/blob/master/books.md">本文相关书籍下载</a></li>
</ul>
<h2 id="_3">术语</h2>
<p>REST: REpresentational State Transfer</p>
<h2 id="_4">目标</h2>
<ul>
<li>
<p>GET - /api/Category - Retrieve all categories</p>
</li>
<li>
<p>POST - /api/Category …</p></li></ul>
<a class="readmore" href="/flask_api.html">read more</a>
</div><!-- /.entry-content -->
</article></li>
<li><article class="hentry">
<header>
<h1><a href="/multi_md5.html" rel="bookmark"
title="Permalink to MD5值重复文件多进程检查工具check_md5.py - 性能测试工具开发">MD5值重复文件多进程检查工具check_md5.py - 性能测试工具开发</a></h1>
</header>
<div class="entry-content">
<footer class="post-info">
<abbr class="published" title="2018-11-30T07:55:00+08:00">
Published: 五 30 十一月 2018
</abbr>
<address class="vcard author">
By <a class="url fn" href="/author/andrew.html">andrew</a>
</address>
<p>In <a href="/category/python.html">python</a>.</p>
</footer><!-- /.post-info --> <p><a href="https://china-testing.github.io/practices.html">python测试开发项目实战-目录</a></p>
<h2 id="md5">MD5简介</h2>
<p>Message Digest Algorithm MD5(中文名为<a href="https://baike.so.com/doc/6941562-7163923.html">消息摘要算法</a>第五版)为计算机安全领域广泛使用的一种散列函数,用以提供消息的完整性保护。该算法的文件号为RFC 1321(R.Rivest,MIT Laboratory for Computer Science and RSA Data Security Inc. April 1992)。</p>
<p><strong>MD5</strong>即Message-Digest Algorithm 5(信息-摘要算法5),用于确保信息传输完整一致。是计算机广泛使用的杂凑算法之一(又译摘要算法、<a href="https://baike.so.com/doc/6902798-7123502.html">哈希算法</a>),主流编程语言普遍已有MD5实现。将数据(如汉字)运算为另一固定长度值,是杂凑算法的基础原理,MD5的前身有MD2、<a href="https://baike.so.com/doc/2380309-2516809.html">MD3</a>和MD4。</p>
<p>MD5算法具有以下特点:</p>
<p>1、压缩性:任意长度的数据,算出的MD5值长度都是固定的。</p>
<p>2 …</p>
<a class="readmore" href="/multi_md5.html">read more</a>
</div><!-- /.entry-content -->
</article></li>
</ol><!-- /#posts-list -->
<p class="paginator">
<a href="/index4.html">«</a>
Page 5 / 21
<a href="/index6.html">»</a>
</p>
</section><!-- /#content -->
<section id="extras" class="body">
<div class="blogroll">
<h2>links</h2>
<ul>
<li><a href="https://china-testing.github.io/testing_training.html">自动化性能接口测试线上及深圳培训与项目实战 qq群:144081101 591302926</a></li>
<li><a href="http://blog.sciencenet.cn/blog-2604609-1112306.html">pandas数据分析scrapy爬虫 521070358 Py人工智能pandas-opencv 6089740</a></li>
<li><a href="http://blog.sciencenet.cn/blog-2604609-1112306.html">中医解梦看相八字算命qq群 391441566 csdn书籍下载-python爬虫 437355848</a></li>
</ul>
</div><!-- /.blogroll -->
</section><!-- /#extras -->
<footer id="contentinfo" class="body">
<address id="about" class="vcard body">
Proudly powered by <a href="http://getpelican.com/">Pelican</a>, which takes great advantage of <a href="http://python.org">Python</a>.
</address><!-- /#about -->
<p>The theme is by <a href="http://coding.smashingmagazine.com/2009/08/04/designing-a-html-5-layout-from-scratch/">Smashing Magazine</a>, thanks!</p>
</footer><!-- /#contentinfo -->
</body>
</html>