report.html 36.3 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
<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>测试报告</title>
    <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/bootstrap@4.5.0/dist/css/bootstrap.min.css"
          integrity="sha384-9aIt2nRpC12Uk9gS9baDl411NQApFmC26EwAOH8WgZl5MYYxFfc+NcPb1dKGj7Sk" crossorigin="anonymous">
    <!--    页面样式-->
    <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;
        }

        /*    测试图表显示*/
        .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-11-01 20:45:11</span>
            </li>
            <li class="list-group-item">
                <button type="button" class="btn btn-success">执行时间</button>
                <span class="text-dark">3.20 S</span>
            </li>
            <li class="list-group-item">
                <button type="button" class="btn btn-success">用例总数</button>
                <span class="text-dark">3</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">2</span>
            </li>
            <li class="list-group-item">
                <button type="button" class="btn btn-danger">失败用例</button>
                <span class="text-warning">0</span>
            </li>
            <li class="list-group-item">
                <button type="button" class="btn btn-warning">错误用例</button>
                <span class="text-danger">1</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>DDTTest</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: 10%;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-danger">失败</option>
                        <option class="text-warning">错误</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="DDTTest">DDTTest</td>
                    <td>/cl/formconf/form</td>
                    <td>正向case--查询表单配置</td>
                    <td>0.187s</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>2022-11-01 20:45:11,108 - root - INFO - ***************【查询表单配置】接口测试开始***************
2022-11-01 20:45:11,108 - root - INFO - 接口测试用例为:{'id': 1.0, 'depend_id': 0.0, 'positive_case': '正向', 'desc': '查询表单配置', 'uri': '/cl/formconf/form', 'method': 'GET', 'headers': '{\n"Content-Type": "application/json"\n}', 'params': '{"type": 1,"platformType": 1}', 'response_assert': '{"code":0,"msg":"OK"}', 'save_args': 'md5'}
2022-11-01 20:45:11,109 - root - INFO - 请求头为:{'Content-Type': 'application/json'}
2022-11-01 20:45:11,109 - root - INFO - 请求参数为:{'type': 1, 'platformType': 1}
2022-11-01 20:45:11,290 - root - INFO - 接口测试结果为:{'code': 0, 'msg': 'OK', 'success': True, 'result': {'formId': 1, 'md5': 'd003784d3e6dbc116efcb6d550440465', 'list': [{'componetId': 2967, 'type': 'left_deck', 'title': '', 'key': 'left_deck', 'url': 'https://sanheyi-staging.oss-cn-beijing.aliyuncs.com//sanheyi-staging/image/appimage/72c1c56ff9b44cf29356a94b88784447.png', 'backgroundUrl': '', 'data': None, 'value': '', 'placeholder': '', 'required': 0, 'minLength': 0, 'length': 0, 'hideComponetId': 0, 'showValue': None, 'regex': '', 'hintMsg': '', 'lengthHintMsg': '', 'nonHintMsg': ''}, {'componetId': 2968, 'type': 'right_deck', 'title': '', 'key': 'right_deck', 'url': 'https://sanheyi-staging.oss-cn-beijing.aliyuncs.com//sanheyi-staging/image/appimage/85d9858f621c4b458408336a52f7d2f9.png', 'backgroundUrl': '', 'data': None, 'value': '', 'placeholder': '', 'required': 0, 'minLength': 0, 'length': 0, 'hideComponetId': 0, 'showValue': None, 'regex': '', 'hintMsg': '', 'lengthHintMsg': '', 'nonHintMsg': ''}, {'componetId': 2969, 'type': 'reset_pwd', 'title': '忘记密码', 'key': '', 'url': '', 'backgroundUrl': '', 'data': None, 'value': '', 'placeholder': '', 'required': 0, 'minLength': 0, 'length': 0, 'hideComponetId': 0, 'showValue': None, 'regex': '', 'hintMsg': '', 'lengthHintMsg': '', 'nonHintMsg': ''}, {'componetId': 2970, 'type': 'active_account', 'title': '账号激活', 'key': '', 'url': '', 'backgroundUrl': '', 'data': None, 'value': '', 'placeholder': '', 'required': 0, 'minLength': 0, 'length': 0, 'hideComponetId': 0, 'showValue': None, 'regex': '', 'hintMsg': '', 'lengthHintMsg': '', 'nonHintMsg': ''}, {'componetId': 4, 'type': 'text_01', 'title': '工号/账号', 'key': 'username', 'url': 'https://sanheyi-staging.oss-cn-beijing.aliyuncs.com//sanheyi-staging/image/appimage/d0501da2493a471c930203a60ccc2f70.png', 'backgroundUrl': '', 'data': None, 'value': '', 'placeholder': '请输入您的工号', 'required': 1, 'minLength': 0, 'length': 30, 'hideComponetId': 0, 'showValue': None, 'regex': '', 'hintMsg': '', 'lengthHintMsg': '', 'nonHintMsg': ''}, {'componetId': 5, 'type': 'password', 'title': '密码', 'key': 'password', 'url': 'https://sanheyi-staging.oss-cn-beijing.aliyuncs.com//sanheyi-staging/image/appimage/c88de2ca99ec42e4a91fea76102184bd.png', 'backgroundUrl': '', 'data': None, 'value': '', 'placeholder': '请输入您的密码', 'required': 1, 'minLength': 0, 'length': 30, 'hideComponetId': 0, 'showValue': None, 'regex': '', 'hintMsg': '', 'lengthHintMsg': '', 'nonHintMsg': ''}, {'componetId': 2948, 'type': 'privacy_agreement', 'title': '公司隐私准则声明', 'key': 'privacy_agreement', 'url': 'https://sanheyi-staging.oss-cn-beijing.aliyuncs.com//sanheyi-staging/image/appimage/fba82c2094434655832ee94979b4805a.html', 'backgroundUrl': 'https://sanheyi-staging.oss-cn-beijing.aliyuncs.com//sanheyi-staging/image/appimage/9eee174fd53547eeb331d2dda678789b.png', 'data': None, 'value': '', 'placeholder': '', 'required': 0, 'minLength': 0, 'length': 100, 'hideComponetId': 0, 'showValue': None, 'regex': '', 'hintMsg': '', 'lengthHintMsg': '', 'nonHintMsg': ''}]}}
2022-11-01 20:45:11,293 - root - INFO - 响应信息存储完毕!!!
2022-11-01 20:45:11,293 - root - INFO - ***************【查询表单配置】接口测试结束***************
/cl/formconf/form (RunTest.DDTTest)执行——>【通过】
</pre>
                        
                        
                    </td>
                </tr>
            
                <tr>
                    <td>2</td>
                    <td class="DDTTest">DDTTest</td>
                    <td>/cl/auth/login</td>
                    <td>正向case--APP登录</td>
                    <td>0.863s</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>2022-11-01 20:45:11,294 - root - INFO - ***************【APP登录】接口测试开始***************
