report.html
34.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
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
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>测试报告</title>
<link rel="stylesheet" href="https://cdn.staticfile.org/twitter-bootstrap/4.5.0/css/bootstrap.min.css">
<script src=" https://cdn.staticfile.org/jquery/2.0.0/jquery.min.js"></script>
<script src="https://cdn.staticfile.org/echarts/5.1.2/echarts.min.js"></script>
<!-- 页面样式-->
<style type="text/css">
/*标题样式*/
.title {
width: auto;
height: 60px;
text-align: center;
font: bolder 38px/60px "Microsoft YaHei UI";
}
/*汇总信息样式*/
.summary {
width: 90%;
position: absolute;
top: 120px;
margin-left: 5%;
}
.text-left {
font: bolder 20px/30px "Microsoft YaHei UI";
}
.left {
width: 50%;
float: left;
}
.right {
width: 50%;
float: right;
}
.desc {
float: left;
width: 100%;
}
.list-group-item span {
font: normal 16px/38px "Microsoft YaHei UI";
padding: 30px;
}
.list-group-item {
position: relative;
display: block;
padding: .4rem 1.25rem;
background-color: #fff;
border: 1px solid rgba(0, 0, 0, .125);
}
/* 执行信息样式 */
.test_info {
width: 90%;
position: absolute;
top: 900px;
margin-left: 5%;
color: #28a745 !important;
}
.table td, th {
border: solid 2px rgba(9, 122, 51, 0.11) !important;
padding: 0;
line-height: 40px;
text-align: center;
}
select {
border: 0;
padding: 0;
margin: 0;
height: 2em;
width: 8em;
margin-left: 2em;
}
option {
text-align: center;
height: 36px;
font: none 18px/36px "Microsoft YaHei UI";
color: #28a745 !important;
}
.test_log {
background: rgba(163, 171, 189, 0.15);
width: 100%;
height: 50px;
border-top: none;
border-bottom: none;
display: none;
text-align: left;
}
.test_log td {
text-align: left;
height: 30px;
margin: 0;
padding-left: 3em;
padding-right:3em;
font: none 18px/24px "Microsoft YaHei UI";
color: #9e141a;
}
pre {
margin: 0;
white-space: pre-wrap;
white-space: -moz-pre-wrap;
white-space: -o-pre-wrap;
word-wrap: break-word;
line-height: 22px;
font-size: 14px
}
/* 测试图表显示*/
.char {
width: 90%;
position: absolute;
top: 450px;
margin-left: 5%;
color: #28a745 !important;
}
</style>
</head>
<body>
<!--报告标题-->
<div class="title text-success">
<div class="shadow-lg p-3 mb-5 bg-white rounded">优学乐业测试报告</div>
</div>
<!--汇总信息-->
<div class="summary">
<p class="text-left text-success">测试结果汇总</p>
<div class="left">
<ul class="list-group">
<li class="list-group-item">
<button type="button" class="btn btn-success">测试人员</button>
<span class="text-dark">石头</span>
</li>
<li class="list-group-item">
<button type="button" class="btn btn-success">开始时间</button>
<span class="text-dark">2022-12-28 22:05:34</span>
</li>
<li class="list-group-item">
<button type="button" class="btn btn-success">执行时间</button>
<span class="text-dark">7.90 S</span>
</li>
<li class="list-group-item">
<button type="button" class="btn btn-success">用例总数</button>
<span class="text-dark">15</span>
</li>
</ul>
</div>
<div class="right">
<ul class="list-group">
<li class="list-group-item">
<button type="button" class="btn btn-success">成功用例</button>
<span class="text-success">15</span>
</li>
<li class="list-group-item">
<button type="button" class="btn btn-warning">失败用例</button>
<span class="text-warning">0</span>
</li>
<li class="list-group-item">
<button type="button" class="btn btn-danger">错误用例</button>
<span class="text-danger">0</span>
</li>
<li class="list-group-item">
<button type="button" class="btn btn-secondary">跳过用例</button>
<span class="text-secondary">0</span>
</li>
</ul>
</div>
<div class="desc">
<ul class="list-group">
<li class="list-group-item">
<button type="button" class="btn btn-success">描述信息</button>
<span class="text-secondary">优学乐业测试报告</span>
</li>
</ul>
</div>
</div>
<!--测试图表-->
<div class="char">
<p class="text-left text-success">图表展示</p>
<div id="char2" style="width: 49%;height: 400px;float: left"></div>
<div id="char" style="width: 49%;height: 400px ;float: left"></div>
</div>
<!--详细信息-->
<div class="test_info">
<p class="text-left text-success">详细信息</p>
<div class="table_data">
<table class="table">
<thead class="bg-success text-light">
<tr>
<th scope="col" style="width: 5%;padding: 0">编号</th>
<th scope="col" style="width: 20%;padding: 0">
<span>测试类</span>
<select id="testClass">
<option>所有</option>
<option>Test04Student</option>
</select>
</th>
<th scope="col" style="width: 15%;padding: 0">测试方法</th>
<th scope="col" style="width: 20%;padding: 0">用例描述</th>
<th scope="col" style="width: 15%;padding: 0">执行时间</th>
<th scope="col" style="width: 20%;padding: 0">
<span>执行结果</span>
<select id="testResult">
<option>所有</option>
<option class="text-success">成功</option>
<option class="text-warning">失败</option>
<option class="text-danger">错误</option>
<option class="text-info">跳过</option>
</select>
</th>
<th scope="col" style="width: 10%;padding: 0">详细信息</th>
</tr>
</thead>
<tbody>
<tr>
<td>1</td>
<td class="Test04Student">Test04Student</td>
<td>test_add_student_info_01</td>
<td>新增学生成功</td>
<td>0.365s</td>
<td class="text-success">成功</td>
<td>
<button type="button" class="btn btn-success btn_info">查看详情</button>
</td>
</tr>
<tr class="test_log">
<td colspan="7" class="small text-muted" style=" word-wrap:break-word; word-break:break-all">
<pre>用例入参:{'name': 'py自动化学生20221228_22:05:37_1', 'number': '20221228_22:05:37_1', 'phone': '17339128409', 'startSchoolYear': 2022, 'classInfoId': '1608034820544655361', 'idType': 'identity_card', 'idNumber': '150101195407061989', 'gender': 0, 'schoolCensusStatus': 'not_duty', 'trainingOrientation': 'secondary', 'other': '17398263299', 'departmentId': '1608034714437152769', 'professionalId': '1608100544311062529'}
预期结果: {'msg': 'success', 'code': 200, 'data': True}
实际结果: {'msg': 'success', 'code': 200, 'data': True}
test_add_student_info_01 (testcase.test_03_teaching_affairs.Test04Student)执行——>【通过】
</pre>
</td>
</tr>
<tr>
<td>2</td>
<td class="Test04Student">Test04Student</td>
<td>test_add_student_info_02</td>
<td>学生姓名未填写失败</td>
<td>0.286s</td>
<td class="text-success">成功</td>
<td>
<button type="button" class="btn btn-success btn_info">查看详情</button>
</td>
</tr>
<tr class="test_log">
<td colspan="7" class="small text-muted" style=" word-wrap:break-word; word-break:break-all">
<pre>用例入参:{'name': '', 'number': '20221228_22:05:38_2', 'phone': '15530166835', 'startSchoolYear': 2022, 'classInfoId': '1608034820544655361', 'idType': 'identity_card', 'idNumber': '540101201710181976', 'gender': 0, 'schoolCensusStatus': 'not_duty', 'trainingOrientation': 'secondary', 'other': '13330174319', 'departmentId': '1608034714437152769', 'professionalId': '1608100544311062529'}
预期结果: {'msg': '姓名不能为空', 'code': 500, 'data': None}
实际结果: {'msg': '姓名不能为空', 'code': 500, 'data': None}
test_add_student_info_02 (testcase.test_03_teaching_affairs.Test04Student)执行——>【通过】
</pre>
</td>
</tr>
<tr>
<td>3</td>
<td class="Test04Student">Test04Student</td>
<td>test_add_student_info_03</td>
<td>学生学号未填写失败</td>
<td>0.298s</td>
<td class="text-success">成功</td>
<td>
<button type="button" class="btn btn-success btn_info">查看详情</button>
</td>
</tr>
<tr class="test_log">
<td colspan="7" class="small text-muted" style=" word-wrap:break-word; word-break:break-all">
<pre>用例入参:{'name': 'py自动化学生20221228_22:05:38_3', 'number': '', 'phone': '13625185018', 'startSchoolYear': 2022, 'classInfoId': '1608034820544655361', 'idType': 'identity_card', 'idNumber': '640101200106100147', 'gender': 0, 'schoolCensusStatus': 'not_duty', 'trainingOrientation': 'secondary', 'other': '13650609402', 'departmentId': '1608034714437152769', 'professionalId': '1608100544311062529'}
预期结果: {'msg': '学生学号不能为空', 'code': 500, 'data': None}
实际结果: {'msg': '学生学号不能为空', 'code': 500, 'data': None}
test_add_student_info_03 (testcase.test_03_teaching_affairs.Test04Student)执行——>【通过】
</pre>
</td>
</tr>
<tr>
<td>4</td>
<td class="Test04Student">Test04Student</td>
<td>test_add_student_info_04</td>
<td>手机号未填写,添加成功</td>
<td>0.348s</td>
<td class="text-success">成功</td>
<td>
<button type="button" class="btn btn-success btn_info">查看详情</button>
</td>
</tr>
<tr class="test_log">
<td colspan="7" class="small text-muted" style=" word-wrap:break-word; word-break:break-all">
<pre>用例入参:{'name': 'py自动化学生20221228_22:05:38_4', 'number': '20221228_22:05:38_4', 'phone': '', 'startSchoolYear': 2022, 'classInfoId': '1608034820544655361', 'idType': 'identity_card', 'idNumber': '650101199005091786', 'gender': 0, 'schoolCensusStatus': 'not_duty', 'trainingOrientation': 'secondary', 'other': '17390609993', 'departmentId': '1608034714437152769', 'professionalId': '1608100544311062529'}
预期结果: {'msg': 'success', 'code': 200, 'data': True}
实际结果: {'msg': 'success', 'code': 200, 'data': True}
test_add_student_info_04 (testcase.test_03_teaching_affairs.Test04Student)执行——>【通过】
</pre>
</td>
</tr>
<tr>
<td>5</td>
<td class="Test04Student">Test04Student</td>
<td>test_add_student_info_05</td>
<td>入学年份未填写,添加失败</td>
<td>0.292s</td>
<td class="text-success">成功</td>
<td>
<button type="button" class="btn btn-success btn_info">查看详情</button>
</td>
</tr>
<tr class="test_log">
<td colspan="7" class="small text-muted" style=" word-wrap:break-word; word-break:break-all">
<pre>用例入参:{'name': 'py自动化学生20221228_22:05:39_5', 'number': '20221228_22:05:39_5', 'phone': '13646205098', 'startSchoolYear': '', 'classInfoId': '1608034820544655361', 'idType': 'identity_card', 'idNumber': '500101195009121689', 'gender': 0, 'schoolCensusStatus': 'not_duty', 'trainingOrientation': 'secondary', 'other': '17393149141', 'departmentId': '1608034714437152769', 'professionalId': '1608100544311062529'}
预期结果: {'msg': '入学年份不能为空', 'code': 500, 'data': None}
实际结果: {'msg': '入学年份不能为空', 'code': 500, 'data': None}
test_add_student_info_05 (testcase.test_03_teaching_affairs.Test04Student)执行——>【通过】
</pre>
</td>
</tr>
<tr>
<td>6</td>
<td class="Test04Student">Test04Student</td>
<td>test_add_student_info_06</td>
<td>班级未填写,添加失败</td>
<td>0.286s</td>
<td class="text-success">成功</td>
<td>
<button type="button" class="btn btn-success btn_info">查看详情</button>
</td>
</tr>
<tr class="test_log">
<td colspan="7" class="small text-muted" style=" word-wrap:break-word; word-break:break-all">
<pre>用例入参:{'name': 'py自动化学生20221228_22:05:39_6', 'number': '20221228_22:05:39_6', 'phone': '13373775734', 'startSchoolYear': 2022, 'classInfoId': '', 'idType': 'identity_card', 'idNumber': '640101193608250935', 'gender': 0, 'schoolCensusStatus': 'not_duty', 'trainingOrientation': 'secondary', 'other': '13367408090', 'departmentId': '1608034714437152769', 'professionalId': '1608100544311062529'}
预期结果: {'msg': '班级不能为空', 'code': 500, 'data': None}
实际结果: {'msg': '班级不能为空', 'code': 500, 'data': None}
test_add_student_info_06 (testcase.test_03_teaching_affairs.Test04Student)执行——>【通过】
</pre>
</td>
</tr>
<tr>
<td>7</td>
<td class="Test04Student">Test04Student</td>
<td>test_add_student_info_07</td>
<td>证件类型和证件号码都没填写,添加成功</td>
<td>0.309s</td>
<td class="text-success">成功</td>
<td>
<button type="button" class="btn btn-success btn_info">查看详情</button>
</td>
</tr>
<tr class="test_log">
<td colspan="7" class="small text-muted" style=" word-wrap:break-word; word-break:break-all">
<pre>用例入参:{'name': 'py自动化学生20221228_22:05:39_7', 'number': '20221228_22:05:39_7', 'phone': '13379431688', 'startSchoolYear': 2022, 'classInfoId': '1608034820544655361', 'idType': '', 'idNumber': '', 'gender': 0, 'schoolCensusStatus': 'not_duty', 'trainingOrientation': 'secondary', 'other': '13676329798', 'departmentId': '1608034714437152769', 'professionalId': '1608100544311062529'}
预期结果: {'msg': 'success', 'code': 200, 'data': True}
实际结果: {'msg': 'success', 'code': 200, 'data': True}
test_add_student_info_07 (testcase.test_03_teaching_affairs.Test04Student)执行——>【通过】
</pre>
</td>
</tr>
<tr>
<td>8</td>
<td class="Test04Student">Test04Student</td>
<td>test_add_student_info_08</td>
<td>证件类型未填,证件号码填写,添加失败</td>
<td>0.301s</td>
<td class="text-success">成功</td>
<td>
<button type="button" class="btn btn-success btn_info">查看详情</button>
</td>
</tr>
<tr class="test_log">
<td colspan="7" class="small text-muted" style=" word-wrap:break-word; word-break:break-all">
<pre>用例入参:{'name': 'py自动化学生20221228_22:05:40_8', 'number': '20221228_22:05:40_8', 'phone': '13620553068', 'startSchoolYear': 2022, 'classInfoId': '1608034820544655361', 'idType': '', 'idNumber': '350101193411111035', 'gender': 0, 'schoolCensusStatus': 'not_duty', 'trainingOrientation': 'secondary', 'other': '13676950796', 'departmentId': '1608034714437152769', 'professionalId': '1608100544311062529'}
预期结果: {'msg': '证件类型未填,证件号码填写', 'code': 500, 'data': None}
实际结果: {'msg': '证件类型未填,证件号码填写', 'code': 500, 'data': None}
test_add_student_info_08 (testcase.test_03_teaching_affairs.Test04Student)执行——>【通过】
</pre>
</td>
</tr>
<tr>
<td>9</td>
<td class="Test04Student">Test04Student</td>
<td>test_add_student_info_09</td>
<td>证件类型填写,证件号码未填写,添加失败</td>
<td>0.303s</td>
<td class="text-success">成功</td>
<td>
<button type="button" class="btn btn-success btn_info">查看详情</button>
</td>
</tr>
<tr class="test_log">
<td colspan="7" class="small text-muted" style=" word-wrap:break-word; word-break:break-all">
<pre>用例入参:{'name': 'py自动化学生20221228_22:05:40_9', 'number': '20221228_22:05:40_9', 'phone': '13696508301', 'startSchoolYear': 2022, 'classInfoId': '1608034820544655361', 'idType': 'identity_card', 'idNumber': '', 'gender': 0, 'schoolCensusStatus': 'not_duty', 'trainingOrientation': 'secondary', 'other': '17359563035', 'departmentId': '1608034714437152769', 'professionalId': '1608100544311062529'}
预期结果: {'msg': '证件类型填写,证件号码未填写', 'code': 500, 'data': None}
实际结果: {'msg': '证件类型填写,证件号码未填写', 'code': 500, 'data': None}
test_add_student_info_09 (testcase.test_03_teaching_affairs.Test04Student)执行——>【通过】
</pre>
</td>
</tr>
<tr>
<td>10</td>
<td class="Test04Student">Test04Student</td>
<td>test_add_student_info_10</td>
<td>性别未填写,添加成功</td>
<td>0.359s</td>
<td class="text-success">成功</td>
<td>
<button type="button" class="btn btn-success btn_info">查看详情</button>
</td>
</tr>
<tr class="test_log">
<td colspan="7" class="small text-muted" style=" word-wrap:break-word; word-break:break-all">
<pre>用例入参:{'name': 'py自动化学生20221228_22:05:40_10', 'number': '20221228_22:05:40_10', 'phone': '13644984243', 'startSchoolYear': 2022, 'classInfoId': '1608034820544655361', 'idType': 'identity_card', 'idNumber': '140101196511081157', 'gender': '', 'schoolCensusStatus': 'not_duty', 'trainingOrientation': 'secondary', 'other': '17321569390', 'departmentId': '1608034714437152769', 'professionalId': '1608100544311062529'}
预期结果: {'msg': 'success', 'code': 200, 'data': True}
实际结果: {'msg': 'success', 'code': 200, 'data': True}
test_add_student_info_10 (testcase.test_03_teaching_affairs.Test04Student)执行——>【通过】
</pre>
</td>
</tr>
<tr>
<td>11</td>
<td class="Test04Student">Test04Student</td>
<td>test_add_student_info_11</td>
<td>学籍状态未填写,添加成功</td>
<td>0.333s</td>
<td class="text-success">成功</td>
<td>
<button type="button" class="btn btn-success btn_info">查看详情</button>
</td>
</tr>
<tr class="test_log">
<td colspan="7" class="small text-muted" style=" word-wrap:break-word; word-break:break-all">
<pre>用例入参:{'name': 'py自动化学生20221228_22:05:41_11', 'number': '20221228_22:05:41_11', 'phone': '15558291162', 'startSchoolYear': 2022, 'classInfoId': '1608034820544655361', 'idType': 'identity_card', 'idNumber': '350101199502051661', 'gender': 0, 'schoolCensusStatus': '', 'trainingOrientation': 'secondary', 'other': '17321981624', 'departmentId': '1608034714437152769', 'professionalId': '1608100544311062529'}
预期结果: {'msg': 'success', 'code': 200, 'data': True}
实际结果: {'msg': 'success', 'code': 200, 'data': True}
test_add_student_info_11 (testcase.test_03_teaching_affairs.Test04Student)执行——>【通过】
</pre>
</td>
</tr>
<tr>
<td>12</td>
<td class="Test04Student">Test04Student</td>
<td>test_add_student_info_12</td>
<td>培养方向未填写,添加成功</td>
<td>0.351s</td>
<td class="text-success">成功</td>
<td>
<button type="button" class="btn btn-success btn_info">查看详情</button>
</td>
</tr>
<tr class="test_log">
<td colspan="7" class="small text-muted" style=" word-wrap:break-word; word-break:break-all">
<pre>用例入参:{'name': 'py自动化学生20221228_22:05:41_12', 'number': '20221228_22:05:41_12', 'phone': '13364494062', 'startSchoolYear': 2022, 'classInfoId': '1608034820544655361', 'idType': 'identity_card', 'idNumber': '420101196006211456', 'gender': 0, 'schoolCensusStatus': 'not_duty', 'trainingOrientation': '', 'other': '15564989269', 'departmentId': '1608034714437152769', 'professionalId': '1608100544311062529'}
预期结果: {'msg': 'success', 'code': 200, 'data': True}
实际结果: {'msg': 'success', 'code': 200, 'data': True}
test_add_student_info_12 (testcase.test_03_teaching_affairs.Test04Student)执行——>【通过】
</pre>
</td>
</tr>
<tr>
<td>13</td>
<td class="Test04Student">Test04Student</td>
<td>test_add_student_info_13</td>
<td>其他-备注未填写,添加成功</td>
<td>0.336s</td>
<td class="text-success">成功</td>
<td>
<button type="button" class="btn btn-success btn_info">查看详情</button>
</td>
</tr>
<tr class="test_log">
<td colspan="7" class="small text-muted" style=" word-wrap:break-word; word-break:break-all">
<pre>用例入参:{'name': 'py自动化学生20221228_22:05:41_13', 'number': '20221228_22:05:41_13', 'phone': '17323609613', 'startSchoolYear': 2022, 'classInfoId': '1608034820544655361', 'idType': 'identity_card', 'idNumber': '310101197706151510', 'gender': 0, 'schoolCensusStatus': 'not_duty', 'trainingOrientation': 'secondary', 'other': '', 'departmentId': '1608034714437152769', 'professionalId': '1608100544311062529'}
预期结果: {'msg': 'success', 'code': 200, 'data': True}
实际结果: {'msg': 'success', 'code': 200, 'data': True}
test_add_student_info_13 (testcase.test_03_teaching_affairs.Test04Student)执行——>【通过】
</pre>
</td>
</tr>
<tr>
<td>14</td>
<td class="Test04Student">Test04Student</td>
<td>test_add_student_info_14</td>
<td>院系ID未填写,添加失败</td>
<td>0.291s</td>
<td class="text-success">成功</td>
<td>
<button type="button" class="btn btn-success btn_info">查看详情</button>
</td>
</tr>
<tr class="test_log">
<td colspan="7" class="small text-muted" style=" word-wrap:break-word; word-break:break-all">
<pre>用例入参:{'name': 'py自动化学生20221228_22:05:42_14', 'number': '20221228_22:05:42_14', 'phone': '13652601722', 'startSchoolYear': 2022, 'classInfoId': '1608034820544655361', 'idType': 'identity_card', 'idNumber': '350101195302051802', 'gender': 0, 'schoolCensusStatus': 'not_duty', 'trainingOrientation': 'secondary', 'other': '13376600162', 'departmentId': '', 'professionalId': '1608100544311062529'}
预期结果: {'msg': '院系不能为空', 'code': 500, 'data': None}
实际结果: {'msg': '院系不能为空', 'code': 500, 'data': None}
test_add_student_info_14 (testcase.test_03_teaching_affairs.Test04Student)执行——>【通过】
</pre>
</td>
</tr>
<tr>
<td>15</td>
<td class="Test04Student">Test04Student</td>
<td>test_add_student_info_15</td>
<td>专业ID未填写添加失败</td>
<td>0.298s</td>
<td class="text-success">成功</td>
<td>
<button type="button" class="btn btn-success btn_info">查看详情</button>
</td>
</tr>
<tr class="test_log">
<td colspan="7" class="small text-muted" style=" word-wrap:break-word; word-break:break-all">
<pre>用例入参:{'name': 'py自动化学生20221228_22:05:42_15', 'number': '20221228_22:05:42_15', 'phone': '15585302259', 'startSchoolYear': 2022, 'classInfoId': '1608034820544655361', 'idType': 'identity_card', 'idNumber': '330101197505100139', 'gender': 0, 'schoolCensusStatus': 'not_duty', 'trainingOrientation': 'secondary', 'other': '17375380927', 'departmentId': '1608034714437152769', 'professionalId': ''}
预期结果: {'msg': '专业不能为空', 'code': 500, 'data': None}
实际结果: {'msg': '专业不能为空', 'code': 500, 'data': None}
test_add_student_info_15 (testcase.test_03_teaching_affairs.Test04Student)执行——>【通过】
</pre>
</td>
</tr>
</tbody>
</table>
</div>
<div style="height: 200px"></div>
</div>
<script>
var tbodyTr = $('tbody tr');
var testResult = $("#testResult");
var testClass = $("#testClass");
<!-- 用例执行详细信息显示切换-->
$(".btn_info").click(function () {
$(this).parent().parent().next().toggle();
});
// 当选择用例类之后触发
testClass.change(function () {
var cls = $(this).val();
var res = testResult.val();
elementDisplay(cls, res);
sort()
});
testResult.change(function () {
var res = $(this).val();
var cls = testClass.val();
elementDisplay(cls, res);
sort()
});
function elementDisplay(cls, res) {
// 用例数据的显示
if (cls === "所有") {
if (res === "所有") {
tbodyTr.has('button').show();
} else if (res === '成功') {
tbodyTr.hide();
tbodyTr.has('button').has('.text-success').show()
} else if (res === '失败') {
tbodyTr.hide();
tbodyTr.has('button').has('.text-warning').show()
} else if (res === '错误') {
tbodyTr.hide();
tbodyTr.has('button').has('.text-danger').show()
} else if (res === '跳过') {
tbodyTr.hide();
tbodyTr.has('button').has('.text-info').show()
}
} else {
if (res === "所有") {
tbodyTr.hide();
tbodyTr.has('button').has('.' + cls + '').show()
} else if (res === '成功') {
tbodyTr.hide();
tbodyTr.has('button').has('.' + cls + '').has('.text-success').show()
} else if (res === '失败') {
tbodyTr.hide();
tbodyTr.has('button').has('.' + cls + '').has('.text-warning').show()
} else if (res === '错误') {
tbodyTr.hide();
tbodyTr.has('button').has('.' + cls + '').has('.text-danger').show()
} else if (res === '跳过') {
tbodyTr.hide();
tbodyTr.has('button').has('.' + cls + '').has('.text-info').show()
}
}
}
function sort() {
//重新排列显示序号
// 选择所有可以见的tr
var visibleTr = tbodyTr.filter(":visible");
visibleTr.each(function (index, element) {
element.firstElementChild.innerHTML = index + 1;
})
}
</script>
<script type="text/javascript">
// 基于准备好的dom,初始化echarts实例
var myChart = echarts.init(document.getElementById('char'));
var myChart2 = echarts.init(document.getElementById('char2'));
// 指定图表的配置项和数据
option = {
color: ['#00a10a', '#ddb518', 'rgba(204,46,41,0.73)', '#85898c'],
tooltip: {
trigger: 'item',
formatter: '{a} <br/>{b}: {c} ({d}%)'
},
legend: {
orient: 'vertical',
left: 10,
data: ['通过', '失败', '错误', '跳过']
},
series: [
{
name: '测试结果',
type: 'pie',
radius: ['50%', '70%'],
avoidLabelOverlap: false,
label: {
show: false,
position: 'center'
},
emphasis: {
label: {
show: true,
fontSize: '30',
fontWeight: 'bold'
}
},
labelLine: {
show: false
},
data: [
{value: 15, name: '通过'},
{value: 0, name: '失败'},
{value: 0, name: '错误'},
{value: 0, name: '跳过'}
]
}
]
};
option2 = {
tooltip: {
formatter: '{a} <br/>{b} : {c}%'
},
toolbox: {
feature: {
restore: {},
saveAsImage: {}
}
},
series: [
{
name: '测试结果',
type: 'gauge',
detail: {formatter: '100.00%'},
data: [{value: '100.00', name: '用例通过率'}],
axisLine: {
lineStyle: {
color: [
[0.2, '#c20000'],
[0.8, '#ddb518'],
[1, '#00a10a']]
}
}
}
]
};
myChart2.setOption(option2);
// 使用刚指定的配置项和数据显示图表。
myChart.setOption(option);
</script>
</body>
</html>