-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathindex.html
1676 lines (1239 loc) · 69.8 KB
/
index.html
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
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
<!DOCTYPE html><html lang="zh-CN"><head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=2">
<meta name="theme-color" content="#222">
<meta name="generator" content="Hexo 5.4.2">
<link rel="apple-touch-icon" sizes="180x180" href="/images/apple-touch-icon.png">
<link rel="icon" type="image/png" sizes="32x32" href="/images/favicon-32x32.png">
<link rel="icon" type="image/png" sizes="16x16" href="/images/favicon-16x16.png">
<link rel="mask-icon" href="/images/safari-pinned-tab.svg" color="#222">
<link rel="manifest" href="/images/site.webmanifest">
<meta name="msapplication-config" content="/images/mstile-150x150.png">
<meta name="google-site-verification" content="Vb0EkkfGHD4yjSK3hHo9zSszfnkbr8wPpPDCVVtvxDg">
<meta name="msvalidate.01" content="BB5484EDD5B0CB57C647B2184772CBDC">
<meta name="baidu-site-verification" content="aYgTqx38cK">
<link rel="stylesheet" href="/css/main.css">
<link rel="stylesheet" href="/lib/font-awesome/css/all.min.css">
<link rel="stylesheet" href="/lib/pace/pace-theme-minimal.min.css">
<script id="hexo-configurations">
var NexT = window.NexT || {};
var CONFIG = {"hostname":"stornado.github.io","root":"/","scheme":"Gemini","version":"7.8.0","exturl":false,"sidebar":{"position":"left","display":"post","padding":18,"offset":12,"onmobile":false},"copycode":{"enable":true,"show_result":true,"style":null},"back2top":{"enable":true,"sidebar":true,"scrollpercent":true},"bookmark":{"enable":true,"color":"#222","save":"auto"},"fancybox":false,"mediumzoom":false,"lazyload":false,"pangu":false,"comments":{"style":"tabs","active":"gitalk","storage":true,"lazyload":true,"nav":null,"activeClass":"gitalk"},"algolia":{"hits":{"per_page":10},"labels":{"input_placeholder":"Search for Posts","hits_empty":"We didn't find any results for the search: ${query}","hits_stats":"${hits} results found in ${time} ms"}},"localsearch":{"enable":true,"trigger":"auto","top_n_per_article":3,"unescape":false,"preload":false},"motion":{"enable":true,"async":true,"transition":{"post_block":"fadeIn","post_header":"slideDownIn","post_body":"slideDownIn","coll_header":"slideLeftIn","sidebar":"slideUpIn"}},"path":"search.xml"};
</script>
<meta property="og:type" content="website">
<meta property="og:title" content="仲夏叶 | Stornado">
<meta property="og:url" content="https://stornado.github.io/index.html">
<meta property="og:site_name" content="仲夏叶 | Stornado">
<meta property="og:locale" content="zh_CN">
<meta property="article:author" content="仲夏叶">
<meta name="twitter:card" content="summary">
<link rel="canonical" href="https://stornado.github.io/">
<script id="page-configurations">
// https://hexo.io/docs/variables.html
CONFIG.page = {
sidebar: "",
isHome : true,
isPost : false,
lang : 'zh-CN'
};
</script>
<title>仲夏叶 | Stornado</title>
<script data-pjax="">
var _hmt = _hmt || [];
(function() {
var hm = document.createElement("script");
hm.src = "https://hm.baidu.com/hm.js?e1d846feb2f251f98b0482d1f5fd6a4e";
var s = document.getElementsByTagName("script")[0];
s.parentNode.insertBefore(hm, s);
})();
</script>
<noscript>
<style>
.use-motion .brand,
.use-motion .menu-item,
.sidebar-inner,
.use-motion .post-block,
.use-motion .pagination,
.use-motion .comments,
.use-motion .post-header,
.use-motion .post-body,
.use-motion .collection-header { opacity: initial; }
.use-motion .site-title,
.use-motion .site-subtitle {
opacity: initial;
top: initial;
}
.use-motion .logo-line-before i { left: initial; }
.use-motion .logo-line-after i { right: initial; }
</style>
</noscript>
</head>
<body itemscope="" itemtype="http://schema.org/WebPage">
<div class="container use-motion">
<div class="headband"></div>
<header class="header" itemscope="" itemtype="http://schema.org/WPHeader">
<div class="header-inner"><div class="site-brand-container">
<div class="site-nav-toggle">
<div class="toggle" aria-label="切换导航栏">
<span class="toggle-line toggle-line-first"></span>
<span class="toggle-line toggle-line-middle"></span>
<span class="toggle-line toggle-line-last"></span>
</div>
</div>
<div class="site-meta">
<a href="/" class="brand" rel="start">
<span class="logo-line-before"><i></i></span>
<h1 class="site-title">仲夏叶 | Stornado</h1>
<span class="logo-line-after"><i></i></span>
</a>
<p class="site-subtitle" itemprop="description">生命就是用求知的欲望燃烧自己</p>
</div>
<div class="site-nav-right">
<div class="toggle popup-trigger">
<i class="fa fa-search fa-fw fa-lg"></i>
</div>
</div>
</div>
<nav class="site-nav">
<ul id="menu" class="main-menu menu">
<li class="menu-item menu-item-home">
<a href="/" rel="section"><i class="fa fa-home fa-fw"></i>首页</a>
</li>
<li class="menu-item menu-item-archives">
<a href="/archives/" rel="section"><i class="fa fa-archive fa-fw"></i>归档<span class="badge">28</span></a>
</li>
<li class="menu-item menu-item-tags">
<a href="/tags/" rel="section"><i class="fa fa-tags fa-fw"></i>标签<span class="badge">31</span></a>
</li>
<li class="menu-item menu-item-categories">
<a href="/categories/" rel="section"><i class="fa fa-th fa-fw"></i>分类<span class="badge">15</span></a>
</li>
<li class="menu-item menu-item-search">
<a role="button" class="popup-trigger"><i class="fa fa-search fa-fw"></i>搜索
</a>
</li>
</ul>
</nav>
<div class="search-pop-overlay">
<div class="popup search-popup">
<div class="search-header">
<span class="search-icon">
<i class="fa fa-search"></i>
</span>
<div class="search-input-container">
<input autocomplete="off" autocapitalize="off" placeholder="搜索..." spellcheck="false" type="search" class="search-input">
</div>
<span class="popup-btn-close">
<i class="fa fa-times-circle"></i>
</span>
</div>
<div id="search-result">
<div id="no-result">
<i class="fa fa-spinner fa-pulse fa-5x fa-fw"></i>
</div>
</div>
</div>
</div>
</div>
</header>
<div class="reading-progress-bar"></div>
<a role="button" class="book-mark-link book-mark-link-fixed"></a>
<a href="https://github.com/stornado" class="github-corner" title="Follow me on GitHub" aria-label="Follow me on GitHub" rel="noopener" target="_blank"><svg width="80" height="80" viewBox="0 0 250 250" aria-hidden="true"><path d="M0,0 L115,115 L130,115 L142,142 L250,250 L250,0 Z"></path><path d="M128.3,109.0 C113.8,99.7 119.0,89.6 119.0,89.6 C122.0,82.7 120.5,78.6 120.5,78.6 C119.2,72.0 123.4,76.3 123.4,76.3 C127.3,80.9 125.5,87.3 125.5,87.3 C122.9,97.6 130.6,101.9 134.4,103.2" fill="currentColor" style="transform-origin: 130px 106px;" class="octo-arm"></path><path d="M115.0,115.0 C114.9,115.1 118.7,116.5 119.8,115.4 L133.7,101.6 C136.9,99.2 139.9,98.4 142.2,98.6 C133.8,88.0 127.5,74.4 143.8,58.0 C148.5,53.4 154.0,51.2 159.7,51.0 C160.3,49.4 163.2,43.6 171.4,40.1 C171.4,40.1 176.1,42.5 178.8,56.2 C183.1,58.6 187.2,61.8 190.9,65.4 C194.5,69.0 197.7,73.2 200.1,77.6 C213.8,80.2 216.3,84.9 216.3,84.9 C212.7,93.1 206.9,96.0 205.4,96.6 C205.1,102.4 203.0,107.8 198.3,112.5 C181.9,128.9 168.3,122.5 157.7,114.1 C157.9,116.9 156.7,120.9 152.7,124.9 L141.0,136.5 C139.8,137.7 141.6,141.9 141.8,141.8 Z" fill="currentColor" class="octo-body"></path></svg></a>
<main class="main">
<div class="main-inner">
<div class="content-wrap">
<div class="content index posts-expand">
<article itemscope="" itemtype="http://schema.org/Article" class="post-block" lang="zh-CN">
<link itemprop="mainEntityOfPage" href="https://stornado.github.io/2020/12/21/common-system-and-software-testing-pitfalls/">
<span hidden="" itemprop="author" itemscope="" itemtype="http://schema.org/Person">
<meta itemprop="image" content="/images/avatar.jpg">
<meta itemprop="name" content="仲夏叶">
<meta itemprop="description" content="">
</span>
<span hidden="" itemprop="publisher" itemscope="" itemtype="http://schema.org/Organization">
<meta itemprop="name" content="仲夏叶 | Stornado">
</span>
<header class="post-header">
<h2 class="post-title" itemprop="name headline">
<a href="/2020/12/21/common-system-and-software-testing-pitfalls/" class="post-title-link" itemprop="url">测试陷阱分类</a>
</h2>
<div class="post-meta">
<span class="post-meta-item">
<span class="post-meta-item-icon">
<i class="far fa-calendar"></i>
</span>
<span class="post-meta-item-text">发表于</span>
<time title="创建时间:2020-12-21 09:39:52" itemprop="dateCreated datePublished" datetime="2020-12-21T09:39:52+08:00">2020-12-21</time>
</span>
<span class="post-meta-item">
<span class="post-meta-item-icon">
<i class="far fa-calendar-check"></i>
</span>
<span class="post-meta-item-text">更新于</span>
<time title="修改时间:2022-08-04 14:23:25" itemprop="dateModified" datetime="2022-08-04T14:23:25+08:00">2022-08-04</time>
</span>
<span class="post-meta-item">
<span class="post-meta-item-icon">
<i class="far fa-folder"></i>
</span>
<span class="post-meta-item-text">分类于</span>
<span itemprop="about" itemscope="" itemtype="http://schema.org/Thing">
<a href="/categories/testing/" itemprop="url" rel="index"><span itemprop="name">testing</span></a>
</span>
</span>
<br>
<span class="post-meta-item" title="本文字数">
<span class="post-meta-item-icon">
<i class="far fa-file-word"></i>
</span>
<span class="post-meta-item-text">本文字数:</span>
<span>1.9k</span>
</span>
<span class="post-meta-item" title="阅读时长">
<span class="post-meta-item-icon">
<i class="far fa-clock"></i>
</span>
<span class="post-meta-item-text">阅读时长 ≈</span>
<span>2 分钟</span>
</span>
</div>
</header>
<div class="post-body" itemprop="articleBody">
<h2 id="什么是测试陷阱">什么是测试陷阱</h2>
<p>测试陷阱是指不必要的并且可能意外导致测试不那么有效,高效或者更令人沮丧的表现的决策、思维、行为或不作为。基本上,测试陷阱是一个经常发生的搞砸测试的方式,当测试人员、管理人员、需求工程师和其他测试利益相关者犯了测试相关的错误,并由此产生意想不到的负面后果时,项目就陷入了测试陷阱。</p>
<p>从某种意义上说,测试陷阱的描述构成了测试反模式。然而,术语“陷阱”是专门选择,为那些粗心大意或外行的人唤起隐蔽或不易识别的陷阱的形象。与任何陷阱一样,最好是避免测试陷阱,而不是陷入陷阱后将自己和项目挖出来。</p>
<!--noindex-->
<div class="post-button">
<a class="btn" href="/2020/12/21/common-system-and-software-testing-pitfalls/#more" rel="contents">
阅读全文 »
</a>
</div>
<!--/noindex-->
</div>
<footer class="post-footer">
<div class="post-eof"></div>
</footer>
</article>
<article itemscope="" itemtype="http://schema.org/Article" class="post-block" lang="zh-CN">
<link itemprop="mainEntityOfPage" href="https://stornado.github.io/2020/08/26/mockserver-intro/">
<span hidden="" itemprop="author" itemscope="" itemtype="http://schema.org/Person">
<meta itemprop="image" content="/images/avatar.jpg">
<meta itemprop="name" content="仲夏叶">
<meta itemprop="description" content="">
</span>
<span hidden="" itemprop="publisher" itemscope="" itemtype="http://schema.org/Organization">
<meta itemprop="name" content="仲夏叶 | Stornado">
</span>
<header class="post-header">
<h2 class="post-title" itemprop="name headline">
<a href="/2020/08/26/mockserver-intro/" class="post-title-link" itemprop="url">MockServer 简介</a>
</h2>
<div class="post-meta">
<span class="post-meta-item">
<span class="post-meta-item-icon">
<i class="far fa-calendar"></i>
</span>
<span class="post-meta-item-text">发表于</span>
<time title="创建时间:2020-08-26 14:51:05" itemprop="dateCreated datePublished" datetime="2020-08-26T14:51:05+08:00">2020-08-26</time>
</span>
<span class="post-meta-item">
<span class="post-meta-item-icon">
<i class="far fa-calendar-check"></i>
</span>
<span class="post-meta-item-text">更新于</span>
<time title="修改时间:2022-08-04 14:23:25" itemprop="dateModified" datetime="2022-08-04T14:23:25+08:00">2022-08-04</time>
</span>
<span class="post-meta-item">
<span class="post-meta-item-icon">
<i class="far fa-folder"></i>
</span>
<span class="post-meta-item-text">分类于</span>
<span itemprop="about" itemscope="" itemtype="http://schema.org/Thing">
<a href="/categories/testing/" itemprop="url" rel="index"><span itemprop="name">testing</span></a>
</span>
,
<span itemprop="about" itemscope="" itemtype="http://schema.org/Thing">
<a href="/categories/testing/mockserver/" itemprop="url" rel="index"><span itemprop="name">mockserver</span></a>
</span>
</span>
<br>
<span class="post-meta-item" title="本文字数">
<span class="post-meta-item-icon">
<i class="far fa-file-word"></i>
</span>
<span class="post-meta-item-text">本文字数:</span>
<span>9k</span>
</span>
<span class="post-meta-item" title="阅读时长">
<span class="post-meta-item-icon">
<i class="far fa-clock"></i>
</span>
<span class="post-meta-item-text">阅读时长 ≈</span>
<span>8 分钟</span>
</span>
</div>
</header>
<div class="post-body" itemprop="articleBody">
<h2 id="mockserver简介">MockServer简介</h2>
<p>服务端测试中,被测服务通常依赖于一系列的外部模块,被测服务与外部模块间通过REST
API调用来进行通信。要对被测服务进行系统测试,一般做法是,部署好所有外部依赖模块,由被测服务直接调用。然而有时被调用模块尚未开发完成,或者调用返回不好构造,这将影响被测系统的测试进度。为此我们需要开发桩模块,用来模拟被调用模块的行为。最简单的方式是,对于每个外部模块依赖,都创建一套桩模块。然而这样的话,桩模块服务将非常零散,不便于管理。Mock
Server为解决这些问题而生,其提供配置request及相应response方式来实现通用桩服务。本文将专门针对REST
API来进行介绍Mock Server的整体结构及应用案例。</p>
<p><img src="/2020/08/26/mockserver-intro/311516-20170912180553860-879452344.png" class=""></p>
<h3 id="mockserver支持能力">MockServer支持能力</h3>
<h4 id="返回模拟响应">1. 返回“模拟”响应</h4>
<p><img src="/2020/08/26/mockserver-intro/expectation_response_action.png" class="" title="Title:Response Action Expectation"></p>
<h4 id="执行回调动态创建响应">2. 执行回调,动态创建响应</h4>
<p><img src="/2020/08/26/mockserver-intro/expectation_callback_action.png" class="" title="Title:Callback Action Expectation"></p>
<h4 id="返回异常或无效响应">3. 返回异常或无效响应</h4>
<p><img src="/2020/08/26/mockserver-intro/expectation_error_action.png" class="" title="Title:Error Action Expectation"></p>
<!--noindex-->
<div class="post-button">
<a class="btn" href="/2020/08/26/mockserver-intro/#more" rel="contents">
阅读全文 »
</a>
</div>
<!--/noindex-->
</div>
<footer class="post-footer">
<div class="post-eof"></div>
</footer>
</article>
<article itemscope="" itemtype="http://schema.org/Article" class="post-block" lang="zh-CN">
<link itemprop="mainEntityOfPage" href="https://stornado.github.io/2020/07/30/mockserver/">
<span hidden="" itemprop="author" itemscope="" itemtype="http://schema.org/Person">
<meta itemprop="image" content="/images/avatar.jpg">
<meta itemprop="name" content="仲夏叶">
<meta itemprop="description" content="">
</span>
<span hidden="" itemprop="publisher" itemscope="" itemtype="http://schema.org/Organization">
<meta itemprop="name" content="仲夏叶 | Stornado">
</span>
<header class="post-header">
<h2 class="post-title" itemprop="name headline">
<a href="/2020/07/30/mockserver/" class="post-title-link" itemprop="url">MockServer 介绍</a>
</h2>
<div class="post-meta">
<span class="post-meta-item">
<span class="post-meta-item-icon">
<i class="far fa-calendar"></i>
</span>
<span class="post-meta-item-text">发表于</span>
<time title="创建时间:2020-07-30 09:52:16" itemprop="dateCreated datePublished" datetime="2020-07-30T09:52:16+08:00">2020-07-30</time>
</span>
<span class="post-meta-item">
<span class="post-meta-item-icon">
<i class="far fa-calendar-check"></i>
</span>
<span class="post-meta-item-text">更新于</span>
<time title="修改时间:2022-08-04 14:23:25" itemprop="dateModified" datetime="2022-08-04T14:23:25+08:00">2022-08-04</time>
</span>
<span class="post-meta-item">
<span class="post-meta-item-icon">
<i class="far fa-folder"></i>
</span>
<span class="post-meta-item-text">分类于</span>
<span itemprop="about" itemscope="" itemtype="http://schema.org/Thing">
<a href="/categories/testing/" itemprop="url" rel="index"><span itemprop="name">testing</span></a>
</span>
,
<span itemprop="about" itemscope="" itemtype="http://schema.org/Thing">
<a href="/categories/testing/mockserver/" itemprop="url" rel="index"><span itemprop="name">mockserver</span></a>
</span>
</span>
<br>
<span class="post-meta-item" title="本文字数">
<span class="post-meta-item-icon">
<i class="far fa-file-word"></i>
</span>
<span class="post-meta-item-text">本文字数:</span>
<span>6.2k</span>
</span>
<span class="post-meta-item" title="阅读时长">
<span class="post-meta-item-icon">
<i class="far fa-clock"></i>
</span>
<span class="post-meta-item-text">阅读时长 ≈</span>
<span>6 分钟</span>
</span>
</div>
</header>
<div class="post-body" itemprop="articleBody">
<h1 id="mockserver">MockServer</h1>
<p>Easy mocking of any system you integrate with via HTTP or HTTPS</p>
<h2 id="what-is-mockserver"><a target="_blank" rel="noopener" href="https://www.mock-server.com/#what_is_mockserver">What is
MockServer</a></h2>
<p>For any system you integrate with via HTTP or HTTPS MockServer can be
used as:</p>
<ul>
<li>a <a target="_blank" rel="noopener" href="https://www.mock-server.com/mock_server/getting_started.html">mock</a>
configured to return specific responses for different requests</li>
<li>a <a target="_blank" rel="noopener" href="https://www.mock-server.com/proxy/getting_started.html">proxy</a>
recording and optionally modifying requests and responses</li>
<li>both a <a target="_blank" rel="noopener" href="https://www.mock-server.com/proxy/getting_started.html">proxy</a>
for some requests and a <a target="_blank" rel="noopener" href="https://www.mock-server.com/mock_server/getting_started.html">mock</a>
for other requests at the same time</li>
</ul>
<p>When MockServer receives a request it matches the request against
active <strong>expectations</strong> that have been configured, if no
matches are found it proxies the request if appropriate otherwise a 404
is returned.</p>
<p>For each request received the following steps happen:</p>
<ol type="1">
<li>find matching expectation and perform action</li>
<li>if no matching expectation proxy request</li>
<li>if not a proxy request return 404</li>
</ol>
<p>An <strong>expectation</strong> defines the <strong>action</strong>
that is taken, for example, a response could be returned.</p>
<!--noindex-->
<div class="post-button">
<a class="btn" href="/2020/07/30/mockserver/#more" rel="contents">
阅读全文 »
</a>
</div>
<!--/noindex-->
</div>
<footer class="post-footer">
<div class="post-eof"></div>
</footer>
</article>
<article itemscope="" itemtype="http://schema.org/Article" class="post-block" lang="zh-CN">
<link itemprop="mainEntityOfPage" href="https://stornado.github.io/2020/07/01/think-like-a-tester/">
<span hidden="" itemprop="author" itemscope="" itemtype="http://schema.org/Person">
<meta itemprop="image" content="/images/avatar.jpg">
<meta itemprop="name" content="仲夏叶">
<meta itemprop="description" content="">
</span>
<span hidden="" itemprop="publisher" itemscope="" itemtype="http://schema.org/Organization">
<meta itemprop="name" content="仲夏叶 | Stornado">
</span>
<header class="post-header">
<h2 class="post-title" itemprop="name headline">
<a href="/2020/07/01/think-like-a-tester/" class="post-title-link" itemprop="url">按测试员的方式思考</a>
</h2>
<div class="post-meta">
<span class="post-meta-item">
<span class="post-meta-item-icon">
<i class="far fa-calendar"></i>
</span>
<span class="post-meta-item-text">发表于</span>
<time title="创建时间:2020-07-01 16:32:58" itemprop="dateCreated datePublished" datetime="2020-07-01T16:32:58+08:00">2020-07-01</time>
</span>
<span class="post-meta-item">
<span class="post-meta-item-icon">
<i class="far fa-calendar-check"></i>
</span>
<span class="post-meta-item-text">更新于</span>
<time title="修改时间:2022-08-04 14:23:25" itemprop="dateModified" datetime="2022-08-04T14:23:25+08:00">2022-08-04</time>
</span>
<span class="post-meta-item">
<span class="post-meta-item-icon">
<i class="far fa-folder"></i>
</span>
<span class="post-meta-item-text">分类于</span>
<span itemprop="about" itemscope="" itemtype="http://schema.org/Thing">
<a href="/categories/testing/" itemprop="url" rel="index"><span itemprop="name">testing</span></a>
</span>
</span>
<br>
<span class="post-meta-item" title="本文字数">
<span class="post-meta-item-icon">
<i class="far fa-file-word"></i>
</span>
<span class="post-meta-item-text">本文字数:</span>
<span>5.8k</span>
</span>
<span class="post-meta-item" title="阅读时长">
<span class="post-meta-item-icon">
<i class="far fa-clock"></i>
</span>
<span class="post-meta-item-text">阅读时长 ≈</span>
<span>5 分钟</span>
</span>
</div>
</header>
<div class="post-body" itemprop="articleBody">
<p>测试员有很多不同的背景,测试团队是多元化的集体,但是大多数人都同意:测试员的思考方式是不同的。怎么不同?有人说测试员是“消极”思维者。测试员会抱怨这种说法,认为自己喜欢征服,他们在报告坏消息时有一种特别的兴奋感。这是一种普遍观点。我们提出另一种观点。测试员并不抱怨,他们提供的是证据。测试员并不喜欢征服,他们喜欢打破产品没有问题的幻觉。测试员并不喜欢发布坏消息,他们喜欢把客户从虚假信念中解放出来。我们的观点是,按测试员的方式思考意味着实践认识论。测试运用的是认识论,不是靠傲慢或谦卑。</p>
<h2 id="测试运用的是认识论">测试运用的是认识论</h2>
<p>认识论研究如何认识所了解的东西:研究证据和推理。这是科学实践的基础。研究认识论的人有科学家、教育家和哲学家,当然还有精英级的软件测试员。学习认识论的学生研究科学、哲学和心理学,目标是了解怎样才能改进我们的思维。我们使用的术语比经典定义要宽,以便能够更多地利用批判性思维的最新成果。将认识论运用于软件测试,要问与以下类似的问题:</p>
<ul>
<li>怎么知道软件足够好?</li>
<li>如果软件并不是足够好,怎样才能知道?</li>
<li>怎么知道已经完成了足够的测试?</li>
</ul>
<h2 id="研究认识论有助于更好测试">研究认识论有助于更好测试</h2>
<p>直接与软件测试有关的认识论问题包括:</p>
<ul>
<li>如何收集和评估证据。</li>
<li>如何进行有效的推论。</li>
<li>如何使用不同逻辑形式。</li>
<li>拥有合理的信念意味着什么。</li>
<li>形式和非形式推理之间的差别。</li>
<li>非形式推理的常见谬误。</li>
<li>自然语言的含义与模糊性。</li>
<li>如何做出好的决策。</li>
</ul>
<p>研究认识论可帮助测试员设计有效的测试策略,更好地意识到自己工作中的错误,理解自己的测试能够证明什么、不能证明什么,并编写出无懈可击的测试报告。</p>
<!--noindex-->
<div class="post-button">
<a class="btn" href="/2020/07/01/think-like-a-tester/#more" rel="contents">
阅读全文 »
</a>
</div>
<!--/noindex-->
</div>
<footer class="post-footer">
<div class="post-eof"></div>
</footer>
</article>
<article itemscope="" itemtype="http://schema.org/Article" class="post-block" lang="zh-CN">
<link itemprop="mainEntityOfPage" href="https://stornado.github.io/2020/06/30/the-role-of-the-tester/">
<span hidden="" itemprop="author" itemscope="" itemtype="http://schema.org/Person">
<meta itemprop="image" content="/images/avatar.jpg">
<meta itemprop="name" content="仲夏叶">
<meta itemprop="description" content="">
</span>
<span hidden="" itemprop="publisher" itemscope="" itemtype="http://schema.org/Organization">
<meta itemprop="name" content="仲夏叶 | Stornado">
</span>
<header class="post-header">
<h2 class="post-title" itemprop="name headline">
<a href="/2020/06/30/the-role-of-the-tester/" class="post-title-link" itemprop="url">测试员的角色</a>
</h2>
<div class="post-meta">
<span class="post-meta-item">
<span class="post-meta-item-icon">
<i class="far fa-calendar"></i>
</span>
<span class="post-meta-item-text">发表于</span>
<time title="创建时间:2020-06-30 10:40:43" itemprop="dateCreated datePublished" datetime="2020-06-30T10:40:43+08:00">2020-06-30</time>
</span>
<span class="post-meta-item">
<span class="post-meta-item-icon">
<i class="far fa-calendar-check"></i>
</span>
<span class="post-meta-item-text">更新于</span>
<time title="修改时间:2022-08-04 14:23:25" itemprop="dateModified" datetime="2022-08-04T14:23:25+08:00">2022-08-04</time>
</span>
<span class="post-meta-item">
<span class="post-meta-item-icon">
<i class="far fa-folder"></i>
</span>
<span class="post-meta-item-text">分类于</span>
<span itemprop="about" itemscope="" itemtype="http://schema.org/Thing">
<a href="/categories/testing/" itemprop="url" rel="index"><span itemprop="name">testing</span></a>
</span>
</span>
<br>
<span class="post-meta-item" title="本文字数">
<span class="post-meta-item-icon">
<i class="far fa-file-word"></i>
</span>
<span class="post-meta-item-text">本文字数:</span>
<span>3.8k</span>
</span>
<span class="post-meta-item" title="阅读时长">
<span class="post-meta-item-icon">
<i class="far fa-clock"></i>
</span>
<span class="post-meta-item-text">阅读时长 ≈</span>
<span>3 分钟</span>
</span>
</div>
</header>
<div class="post-body" itemprop="articleBody">
<p>一个角色就是一种关系。这意味着人们不能控制自己的角色,但可以协商。别人期望从测试员那里得到的可能并不合理。当测试员由于低质量的产品受到指责时(这种事时有发生),不管是谁指责,可能都存在分不清角色的问题。也许他们认为测试员的工作,就是在产品交付之前使用“质量魔术棒”敲打产品,他们也许认为测试员敲打得还不够狠。</p>
<p>当测试员清楚了自己的角色之后,在协商角色内容时,就有了在可能出现的任何情况下确立对自己预期的基础。但是,即使是清晰和恰当的测试角色也是一种苛求。</p>
<h2 id="测试员的使命决定要做的一切">测试员的使命决定要做的一切</h2>
<p>测试员的使命,可能要取决于自己的行业、公司、项目或团队的个性,测试项目也千差万别。把测试作为一种工艺发展的挑战,一直是建立测试实践对话所面临的困难,这种测试实践要跨越我们之间的文化和技术差异。这些差异中的很多内容,决定了测试团队的不同使命。以下任何要求都可能决定测试员的使命。</p>
<ul>
<li>快速找出重要软件问题。</li>
<li>对产品质量提出总体评估。</li>
<li>确认产品达到某种具体标准。</li>
<li>帮助客户改进产品质量和可测试性。</li>
<li>保证测试过程能够达到可分清责任的标准。</li>
<li>就测试和测试员协作方式培训客户。</li>
<li>采用特定的方法集或遵循特定的规则集。</li>
<li>帮助预测和控制成本。</li>
<li>帮助客户改进其过程。</li>
<li>以最小化成本、时间或尽可能减少副作用的方式,完成自己的工作。</li>
<li>为满足特定客户要求,完成所有必要的工作。</li>
</ul>
<p>如果测试员将时间和精力都投入到客户并不关心的需求上,就会冒做无关工作或生产率低的风险。测试员要与自己的经理协商使命问题,并明确使命,如果不能就使命达成一致意见,就不会有做任何工作的好基础。</p>
<p><strong>如果测试员不知道该做什么怎么办?</strong>一种回答是评审使命。这样做可以找出自己的核心问题。如果测试员明确自己的测试使命,就可以为自己的工作辩护,并明确地确定下一步要做什么。测试员还可以用简单的描述,向其他人解释自己的角色。如果由于某种原因不能完成自己的使命,应该立即把这个问题汇报给管理层。</p>
<p><strong>如果测试员确切地知道要做什么该怎么办?</strong>经常重新考虑自己的使命,保证自己的计划不会由于过于偏重测试问题的一个方面,而忽略其他方面。</p>
<!--noindex-->
<div class="post-button">
<a class="btn" href="/2020/06/30/the-role-of-the-tester/#more" rel="contents">
阅读全文 »
</a>
</div>
<!--/noindex-->
</div>
<footer class="post-footer">
<div class="post-eof"></div>
</footer>
</article>
<article itemscope="" itemtype="http://schema.org/Article" class="post-block" lang="zh-CN">
<link itemprop="mainEntityOfPage" href="https://stornado.github.io/2020/06/23/how-to-write-good-test-cases/">
<span hidden="" itemprop="author" itemscope="" itemtype="http://schema.org/Person">
<meta itemprop="image" content="/images/avatar.jpg">
<meta itemprop="name" content="仲夏叶">
<meta itemprop="description" content="">
</span>
<span hidden="" itemprop="publisher" itemscope="" itemtype="http://schema.org/Organization">
<meta itemprop="name" content="仲夏叶 | Stornado">
</span>
<header class="post-header">
<h2 class="post-title" itemprop="name headline">
<a href="/2020/06/23/how-to-write-good-test-cases/" class="post-title-link" itemprop="url">如何编写好的测试用例</a>
</h2>
<div class="post-meta">
<span class="post-meta-item">
<span class="post-meta-item-icon">
<i class="far fa-calendar"></i>
</span>
<span class="post-meta-item-text">发表于</span>
<time title="创建时间:2020-06-23 22:51:59" itemprop="dateCreated datePublished" datetime="2020-06-23T22:51:59+08:00">2020-06-23</time>
</span>
<span class="post-meta-item">
<span class="post-meta-item-icon">
<i class="far fa-calendar-check"></i>
</span>
<span class="post-meta-item-text">更新于</span>
<time title="修改时间:2022-08-04 14:23:25" itemprop="dateModified" datetime="2022-08-04T14:23:25+08:00">2022-08-04</time>
</span>
<br>
<span class="post-meta-item" title="本文字数">
<span class="post-meta-item-icon">
<i class="far fa-file-word"></i>
</span>
<span class="post-meta-item-text">本文字数:</span>
<span>8.7k</span>
</span>
<span class="post-meta-item" title="阅读时长">
<span class="post-meta-item-icon">
<i class="far fa-clock"></i>
</span>
<span class="post-meta-item-text">阅读时长 ≈</span>
<span>8 分钟</span>
</span>
</div>
</header>
<div class="post-body" itemprop="articleBody">
<h2 id="什么是测试用例"><strong>什么是测试用例</strong></h2>
<p>测试用例(Test
Case)是为某个特殊目标而编制的一组测试输入、执行条件以及预期结果,以便测试某个程序路径或核实是否满足某个特定需求。是将软件测试的行为活动做一个科学化的组织归纳,目的是能够将软件测试的行为转化成可管理的模式。同时测试用例也是将测试具体量化的方法之一,不同类别的软件,测试用例是不同的。</p>
<p>通俗的讲:就是把整个测试流程的操作步骤用按照一定的格式用文字描述出来。</p>
<h2 id="为什么要写测试用例"><strong>为什么要写测试用例</strong></h2>
<p><strong><a target="_blank" rel="noopener" href="https://yq.aliyun.com/go/articleRenderRedirect?url=http%3A%2F%2Fwww.blogjava.net%2Fqileilove%2Farchive%2F2011%2F10%2F11%2F360942.html">*<em>测试*</em></a>用例</strong>是测试执行的指导;是测试执行的实体,是测试方法、测试质量、测试覆盖率的重要依据和表现形式;是团队内部交流以及交叉测试的依据,便于测试<a target="_blank" rel="noopener" href="https://yq.aliyun.com/go/articleRenderRedirect?url=http%3A%2F%2Fwww.blogjava.net%2Fqileilove%2Farchive%2F2011%2F10%2F11%2F360942.html"><strong>工作</strong></a>的跟踪管理,包括测试执行的进度跟踪,测试质量的跟踪,以及测试人员的工作量的跟踪和考核;在测试执行工作开展前完成测试用例的编写,可以避免测试工作开展的盲目性;测试用例是说服用户相信产品质量的最佳依据,同时也可以提供给客户作为项目验收的依据。</p>
<p><strong>1、 理清思路,避免遗漏测试点</strong></p>
<p>理清思路是我们认为最重要的一点,有的系统本来就是一个大而复杂的项目,我们需要把项目功能细分,根据每一个功能通过编写用例的方式来整理我们测试系统的思路,避免遗漏掉要测试的功能点。</p>
<p><strong>2、 跟踪测试进度进展</strong></p>
<p>通过编写测试用例,执行测试用例,我们可以很清楚的知道我们的测试进度,方便跟踪我们的测试进度。</p>
<p><strong>3、 回归测试</strong></p>
<p>首先我们的系统不是测一遍就完了的,我们需要在开发环境上测试,测试环境上还要进行回归,其次还有可能涉及到合并测试,而且也有可能会有不同的人在不同的阶段进行测试,那么我们就需要测试用例来规范和指导我们的测试行为。</p>
<p><strong>4、 历史参考</strong></p>
<p>在我们所做项目的各个版本中,也许会有很多功能是相同或相近的,我们对这类功能设计了测试用例,便于以后我们遇到类似功能的时候可以做参考依据。</p>
<p>另外如果产品发布后出现了发布缺陷,测试用例也是分析发布后缺陷的依据之一。</p>
<!--noindex-->
<div class="post-button">
<a class="btn" href="/2020/06/23/how-to-write-good-test-cases/#more" rel="contents">
阅读全文 »
</a>
</div>
<!--/noindex-->
</div>
<footer class="post-footer">
<div class="post-eof"></div>
</footer>
</article>
<article itemscope="" itemtype="http://schema.org/Article" class="post-block" lang="zh-CN">
<link itemprop="mainEntityOfPage" href="https://stornado.github.io/2020/05/23/draw-diagrams-with-markdown/">
<span hidden="" itemprop="author" itemscope="" itemtype="http://schema.org/Person">
<meta itemprop="image" content="/images/avatar.jpg">
<meta itemprop="name" content="仲夏叶">
<meta itemprop="description" content="">
</span>
<span hidden="" itemprop="publisher" itemscope="" itemtype="http://schema.org/Organization">
<meta itemprop="name" content="仲夏叶 | Stornado">
</span>
<header class="post-header">
<h2 class="post-title" itemprop="name headline">
<a href="/2020/05/23/draw-diagrams-with-markdown/" class="post-title-link" itemprop="url">Draw-Diagrams-With-Markdown</a>
</h2>
<div class="post-meta">
<span class="post-meta-item">
<span class="post-meta-item-icon">
<i class="far fa-calendar"></i>
</span>
<span class="post-meta-item-text">发表于</span>
<time title="创建时间:2020-05-23 08:24:00" itemprop="dateCreated datePublished" datetime="2020-05-23T08:24:00+08:00">2020-05-23</time>
</span>
<span class="post-meta-item">
<span class="post-meta-item-icon">
<i class="far fa-calendar-check"></i>
</span>
<span class="post-meta-item-text">更新于</span>
<time title="修改时间:2022-08-04 14:23:25" itemprop="dateModified" datetime="2022-08-04T14:23:25+08:00">2022-08-04</time>
</span>
<span class="post-meta-item">
<span class="post-meta-item-icon">
<i class="far fa-folder"></i>
</span>
<span class="post-meta-item-text">分类于</span>
<span itemprop="about" itemscope="" itemtype="http://schema.org/Thing">
<a href="/categories/markdown/" itemprop="url" rel="index"><span itemprop="name">markdown</span></a>
</span>
,
<span itemprop="about" itemscope="" itemtype="http://schema.org/Thing">
<a href="/categories/markdown/mermaid/" itemprop="url" rel="index"><span itemprop="name">mermaid</span></a>
</span>
,
<span itemprop="about" itemscope="" itemtype="http://schema.org/Thing">
<a href="/categories/markdown/flowchart/" itemprop="url" rel="index"><span itemprop="name">flowchart</span></a>
</span>
,
<span itemprop="about" itemscope="" itemtype="http://schema.org/Thing">
<a href="/categories/markdown/sequence/" itemprop="url" rel="index"><span itemprop="name">sequence</span></a>
</span>
</span>
<br>
<span class="post-meta-item" title="本文字数">
<span class="post-meta-item-icon">
<i class="far fa-file-word"></i>
</span>
<span class="post-meta-item-text">本文字数:</span>
<span>2.3k</span>
</span>
<span class="post-meta-item" title="阅读时长">
<span class="post-meta-item-icon">
<i class="far fa-clock"></i>
</span>
<span class="post-meta-item-text">阅读时长 ≈</span>
<span>2 分钟</span>
</span>
</div>
</header>
<div class="post-body" itemprop="articleBody">
<span id="more"></span>
<h1 id="draw-diagrams-with-markdown">Draw Diagrams With Markdown</h1>
<p>August 15, 2016 by typora.io</p>
<p>Typora supports some Markdown extensions for diagrams, once they are
enabled from preference panel.</p>
<p>When exporting as HTML, PDF, epub, docx, those rendered diagrams will
also be included, but diagrams features are not supported when exporting
markdown into other file formats in current version. Besides, you should
also notice that diagrams is not supported by standard Markdown,
CommonMark or GFM. Therefore, we still recommend you to insert an image
of these diagrams instead of write them in Markdown directly.</p>
<h1 id="sequence-diagrams">Sequence Diagrams</h1>
<p>This feature uses <a target="_blank" rel="noopener" href="https://bramp.github.io/js-sequence-diagrams/">js-sequence</a>,
which turns the following code block into a rendered diagram:</p>
<div id="sequence-0">
</div>
<p>For more details, please see <a target="_blank" rel="noopener" href="https://bramp.github.io/js-sequence-diagrams/#syntax">this syntax
explanation</a>.</p>
<h1 id="flowcharts">Flowcharts</h1>
<p>This feature uses <a target="_blank" rel="noopener" href="http://flowchart.js.org/">flowchart.js</a>, which turns the
following code block into a rendered diagram:</p>
<div id="flowchart-0" class="flow-chart">
</div>
<h1 id="mermaid-diagrams">Mermaid Diagrams</h1>
<p>Typora also has integration with <a target="_blank" rel="noopener" href="https://mermaid-js.github.io/mermaid/#/">mermaid</a>, which
supports sequence diagrams, flowcharts, Gantt charts, class and state
diagrams, and pie charts.</p>
<h2 id="sequence-diagrams-1">Sequence Diagrams</h2>
<p>For more details see <a target="_blank" rel="noopener" href="https://mermaid-js.github.io/mermaid/#/sequenceDiagram">these
instructions</a>.</p>
<pre class="mermaid">%% Example of sequence diagram
sequenceDiagram
Alice->>Bob: Hello Bob, how are you?
alt is sick
Bob->>Alice: Not so good :(
else is well
Bob->>Alice: Feeling fresh like a daisy
end
opt Extra response
Bob->>Alice: Thanks for asking
end</pre>
<h2 id="flowcharts-1">Flowcharts</h2>
<p>For more details see <a target="_blank" rel="noopener" href="https://mermaid-js.github.io/mermaid/#/flowchart">these
instructions</a>.</p>
<pre class="mermaid">graph LR
A[Hard edge] -->B(Round edge)