2022-11-01 20:45:11,295 - root - INFO - 接口测试用例为:{'id': 2.0, 'depend_id': 2.0, 'positive_case': '正向', 'desc': 'APP登录', 'uri': '/cl/auth/login', 'method': 'POST', 'headers': '{\n"Content-Type": "application/json",\n"X-Device-Num": "5f647684-f1f9-41ef-8775-921afe231592"\n}', 'params': '{\n"type": 1,\n"platformType": "1",\n"md5": "#1.md5",\n"username": "NB60351",\n"password": "zhbx!MSL"\n}', 'response_assert': '{"code":0,"msg":"OK"}', 'save_args': 'token'}
2022-11-01 20:45:11,295 - root - INFO - 请求头为:{'Content-Type': 'application/json', 'X-Device-Num': '5f647684-f1f9-41ef-8775-921afe231592'}
2022-11-01 20:45:11,296 - root - INFO - 需要替换的变量信息为:['#1.md5']
2022-11-01 20:45:11,296 - root - INFO - 可变参数的信息为:{'#1.md5': 'd003784d3e6dbc116efcb6d550440465'}
2022-11-01 20:45:11,296 - root - INFO - 可变参数替换完毕:{'type': 1, 'platformType': '1', 'md5': 'd003784d3e6dbc116efcb6d550440465', 'username': 'NB60351', 'password': 'zhbx!MSL'}
2022-11-01 20:45:11,297 - root - INFO - 请求参数为:{'type': 1, 'platformType': '1', 'md5': 'd003784d3e6dbc116efcb6d550440465', 'username': 'NB60351', 'password': 'zhbx!MSL'}
2022-11-01 20:45:12,154 - root - INFO - 接口测试结果为:{'code': 0, 'msg': 'OK', 'success': True, 'result': {'name': '徐营销员', 'token': '2ea7f946737d4f589f4b3f03206b8875', 'role': 32, 'marketingChannel': '个险渠道', 'branchId': 0, 'branchName': '宁波分公司', 'subBranchId': 51, 'subBranchName': '宁波', 'directlyAgencyName': '宁波', 'directlyAgencyId': 51, 'reset': 0, 'phoneNum': '', 'idCardType': 0, 'idCardNo': '', 'employeeId': 'NB60351', 'licensed': '2005113020090000136'}}
2022-11-01 20:45:12,155 - root - INFO - 响应信息存储完毕!!!
2022-11-01 20:45:12,156 - root - INFO - ***************【APP登录】接口测试结束***************
/cl/auth/login (RunTest.DDTTest)执行——>【通过】
</pre>
                        
                        
                    </td>
                </tr>
            
                <tr>
                    <td>3</td>
                    <td class="DDTTest">DDTTest</td>
                    <td>/cl/order/hand/add</td>
                    <td>正向case--纸质入件</td>
                    <td>2.15s</td>
                    
                        <td class="text-warning">错误</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>Traceback (most recent call last):
