在编写httprunner脚本时遇到如下报错:
2022-10-29 21:15:41.661 | ERROR | httprunner.client:request:214 - ('Connection aborted.', RemoteDisconnected('Remote end closed connection without response'))
在查找解决方法过程中发现添加如下代码可以解决问题:
.with_json({
"css": "\n#x61108f231be6649089df9796bc4bcb22 .panel {\n\tpadding: 0;\n}\n\n#x61108f231be6649089df9796bc4bcb22 .panel-heading .panel-title {\n\tfont-size: 32px;\n\tfont-weight: 300;\n}\n\n#x61108f231be6649089df9796bc4bcb22 .table > thead:first-child > tr:first-child > th {\n\tborder-left: 0;\n}\n\n#x61108f231be6649089df9796bc4bcb22 .panel-heading .dropdown-toggle {\n\tdisplay: none;\n}",
"color": "default",
"show_keywords": "true",
"roles": "public",
"sp_column_dv": "",
"sp_column": "a9f394611b566c1048c6ed7bbc4bcba2",
"sp_page": "rmd_form",
"title": "Robocall Mitigation Database",
"enable_filter": "false",
"sys_class_name": "sp_instance_table",
"size_dv": "Medium",
"window_size": "8",
"view": "service_portal",
"hide_header": False,
"sys_name": "Robocall Mitigation Database",
"show_breadcrumbs": False,
"table": "x_g_fmc_rmd_robocall_mitigation_database",
"sp_widget": "75af76231be6649089df9796bc4bcbdd",
"order": -1,
"sys_class_name_dv": "Instance with Table",
"d": "desc",
"widget_parameters": "{\n\t\"show_keywords\": {\n\t\t\"value\": \"true\",\n\t\t\"displayValue\": \"true\"\n\t},\n\t\"allow_link\": {\n\t\t\"value\": \"true\",\n\t\t\"displayValue\": \"true\"\n\t},\n\t\"view\": {\n\t\t\"value\": \"service_portal\",\n\t\t\"displayValue\": \"service_portal\"\n\t},\n\t\"show_attachment_link\": {\n\t\t\"value\": \"true\",\n\t\t\"displayValue\": \"true\"\n\t},\n\t\"show_breadcrumbs\": {\n\t\t\"value\":False,\n\t\t\"displayValue\": false\n\t},\n\t\"hide_header\": {\n\t\t\"value\": false,\n\t\t\"displayValue\": false\n\t}\n}",
"active": False,
"color_dv": "Default",
"order_direction": "desc",
"display_field": "business_address",
"sys_tags": "",
"o": "sys_updated_on",
"filter": "status=Published^EQ",
"maximum_entries": 8,
"allow_link": "true",
"sp_widget_dv": "",
"size": "md",
"show_attachment_link": "true",
"sp_page_dv": "rmd_form",
"order_by": "sys_updated_on",
"fields": "",
"order_direction_dv": "Descending",
"headerTitle": "Robocall Mitigation Database"
})