</pre>
                        

                            <pre>  File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/unittest/case.py", line 59, in testPartExecutor
    yield
</pre>
                        

                            <pre>  File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/unittest/case.py", line 628, in run
    testMethod()
</pre>
                        

                            <pre>  File "/Library/Frameworks/Python.framework/Versions/3.7/lib/python3.7/site-packages/ddt.py", line 220, in wrapper
    return func(self, *args, **kwargs)
</pre>
                        

                            <pre>  File "/Users/jingyuxiang/Desktop/code/python/SituApiSupport/case/RunTest.py", line 68, in test_case
    raise Exception('asdfasdfasdf')
</pre>
                        

                            <pre>Exception: asdfasdfasdf
</pre>
                        

                            <pre>2022-11-01 20:45:12,157 - root - INFO - ***************【纸质入件】接口测试开始***************
2022-11-01 20:45:12,158 - root - INFO - 接口测试用例为:{'id': 3.0, 'depend_id': 2.0, 'positive_case': '正向', 'desc': '纸质入件', 'uri': '/cl/order/hand/add', 'method': 'POST', 'headers': '{\n"Content-Type": "application/json",\n"X-Device-Num": "5f647684-f1f9-41ef-8775-921afe231592",\n"X-Auth-Token": "#2.token"\n}', 'params': '话术变量验证-test_case1', 'response_assert': '话术变量验证-test_case1', 'save_args': 'orderRecordId'}
2022-11-01 20:45:12,158 - root - INFO - 需要替换的变量信息为:['#2.token']
2022-11-01 20:45:12,159 - root - INFO - 可变参数的信息为:{'#2.token': '2ea7f946737d4f589f4b3f03206b8875'}
2022-11-01 20:45:12,159 - root - INFO - 可变参数替换完毕:{'Content-Type': 'application/json', 'X-Device-Num': '5f647684-f1f9-41ef-8775-921afe231592', 'X-Auth-Token': '2ea7f946737d4f589f4b3f03206b8875'}
2022-11-01 20:45:12,160 - root - INFO - 请求头为:{'Content-Type': 'application/json', 'X-Device-Num': '5f647684-f1f9-41ef-8775-921afe231592', 'X-Auth-Token': '2ea7f946737d4f589f4b3f03206b8875'}
2022-11-01 20:45:12,164 - root - INFO - 订单类型是一主一附
2022-11-01 20:45:12,171 - root - INFO - 话术变量参数自动生成成功!
2022-11-01 20:45:12,172 - root - INFO - 订单数据结构为{"订单基本信息":{"订单号":"test11111","保单类型":"非自保件","双录时间":"test_recordingTime","双录类型":"新契约","入件方式":"手工入件","创建时间":"test_createTime","保全识别码":"test_selfNo","保单号":"123","保全项":"1","渠道来源":"test_marketingChannel","机构名称":"test_organizationName","双录方式":"现场或远程","合作保司":"test_insuranceCompany","保司投保单号":"test_insuranceComPolicyNo","保单首年保费":"test_firstYearPrem","退保金":"test_firstYearValue","第一年退保金百分比":"test_firstYearValuePercent","首年保费":"test_firstYearPrem","第一年末现金价值":"test_firstYearCashValue","第二年末现金价值":"test_secondYearCashValue","第三年末现金价值":"test_thirdYearCashValue","是否隔代投保":"test_isAlternateGeneration","药无忧类别":"test_yaoWuYouType","直通30服务权益须知":"test_hasStraightThirty","高端健康管理服务权益须知":"test_hasHealthBank","孝无忧权益须知":"test_hasXiaoWuYou","医无忧权益须知":"test_hasYiWuYou","是否共展件":"test_isTogetherPolicy","销售人员与投保人关系":"test_selfRelation","是否含有ab照问卷":"test_abLicense","投保渠道":"test_systemSource","是否允许投保人远程":"test_applicantRemote","是否开启远程":"test_supportRemote","销售人员与投保人关系":"test_relation","双录时效":"test_recordingPrescription"},"销售人员信息":{"销售人员姓名":"测试销售人员姓名","销售人员工号":"test_employeeId","销售人员分公司名称":"test_branchName","销售人员支公司名称":"test_subBranchName","销售人员身份证件号":"test_identityNo","销售人员渠道":"test_marketingChannel","销售人员执业证号":"test_licensed","销售人员证件类型":"test_certType","第二代理人姓名":"test_secondAgentName","第二代理人所属机构名称":"test_secondAgentComName","第二代理人所属机构代码":"test_secondAgentComCode","销售人员中支公司名称":"test_centralBranch","销售人员所属机构名称":"test_directlyAgencyName","销售人员证件类型":"test_certType","公司代码":"test_companyCode","销售人员机构代码":"test_directlyAgencyCode","公司名称":"test_companyName","销售人员分公司代码":"test_branchCode","销售人员支公司代码":"test_subBranchCode","销售人员性别":"男","销售人员在职状态":"test_status","经代渠道":"test_channelCode","代理公司编码":"test_subCode"},"投保人信息":{"投保人姓名":"测试投保人","投保人性别":"男","投保人尊称":"test_honorific","投保人年龄":"27","投保人职业":"test_profession","投保人出生日期":"test_birth","投保人证件类型":"身份证","投保人证件号码":"410821199504142014","投保人通讯地址":"test_address","投保人电话号码":"test_mobile","投保人与被保人关系":"test_relation","风险测评得分":"test_riskScore"},"投保基本信息1":{"产品名称":"自动化主险","产品代码":"TESTMAIN","产品种类":"主险","缴费方式":"test_payType","缴费期限":"test_payPeriod","保险期限":"test_policyPeriod","首期缴费金额":"test_periodAmount","每期缴费金额":"test_periodAmount","保额":"test_sumAmount","退保金":"test_surrenderAmount","产品类型":"1","首年缴费金额":"test_totalAmountOfFirstYear","首年现金价值":"test_cashValueOfFirstYear","计划编码":"test_planCode","是否保证续保":"test_isRenewal","保证续保年限":"test_renewalYear","一年期险":"test_firstYearInsurance","第二年退保金额":"test_secondYearSurAmount","犹豫期  ":"test_hesitatePeriod","一次性初始费用":"test_disposableInitialCost","初始费用":"test_initialCost","最低保证利率":"test_minInterestRate","是否双录范围产品":"test_isRangeProducts","新增保障生效日期":"test_newEffectivedDate","等待期":"test_waitingPeriod","第二年末现金价值":"test_cashValueOfsecondYear","第二年退保金百分比":"test_secondYearSurAmountPercent","第二年末退保比例":"test_secondYearSurPercent","缴费频次":"test_payFrequency","首期缴费金额":"test_totalAmountOfFirst","保单首年保费":"test_firstYearPrem","被保人姓名":"被保人1","被保人性别":"男","被保人尊称":"test_honorific","被保人出生日期":"test_birth","被保人年龄":"test_age","被保人职业":"test_profession","被保人证件类型":"身份证","被保人证件号码":"120118199003073035","被保人电话号码":"test_mobile","被保人通讯地址":"test_address","被保人与投保人关系":"test_relation","被保人监护人姓名":"test_guardian","被保人监护人证件号码":"test_guardianNo","被保人监护人证件类型":"test_guardianCertType","监护人性别":"test_guardianGender","监护人尊称":"test_guardianHonorific"},"投保基本信息2":{"产品名称":"自动化附加险","产品代码":"TESTADD","产品种类":"附加险1","缴费方式":"test_payType","缴费期限":"test_payPeriod","保险期限":"test_policyPeriod","首期缴费金额":"test_periodAmount","每期缴费金额":"test_periodAmount","保额":"test_sumAmount","退保金":"test_surrenderAmount","产品类型":"2","首年缴费金额":"test_totalAmountOfFirstYear","首年现金价值":"test_cashValueOfFirstYear","计划编码":"test_planCode","是否保证续保":"test_isRenewal","保证续保年限":"test_renewalYear","一年期险":"test_firstYearInsurance","第二年退保金额":"test_secondYearSurAmount","犹豫期  ":"test_hesitatePeriod","一次性初始费用":"test_disposableInitialCost","初始费用":"test_initialCost","最低保证利率":"test_minInterestRate","是否双录范围产品":"test_isRangeProducts","新增保障生效日期":"test_newEffectivedDate","等待期":"test_waitingPeriod","第二年末现金价值":"test_cashValueOfsecondYear","第二年退保金百分比":"test_secondYearSurAmountPercent","第二年末退保比例":"test_secondYearSurPercent","缴费频次":"test_payFrequency","首期缴费金额":"test_totalAmountOfFirst","保单首年保费":"test_firstYearPrem","被保人姓名":"被保人2","被保人性别":"男","被保人尊称":"test_honorific","被保人出生日期":"test_birth","被保人年龄":"test_age","被保人职业":"test_profession","被保人证件类型":"身份证","被保人证件号码":"110105199005052832","被保人电话号码":"test_mobile","被保人通讯地址":"test_address","被保人与投保人关系":"test_relation","被保人监护人姓名":"test_guardian","被保人监护人证件号码":"test_guardianNo","被保人监护人证件类型":"test_guardianCertType","监护人性别":"test_guardianGender","监护人尊称":"test_guardianHonorific"}}
2022-11-01 20:45:12,173 - root - INFO - 请求参数为:{'order': {'identifier': 'test11111', 'policyType': '非自保件', 'recordingTime': 'test_recordingTime', 'recordType': '新契约', 'inputType': '手工入件', 'createTime': 'test_createTime', 'selfNo': 'test_selfNo', 'policyNo': '123', 'quotaItem': '1', 'marketingChannel': 'test_marketingChannel', 'organizationName': 'test_organizationName', 'systemType': '现场或远程', 'insuranceCompany': 'test_insuranceCompany', 'insuranceComPolicyNo': 'test_insuranceComPolicyNo', 'firstYearPrem': 'test_firstYearPrem', 'firstYearValue': 'test_firstYearValue', 'firstYearValuePercent': 'test_firstYearValuePercent', 'firstYearCashValue': 'test_firstYearCashValue', 'secondYearCashValue': 'test_secondYearCashValue', 'thirdYearCashValue': 'test_thirdYearCashValue', 'isAlternateGeneration': 'test_isAlternateGeneration', 'yaoWuYouType': 'test_yaoWuYouType', 'hasStraightThirty': 'test_hasStraightThirty', 'hasHealthBank': 'test_hasHealthBank', 'hasXiaoWuYou': 'test_hasXiaoWuYou', 'hasYiWuYou': 'test_hasYiWuYou', 'isTogetherPolicy': 'test_isTogetherPolicy', 'selfRelation': 'test_selfRelation', 'abLicense': 'test_abLicense', 'systemSource': 'test_systemSource', 'applicantRemote': 'test_applicantRemote', 'supportRemote': 'test_supportRemote', 'relation': 'test_relation', 'recordingPrescription': 'test_recordingPrescription'}, 'agent': {'name': '测试销售人员姓名', 'employeeId': 'test_employeeId', 'branchName': 'test_branchName', 'subBranchName': 'test_subBranchName', 'identityNo': 'test_identityNo', 'marketingChannel': 'test_marketingChannel', 'licensed': 'test_licensed', 'certType': 'test_certType', 'secondAgentName': 'test_secondAgentName', 'secondAgentComName': 'test_secondAgentComName', 'secondAgentComCode': 'test_secondAgentComCode', 'centralBranch': 'test_centralBranch', 'directlyAgencyName': 'test_directlyAgencyName', 'companyCode': 'test_companyCode', 'directlyAgencyCode': 'test_directlyAgencyCode', 'companyName': 'test_companyName', 'branchCode': 'test_branchCode', 'subBranchCode': 'test_subBranchCode', 'gender': '男', 'status': 'test_status', 'channelCode': 'test_channelCode', 'subCode': 'test_subCode'}, 'applicant': {'name': '测试投保人', 'gender': '男', 'honorific': 'test_honorific', 'age': '27', 'profession': 'test_profession', 'birth': 'test_birth', 'certType': '身份证', 'certNo': '410821199504142014', 'address': 'test_address', 'mobile': 'test_mobile', 'relation': 'test_relation', 'riskScore': 'test_riskScore'}, 'insurance': [{'mainInsurance': {'productName': '自动化主险', 'productCode': 'TESTMAIN', 'productCategory': '主险', 'payType': 'test_payType', 'payPeriod': 'test_payPeriod', 'policyPeriod': 'test_policyPeriod', 'periodAmount': 'test_periodAmount', 'sumAmount': 'test_sumAmount', 'surrenderAmount': 'test_surrenderAmount', 'productType': '1', 'totalAmountOfFirstYear': 'test_totalAmountOfFirstYear', 'cashValueOfFirstYear': 'test_cashValueOfFirstYear', 'planCode': 'test_planCode', 'isRenewal': 'test_isRenewal', 'renewalYear': 'test_renewalYear', 'firstYearInsurance': 'test_firstYearInsurance', 'secondYearSurAmount': 'test_secondYearSurAmount', 'hesitatePeriod': 'test_hesitatePeriod', 'disposableInitialCost': 'test_disposableInitialCost', 'initialCost': 'test_initialCost', 'minInterestRate': 'test_minInterestRate', 'isRangeProducts': 'test_isRangeProducts', 'newEffectivedDate': 'test_newEffectivedDate', 'waitingPeriod': 'test_waitingPeriod', 'cashValueOfsecondYear': 'test_cashValueOfsecondYear', 'secondYearSurAmountPercent': 'test_secondYearSurAmountPercent', 'secondYearSurPercent': 'test_secondYearSurPercent', 'payFrequency': 'test_payFrequency', 'totalAmountOfFirst': 'test_totalAmountOfFirst', 'firstYearPrem': 'test_firstYearPrem', 'insureds': [{'name': '被保人1', 'gender': '男', 'honorific': 'test_honorific', 'birth': 'test_birth', 'age': 'test_age', 'profession': 'test_profession', 'certType': '身份证', 'certNo': '120118199003073035', 'mobile': 'test_mobile', 'address': 'test_address', 'relation': 'test_relation', 'guardian': 'test_guardian', 'guardianNo': 'test_guardianNo', 'guardianCertType': 'test_guardianCertType', 'guardianGender': 'test_guardianGender', 'guardianHonorific': 'test_guardianHonorific'}]}, 'additionalInsurances': [{'productName': '自动化附加险', 'productCode': 'TESTADD', 'productCategory': '附加险1', 'payType': 'test_payType', 'payPeriod': 'test_payPeriod', 'policyPeriod': 'test_policyPeriod', 'periodAmount': 'test_periodAmount', 'sumAmount': 'test_sumAmount', 'surrenderAmount': 'test_surrenderAmount', 'productType': '2', 'totalAmountOfFirstYear': 'test_totalAmountOfFirstYear', 'cashValueOfFirstYear': 'test_cashValueOfFirstYear', 'planCode': 'test_planCode', 'isRenewal': 'test_isRenewal', 'renewalYear': 'test_renewalYear', 'firstYearInsurance': 'test_firstYearInsurance', 'secondYearSurAmount': 'test_secondYearSurAmount', 'hesitatePeriod': 'test_hesitatePeriod', 'disposableInitialCost': 'test_disposableInitialCost', 'initialCost': 'test_initialCost', 'minInterestRate': 'test_minInterestRate', 'isRangeProducts': 'test_isRangeProducts', 'newEffectivedDate': 'test_newEffectivedDate', 'waitingPeriod': 'test_waitingPeriod', 'cashValueOfsecondYear': 'test_cashValueOfsecondYear', 'secondYearSurAmountPercent': 'test_secondYearSurAmountPercent', 'secondYearSurPercent': 'test_secondYearSurPercent', 'payFrequency': 'test_payFrequency', 'totalAmountOfFirst': 'test_totalAmountOfFirst', 'firstYearPrem': 'test_firstYearPrem', 'insureds': [{'name': '被保人2', 'gender': '男', 'honorific': 'test_honorific', 'birth': 'test_birth', 'age': 'test_age', 'profession': 'test_profession', 'certType': '身份证', 'certNo': '110105199005052832', 'mobile': 'test_mobile', 'address': 'test_address', 'relation': 'test_relation', 'guardian': 'test_guardian', 'guardianNo': 'test_guardianNo', 'guardianCertType': 'test_guardianCertType', 'guardianGender': 'test_guardianGender', 'guardianHonorific': 'test_guardianHonorific'}]}]}]}
2022-11-01 20:45:14,278 - root - INFO - 接口测试结果为:{'code': 0, 'msg': 'OK', 'success': True, 'result': {'orderRecordId': 161, 'exist': 1, 'customerName': '测试投保人', 'productName': '自动化主险', 'orderId': 'test11111', 'serialNo': 'test11111', 'createTime': '2022-11-01 20:45:13', 'orderNoType': 2, 'appntAge': '27', 'supportRemote': 1, 'systemType': 2147483647, 'applicantRemoteFlag': 2147483647, 'manyInsuresFlag': 1, 'samePerson': 2, 'samePersonForInsured': 2, 'samePersonForAppnt': 2, 'sameCameraCount': 3, 'positioning': 3, 'area': 2, 'range': '浙江省-宁波市', 'policyNo': '', 'orderType': 1, 'selfNo': '', 'systemSource': '', 'orderSource': 2, 'quotaType': '', 'confirmReplaceOrder': True, 'orderMetaChanged': 0}}
False
/cl/order/hand/add (RunTest.DDTTest)执行——>【错误Error】
</pre>
                        
                        
                    </td>
                </tr>
            

            </tbody>
        </table>
    </div>

    <div style="height: 200px"></div>
</div>

<script src="https://cdn.jsdelivr.net/npm/jquery@3.5.1/dist/jquery.slim.min.js"
        integrity="sha384-DfXdz2htPH0lsSSs5nCTpuj/zy4C+OGpamoFVy38MVBnE+IbbVYUew+OrCXaRkfj"
        crossorigin="anonymous"></script>
<script type="text/javascript" src="https://cdn.jsdelivr.net/npm/echarts/dist/echarts.min.js"></script>

<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-danger').show()

            } else if (res === '错误') {
                tbodyTr.hide();
                tbodyTr.has('button').has('.text-warning').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-danger').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-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: 2, name: '通过'},
                    {value: 0, name: '失败'},
                    {value: 1, name: '错误'},
                    {value: 0, name: '跳过'}
                ]
            }
        ]
    };
    option2 = {
        tooltip: {
            formatter: '{a} <br/>{b} : {c}%'
        },
        toolbox: {
            feature: {
                restore: {},
                saveAsImage: {}
            }
        },
        series: [
            {
                name: '测试结果',
                type: 'gauge',
                detail: {formatter: '66.67%'},
                data: [{value: '66.67', name: '用例通过率'}],
                axisLine: {
                    lineStyle: {
                        color: [
                            [0.2, '#c20000'],
                            [0.8, '#ddb518'],
                            [1, '#00a10a']]
                    }
                }
            }
        ]
    };


    myChart2.setOption(option2);
    // 使用刚指定的配置项和数据显示图表。
    myChart.setOption(option);
</script>


</body>
</html>