{"id":147,"date":"2026-05-28T13:51:39","date_gmt":"2026-05-28T05:51:39","guid":{"rendered":"https:\/\/www.deartester.com\/index.php\/2026\/05\/28\/%e5%be%ae%e6%9c%8d%e5%8a%a1%e6%8e%a5%e5%8f%a3%e6%b5%8b%e8%af%95%e5%ae%9e%e6%88%98%ef%bc%9a%e4%bb%8e%e5%a5%91%e7%ba%a6%e6%b5%8b%e8%af%95%e5%88%b0%e5%85%a8%e9%93%be%e8%b7%af%e9%aa%8c%e8%af%81\/"},"modified":"2026-09-03T23:17:52","modified_gmt":"2026-09-03T15:17:52","slug":"%e5%be%ae%e6%9c%8d%e5%8a%a1%e6%8e%a5%e5%8f%a3%e6%b5%8b%e8%af%95%e5%ae%9e%e6%88%98%ef%bc%9a%e4%bb%8e%e5%a5%91%e7%ba%a6%e6%b5%8b%e8%af%95%e5%88%b0%e5%85%a8%e9%93%be%e8%b7%af%e9%aa%8c%e8%af%81","status":"publish","type":"post","link":"https:\/\/www.deartester.com\/index.php\/2026\/05\/28\/%e5%be%ae%e6%9c%8d%e5%8a%a1%e6%8e%a5%e5%8f%a3%e6%b5%8b%e8%af%95%e5%ae%9e%e6%88%98%ef%bc%9a%e4%bb%8e%e5%a5%91%e7%ba%a6%e6%b5%8b%e8%af%95%e5%88%b0%e5%85%a8%e9%93%be%e8%b7%af%e9%aa%8c%e8%af%81\/","title":{"rendered":"\u5fae\u670d\u52a1\u63a5\u53e3\u6d4b\u8bd5\u5b9e\u6218\uff1a\u4ece\u5951\u7ea6\u6d4b\u8bd5\u5230\u5168\u94fe\u8def\u9a8c\u8bc1"},"content":{"rendered":"<table>\n<tbody>\n<tr>\n<td data-colwidth=\"576\">\n<section><span style=\"color: rgb(21, 101, 192);font-family: -apple-system, BlinkMacSystemFont, &quot;Segoe UI&quot;, &quot;PingFang SC&quot;, &quot;Hiragino Sans GB&quot;, &quot;Microsoft YaHei&quot;, sans-serif;font-size: 16px;font-style: normal;font-variant-ligatures: normal;font-variant-caps: normal;font-weight: 500;letter-spacing: normal;orphans: 2;text-align: start;text-indent: 0px;text-transform: none;widows: 2;word-spacing: 0px;-webkit-text-stroke-width: 0px;background-color: rgb(255, 255, 255);text-decoration-thickness: initial;text-decoration-style: initial;text-decoration-color: initial;display: inline !important;float: none;\" data-pm-slice=\"0 0 []\"><span leaf=\"\">\ud83d\udca1 \u5bfc\u8bfb\uff1a\u4ece\u5355\u4f53\u5e94\u7528\u5230\u5fae\u670d\u52a1\u67b6\u6784\uff0c\u4e0d\u4ec5\u662f\u6280\u672f\u6808\u7684\u53d8\u9769\uff0c\u66f4\u662f\u6d4b\u8bd5\u601d\u7ef4\u7684\u98a0\u8986\u3002\u5f53\u670d\u52a1\u6570\u91cf\u4ece1\u53d8\u6210N\uff0c\u6d4b\u8bd5\u7684\u96be\u5ea6\u4e0d\u662f\u7ebf\u6027\u589e\u957f\uff0c\u800c\u662f\u6307\u6570\u7ea7\u4e0a\u5347\u3002<\/span><\/span><\/section>\n<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p style=\"color: rgb(51, 51, 51);font-family: -apple-system, BlinkMacSystemFont, &quot;Segoe UI&quot;, &quot;PingFang SC&quot;, &quot;Hiragino Sans GB&quot;, &quot;Microsoft YaHei&quot;, sans-serif;font-size: 16px;font-style: normal;font-variant-ligatures: normal;font-variant-caps: normal;font-weight: 400;letter-spacing: normal;orphans: 2;text-align: start;text-indent: 0px;text-transform: none;widows: 2;word-spacing: 0px;-webkit-text-stroke-width: 0px;white-space: normal;text-decoration-thickness: initial;text-decoration-style: initial;text-decoration-color: initial;margin-bottom: 20px;\" data-pm-slice=\"0 0 []\"><span leaf=\"\">\u8fd8\u8bb0\u5f97\u5355\u4f53\u5e94\u7528\u65f6\u4ee3\u5417\uff1f\u6240\u6709\u529f\u80fd\u6a21\u5757\u6253\u5305\u5728\u4e00\u4e2a\u5e9e\u5927\u7684WAR\u5305\u91cc\uff0c\u6d4b\u8bd5\u56e2\u961f\u53ea\u9700\u8981\u90e8\u7f72\u4e00\u6b21\uff0c\u5c31\u80fd\u8986\u76d6\u7edd\u5927\u90e8\u5206\u529f\u80fd\u9a8c\u8bc1\u3002\u90a3\u65f6\u5019\u7684\u6d4b\u8bd5\u7b56\u7565\u7b80\u5355\u76f4\u63a5\uff1a\u5355\u5143\u6d4b\u8bd5 \u2192 \u96c6\u6210\u6d4b\u8bd5 \u2192 \u7cfb\u7edf\u6d4b\u8bd5\uff0c\u4e00\u6761\u9f99\u670d\u52a1\u3002<\/span><\/p>\n<p style=\"color: rgb(51, 51, 51);font-family: -apple-system, BlinkMacSystemFont, &quot;Segoe UI&quot;, &quot;PingFang SC&quot;, &quot;Hiragino Sans GB&quot;, &quot;Microsoft YaHei&quot;, sans-serif;font-size: 16px;font-style: normal;font-variant-ligatures: normal;font-variant-caps: normal;font-weight: 400;letter-spacing: normal;orphans: 2;text-align: start;text-indent: 0px;text-transform: none;widows: 2;word-spacing: 0px;-webkit-text-stroke-width: 0px;white-space: normal;text-decoration-thickness: initial;text-decoration-style: initial;text-decoration-color: initial;margin-bottom: 20px;\"><span leaf=\"\"><span textstyle=\"\" style=\"font-weight: bold;\">\u4f46\u5fae\u670d\u52a1\u6765\u4e86~<\/span><\/span><\/p>\n<p style=\"color: rgb(51, 51, 51);font-family: -apple-system, BlinkMacSystemFont, &quot;Segoe UI&quot;, &quot;PingFang SC&quot;, &quot;Hiragino Sans GB&quot;, &quot;Microsoft YaHei&quot;, sans-serif;font-size: 16px;font-style: normal;font-variant-ligatures: normal;font-variant-caps: normal;font-weight: 400;letter-spacing: normal;orphans: 2;text-align: start;text-indent: 0px;text-transform: none;widows: 2;word-spacing: 0px;-webkit-text-stroke-width: 0px;white-space: normal;text-decoration-thickness: initial;text-decoration-style: initial;text-decoration-color: initial;margin-bottom: 20px;\"><span leaf=\"\">\u4e00\u4e2a\u7535\u5546\u7cfb\u7edf\u88ab\u62c6\u6210\u4e86\u7528\u6237\u670d\u52a1\u3001\u5546\u54c1\u670d\u52a1\u3001\u8ba2\u5355\u670d\u52a1\u3001\u652f\u4ed8\u670d\u52a1\u3001\u5e93\u5b58\u670d\u52a1\u3001\u63a8\u8350\u670d\u52a1\u2026\u2026\u5c11\u5219\u5341\u51e0\u4e2a\uff0c\u591a\u5219\u4e0a\u767e\u4e2a\u5fae\u670d\u52a1\u3002\u6bcf\u4e2a\u670d\u52a1\u72ec\u7acb\u90e8\u7f72\u3001\u72ec\u7acb\u8fed\u4ee3\u3001\u72ec\u7acb\u6269\u5bb9\u3002\u542c\u8d77\u6765\u5f88\u7f8e\u597d\uff0c\u5bf9\u5427\uff1f<\/span><\/p>\n<p style=\"color: rgb(51, 51, 51);font-family: -apple-system, BlinkMacSystemFont, &quot;Segoe UI&quot;, &quot;PingFang SC&quot;, &quot;Hiragino Sans GB&quot;, &quot;Microsoft YaHei&quot;, sans-serif;font-size: 16px;font-style: normal;font-variant-ligatures: normal;font-variant-caps: normal;font-weight: 400;letter-spacing: normal;orphans: 2;text-align: start;text-indent: 0px;text-transform: none;widows: 2;word-spacing: 0px;-webkit-text-stroke-width: 0px;white-space: normal;text-decoration-thickness: initial;text-decoration-style: initial;text-decoration-color: initial;margin-bottom: 30px;\"><span leaf=\"\">\u73b0\u5b9e\u662f\uff1a<\/span><strong style=\"color: rgb(211, 47, 47);\"><span leaf=\"\">\u6d4b\u8bd5\u56e2\u961f\u5d29\u6e83\u4e86<\/span><\/strong><span leaf=\"\">\u3002<\/span><\/p>\n<p style=\"color: rgb(51, 51, 51);font-family: -apple-system, BlinkMacSystemFont, &quot;Segoe UI&quot;, &quot;PingFang SC&quot;, &quot;Hiragino Sans GB&quot;, &quot;Microsoft YaHei&quot;, sans-serif;font-size: 16px;font-style: normal;font-variant-ligatures: normal;font-variant-caps: normal;font-weight: 400;letter-spacing: normal;orphans: 2;text-align: start;text-indent: 0px;text-transform: none;widows: 2;word-spacing: 0px;-webkit-text-stroke-width: 0px;white-space: normal;text-decoration-thickness: initial;text-decoration-style: initial;text-decoration-color: initial;margin-bottom: 20px;\"><span leaf=\"\">\u539f\u672c\u7684\u4e00\u6b21\u6027\u9a8c\u8bc1\uff0c\u73b0\u5728\u9700\u8981\u534f\u8c03\u5341\u51e0\u4e2a\u670d\u52a1\u7684\u7248\u672c\u517c\u5bb9\u6027\uff1b\u539f\u672c\u7684\u7aef\u5230\u7aef\u6d4b\u8bd5\uff0c\u73b0\u5728\u8981\u9762\u5bf9\u590d\u6742\u7684\u670d\u52a1\u95f4\u8c03\u7528\u94fe\uff1b\u539f\u672c\u7684\u6570\u636e\u5e93\u76f4\u63a5\u9a8c\u8bc1\uff0c\u73b0\u5728\u53d8\u6210\u4e86Mock\u6570\u636e\u548c\u5951\u7ea6\u9a8c\u8bc1\u7684\u6e38\u620f\u3002<\/span><\/p>\n<p style=\"color: rgb(51, 51, 51);font-family: -apple-system, BlinkMacSystemFont, &quot;Segoe UI&quot;, &quot;PingFang SC&quot;, &quot;Hiragino Sans GB&quot;, &quot;Microsoft YaHei&quot;, sans-serif;font-size: 16px;font-style: normal;font-variant-ligatures: normal;font-variant-caps: normal;font-weight: 400;letter-spacing: normal;orphans: 2;text-align: start;text-indent: 0px;text-transform: none;widows: 2;word-spacing: 0px;-webkit-text-stroke-width: 0px;white-space: normal;text-decoration-thickness: initial;text-decoration-style: initial;text-decoration-color: initial;margin-bottom: 30px;\"><span leaf=\"\">\u8fd9\u7bc7\u6587\u7ae0\uff0c\u6211\u4f1a\u4ece\u5b9e\u6218\u89d2\u5ea6\uff0c\u7cfb\u7edf\u8bb2\u89e3\u5fae\u670d\u52a1\u67b6\u6784\u4e0b\u7684\u6d4b\u8bd5\u7b56\u7565\u2014\u2014\u4ece\u5951\u7ea6\u6d4b\u8bd5\u5230\u5168\u94fe\u8def\u9a8c\u8bc1\uff0c\u4eceMock\u7b56\u7565\u5230\u6df7\u6c8c\u5de5\u7a0b\uff0c\u5e26\u4f60\u6784\u5efa\u4e00\u5957\u5b8c\u6574\u7684\u5fae\u670d\u52a1\u6d4b\u8bd5\u4f53\u7cfb\u3002<\/span><\/p>\n<p style=\"color: rgb(51, 51, 51);font-family: -apple-system, BlinkMacSystemFont, &quot;Segoe UI&quot;, &quot;PingFang SC&quot;, &quot;Hiragino Sans GB&quot;, &quot;Microsoft YaHei&quot;, sans-serif;font-size: 16px;font-style: normal;font-variant-ligatures: normal;font-variant-caps: normal;font-weight: 400;letter-spacing: normal;orphans: 2;text-align: start;text-indent: 0px;text-transform: none;widows: 2;word-spacing: 0px;-webkit-text-stroke-width: 0px;white-space: normal;text-decoration-thickness: initial;text-decoration-style: initial;text-decoration-color: initial;margin-bottom: 30px;\"><span leaf=\"\"><br  \/><\/span><\/p>\n<hr style=\"border-style: solid;border-width: 1px 0 0;border-color: rgba(0,0,0,0.1);-webkit-transform-origin: 0 0;-webkit-transform: scale(1, 0.5);transform-origin: 0 0;transform: scale(1, 0.5);\"  \/>\n<p style=\"color: rgb(51, 51, 51);font-family: -apple-system, BlinkMacSystemFont, &quot;Segoe UI&quot;, &quot;PingFang SC&quot;, &quot;Hiragino Sans GB&quot;, &quot;Microsoft YaHei&quot;, sans-serif;font-size: 16px;font-style: normal;font-variant-ligatures: normal;font-variant-caps: normal;font-weight: 400;letter-spacing: normal;orphans: 2;text-align: start;text-indent: 0px;text-transform: none;widows: 2;word-spacing: 0px;-webkit-text-stroke-width: 0px;white-space: normal;text-decoration-thickness: initial;text-decoration-style: initial;text-decoration-color: initial;margin-bottom: 30px;\"><span leaf=\"\"><br  \/><\/span><\/p>\n<h2 style=\"font-family: -apple-system, BlinkMacSystemFont, &quot;Segoe UI&quot;, &quot;PingFang SC&quot;, &quot;Hiragino Sans GB&quot;, &quot;Microsoft YaHei&quot;, sans-serif;font-style: normal;font-variant-ligatures: normal;font-variant-caps: normal;letter-spacing: normal;orphans: 2;text-align: start;text-indent: 0px;text-transform: none;widows: 2;word-spacing: 0px;-webkit-text-stroke-width: 0px;white-space: normal;text-decoration-thickness: initial;text-decoration-style: initial;text-decoration-color: initial;font-size: 24px;font-weight: bold;color: rgb(25, 118, 210);margin-top: 40px;margin-bottom: 20px;padding-bottom: 10px;border-bottom: 3px solid rgb(25, 118, 210);\"><span leaf=\"\">\u4e00\u3001\u5fae\u670d\u52a1\u6d4b\u8bd5\u7684\u6311\u6218\u4e0e\u7b56\u7565<\/span><\/h2>\n<h3 style=\"color: rgb(51, 51, 51);font-family: -apple-system, BlinkMacSystemFont, &quot;Segoe UI&quot;, &quot;PingFang SC&quot;, &quot;Hiragino Sans GB&quot;, &quot;Microsoft YaHei&quot;, sans-serif;font-style: normal;font-variant-ligatures: normal;font-variant-caps: normal;letter-spacing: normal;orphans: 2;text-align: start;text-indent: 0px;text-transform: none;widows: 2;word-spacing: 0px;-webkit-text-stroke-width: 0px;white-space: normal;text-decoration-thickness: initial;text-decoration-style: initial;text-decoration-color: initial;font-size: 20px;font-weight: 600;margin-top: 30px;margin-bottom: 15px;\"><span leaf=\"\">1.1 \u5fae\u670d\u52a1\u6d4b\u8bd5\u91d1\u5b57\u5854<\/span><\/h3>\n<p style=\"color: rgb(51, 51, 51);font-family: -apple-system, BlinkMacSystemFont, &quot;Segoe UI&quot;, &quot;PingFang SC&quot;, &quot;Hiragino Sans GB&quot;, &quot;Microsoft YaHei&quot;, sans-serif;font-size: 16px;font-style: normal;font-variant-ligatures: normal;font-variant-caps: normal;font-weight: 400;letter-spacing: normal;orphans: 2;text-align: start;text-indent: 0px;text-transform: none;widows: 2;word-spacing: 0px;-webkit-text-stroke-width: 0px;white-space: normal;text-decoration-thickness: initial;text-decoration-style: initial;text-decoration-color: initial;margin-bottom: 20px;\"><span leaf=\"\">\u4f20\u7edf\u7684\u6d4b\u8bd5\u91d1\u5b57\u5854\u5728\u5fae\u670d\u52a1\u67b6\u6784\u4e0b\u4f9d\u7136\u9002\u7528\uff0c\u4f46\u6bcf\u4e00\u5c42\u7684\u542b\u4e49\u548c\u5b9e\u73b0\u65b9\u5f0f\u90fd\u53d1\u751f\u4e86\u53d8\u5316\u3002\u6b63\u786e\u7684\u6d4b\u8bd5\u91d1\u5b57\u5854\u5e94\u8be5\u662f\uff1a<\/span><\/p>\n<section style=\"text-align: center;\" nodeleaf=\"\">\n<figure class=\"wx-qr-wrap\"><img decoding=\"async\" class=\"rich_pages wxw-img\" data-aistatus=\"1\" data-imgfileid=\"100000372\" data-s=\"300,640\" data-type=\"png\" type=\"block\" src=\"https:\/\/mmbiz.qpic.cn\/sz_mmbiz_png\/BWmfcibGhS1IJSicSyLFa8ERFId9YSyic6icibea4oxfEDXgrwUnk2OUpWqWYedSrFdfeaOOMDkODGdswAU6PDollBeRXWBAOTk0riaHl6XnZBw4U\/640?wx_fmt=png&#038;from=appmsg\" \/><figcaption class=\"wx-qr-tip\"><img decoding=\"async\" src=\"https:\/\/www.deartester.com\/wp-content\/uploads\/2026\/09\/wechat-qr.jpg\" alt=\"\u5fae\u4fe1\u516c\u4f17\u53f7\u4e8c\u7ef4\u7801\" loading=\"lazy\"><span>\u56fe\u7247\u5f15\u81ea\u5fae\u4fe1\u516c\u4f17\u53f7\uff0c\u626b\u7801\u5173\u6ce8\u9605\u8bfb\u539f\u6587<\/span><\/figcaption><\/figure>\n<\/section>\n<p style=\"color: rgb(51, 51, 51);font-family: -apple-system, BlinkMacSystemFont, &quot;Segoe UI&quot;, &quot;PingFang SC&quot;, &quot;Hiragino Sans GB&quot;, &quot;Microsoft YaHei&quot;, sans-serif;font-size: 16px;font-style: normal;font-variant-ligatures: normal;font-variant-caps: normal;font-weight: 400;letter-spacing: normal;orphans: 2;text-align: start;text-indent: 0px;text-transform: none;widows: 2;word-spacing: 0px;-webkit-text-stroke-width: 0px;white-space: normal;text-decoration-thickness: initial;text-decoration-style: initial;text-decoration-color: initial;margin-bottom: 15px;\" data-pm-slice=\"0 0 []\"><strong><span leaf=\"\">\u5173\u952e\u53d8\u5316\uff1a<\/span><\/strong><\/p>\n<ul style=\"color: rgb(51, 51, 51);font-family: -apple-system, BlinkMacSystemFont, &quot;Segoe UI&quot;, &quot;PingFang SC&quot;, &quot;Hiragino Sans GB&quot;, &quot;Microsoft YaHei&quot;, sans-serif;font-size: 16px;font-style: normal;font-variant-ligatures: normal;font-variant-caps: normal;font-weight: 400;letter-spacing: normal;orphans: 2;text-align: start;text-indent: 0px;text-transform: none;widows: 2;word-spacing: 0px;-webkit-text-stroke-width: 0px;white-space: normal;text-decoration-thickness: initial;text-decoration-style: initial;text-decoration-color: initial;line-height: 2;margin-bottom: 25px;padding-left: 25px;\" class=\"list-paddingleft-1\">\n<li style=\"margin-bottom: 8px;\"><strong><span leaf=\"\">\u5355\u5143\u6d4b\u8bd5<\/span><\/strong><br \/>\n<section><span leaf=\"\">\uff1a\u4f9d\u7136\u662f\u6700\u5e95\u5c42\u3001\u6700\u5927\u91cf\u7684\u6d4b\u8bd5\uff0c\u4f46\u5173\u6ce8\u7684\u662f\u5355\u4e2a\u670d\u52a1\u5185\u90e8\u7684\u903b\u8f91<\/span><\/section>\n<\/li>\n<li style=\"margin-bottom: 8px;\"><strong><span leaf=\"\">\u96c6\u6210\u6d4b\u8bd5<\/span><\/strong><br \/>\n<section><span leaf=\"\">\uff1a\u5728\u5fae\u670d\u52a1\u4e2d\u6f14\u53d8\u4e3a<\/span><strong><span leaf=\"\">\u5951\u7ea6\u6d4b\u8bd5<\/span><\/strong><span leaf=\"\">\u548c<\/span><strong><span leaf=\"\">API\u63a5\u53e3\u6d4b\u8bd5<\/span><\/strong><span leaf=\"\">\uff0c\u9a8c\u8bc1\u670d\u52a1\u95f4\u7684\u63a5\u53e3\u5951\u7ea6<\/span><\/section>\n<\/li>\n<li style=\"margin-bottom: 8px;\"><strong><span leaf=\"\">\u7ec4\u4ef6\u6d4b\u8bd5<\/span><\/strong><br \/>\n<section><span leaf=\"\">\uff1a\u65b0\u589e\u7684\u6982\u5ff5\uff0c\u6d4b\u8bd5\u5355\u4e2a\u5fae\u670d\u52a1\u4e0e\u5176\u4f9d\u8d56\u7684\u9694\u79bb\u6d4b\u8bd5\uff08\u4f7f\u7528Mock\/Stub\uff09<\/span><\/section>\n<\/li>\n<li style=\"margin-bottom: 8px;\"><strong><span leaf=\"\">\u7aef\u5230\u7aef\u6d4b\u8bd5<\/span><\/strong><br \/>\n<section><span leaf=\"\">\uff1a\u4f9d\u7136\u91cd\u8981\uff0c\u4f46\u6267\u884c\u6210\u672c\u9ad8\uff0c\u5e94\u8be5\u7cbe\u7b80\u6570\u91cf<\/span><\/section>\n<\/li>\n<li style=\"margin-bottom: 8px;\"><strong><span leaf=\"\">\u63a2\u7d22\u6027\u6d4b\u8bd5<\/span><\/strong><br \/>\n<section><span leaf=\"\">\uff1a\u9876\u5c42\uff0c\u4eba\u5de5\u6216\u81ea\u52a8\u5316\u63a2\u7d22\u7cfb\u7edf\u8fb9\u754c<\/span><\/section>\n<\/li>\n<\/ul>\n<h3 style=\"color: rgb(51, 51, 51);font-family: -apple-system, BlinkMacSystemFont, &quot;Segoe UI&quot;, &quot;PingFang SC&quot;, &quot;Hiragino Sans GB&quot;, &quot;Microsoft YaHei&quot;, sans-serif;font-style: normal;font-variant-ligatures: normal;font-variant-caps: normal;letter-spacing: normal;orphans: 2;text-align: start;text-indent: 0px;text-transform: none;widows: 2;word-spacing: 0px;-webkit-text-stroke-width: 0px;white-space: normal;text-decoration-thickness: initial;text-decoration-style: initial;text-decoration-color: initial;font-size: 20px;font-weight: 600;margin-top: 30px;margin-bottom: 15px;\"><span leaf=\"\">1.2 \u5fae\u670d\u52a1 vs \u5355\u4f53\uff1a\u6d4b\u8bd5\u5bf9\u6bd4<\/span><\/h3>\n<table style=\"width: 800px;border-collapse: collapse;border: 1px solid rgb(222, 226, 230);font-size: 14px;\">\n<thead>\n<tr style=\"background: linear-gradient(135deg, rgb(52, 152, 219), rgb(41, 128, 185));color: rgb(255, 255, 255);\">\n<th style=\"padding: 14px 16px;text-align: left;font-weight: 600;border: 1px solid rgb(41, 128, 185);\">\n<section style=\"text-align: center;\"><span leaf=\"\"><span textstyle=\"\" style=\"font-size: 15px;color: #ffa900;\">\u5bf9\u6bd4\u7ef4\u5ea6<\/span><\/span><\/section>\n<\/th>\n<th style=\"padding: 14px 16px;text-align: left;font-weight: 600;border: 1px solid rgb(41, 128, 185);\">\n<section style=\"text-align: center;\"><span leaf=\"\"><span textstyle=\"\" style=\"font-size: 15px;color: #ffa900;\">\u5355\u4f53\u5e94\u7528\u6d4b\u8bd5<\/span><\/span><\/section>\n<\/th>\n<th style=\"padding: 14px 16px;text-align: left;font-weight: 600;border: 1px solid rgb(41, 128, 185);\">\n<section style=\"text-align: center;\"><span leaf=\"\"><span textstyle=\"\" style=\"font-size: 15px;color: #ffa900;\">\u5fae\u670d\u52a1\u6d4b\u8bd5<\/span><\/span><\/section>\n<\/th>\n<\/tr>\n<\/thead>\n<tbody>\n<tr style=\"background-color: rgb(248, 249, 250);\">\n<td style=\"padding: 12px 16px;border: 1px solid rgb(222, 226, 230);font-weight: 500;\">\n<section style=\"text-align: center;\"><span leaf=\"\">\u6d4b\u8bd5\u5bf9\u8c61<\/span><\/section>\n<\/td>\n<td style=\"padding: 12px 16px;border: 1px solid rgb(222, 226, 230);\">\n<section style=\"text-align: center;\"><span leaf=\"\">\u6574\u4e2a\u5e94\u7528<\/span><\/section>\n<\/td>\n<td style=\"padding: 12px 16px;border: 1px solid rgb(222, 226, 230);\">\n<section><span leaf=\"\">\u5355\u4e2a\u670d\u52a1 + \u670d\u52a1\u95f4\u4ea4\u4e92<\/span><\/section>\n<\/td>\n<\/tr>\n<tr style=\"background-color: rgb(255, 255, 255);\">\n<td style=\"padding: 12px 16px;border: 1px solid rgb(222, 226, 230);font-weight: 500;\">\n<section style=\"text-align: center;\"><span leaf=\"\">\u73af\u5883\u642d\u5efa<\/span><\/section>\n<\/td>\n<td style=\"padding: 12px 16px;border: 1px solid rgb(222, 226, 230);\">\n<section style=\"text-align: center;\"><span leaf=\"\">\u4e00\u6b21\u90e8\u7f72\u5373\u53ef<\/span><\/section>\n<\/td>\n<td style=\"padding: 12px 16px;border: 1px solid rgb(222, 226, 230);\">\n<section><span leaf=\"\">\u9700\u8981\u542f\u52a8\u591a\u4e2a\u670d\u52a1\uff08\u6216Mock\uff09<\/span><\/section>\n<\/td>\n<\/tr>\n<tr style=\"background-color: rgb(248, 249, 250);\">\n<td style=\"padding: 12px 16px;border: 1px solid rgb(222, 226, 230);font-weight: 500;\">\n<section style=\"text-align: center;\"><span leaf=\"\">\u6570\u636e\u4e00\u81f4\u6027<\/span><\/section>\n<\/td>\n<td style=\"padding: 12px 16px;border: 1px solid rgb(222, 226, 230);\">\n<section style=\"text-align: center;\"><span leaf=\"\">\u672c\u5730\u4e8b\u52a1\uff0c\u6613\u9a8c\u8bc1<\/span><\/section>\n<\/td>\n<td style=\"padding: 12px 16px;border: 1px solid rgb(222, 226, 230);\">\n<section><span leaf=\"\">\u5206\u5e03\u5f0f\u4e8b\u52a1\uff0c\u6700\u7ec8\u4e00\u81f4\u6027<\/span><\/section>\n<\/td>\n<\/tr>\n<tr style=\"background-color: rgb(255, 255, 255);\">\n<td style=\"padding: 12px 16px;border: 1px solid rgb(222, 226, 230);font-weight: 500;\">\n<section style=\"text-align: center;\"><span leaf=\"\">\u63a5\u53e3\u6d4b\u8bd5<\/span><\/section>\n<\/td>\n<td style=\"padding: 12px 16px;border: 1px solid rgb(222, 226, 230);\">\n<section style=\"text-align: center;\"><span leaf=\"\">\u5185\u90e8\u65b9\u6cd5\u8c03\u7528<\/span><\/section>\n<\/td>\n<td style=\"padding: 12px 16px;border: 1px solid rgb(222, 226, 230);\">\n<section><span leaf=\"\">HTTP\/RPC\u63a5\u53e3\uff0c\u9700\u5951\u7ea6\u6d4b\u8bd5<\/span><\/section>\n<\/td>\n<\/tr>\n<tr style=\"background-color: rgb(248, 249, 250);\">\n<td style=\"padding: 12px 16px;border: 1px solid rgb(222, 226, 230);font-weight: 500;\">\n<section style=\"text-align: center;\"><span leaf=\"\">\u6545\u969c\u5b9a\u4f4d<\/span><\/section>\n<\/td>\n<td style=\"padding: 12px 16px;border: 1px solid rgb(222, 226, 230);\">\n<section style=\"text-align: center;\"><span leaf=\"\">\u65e5\u5fd7\u96c6\u4e2d\uff0c\u6613\u5b9a\u4f4d<\/span><\/section>\n<\/td>\n<td style=\"padding: 12px 16px;border: 1px solid rgb(222, 226, 230);\">\n<section><span leaf=\"\">\u9700\u8981\u94fe\u8def\u8ffd\u8e2a\uff08Jaeger\/Zipkin\uff09<\/span><\/section>\n<\/td>\n<\/tr>\n<tr style=\"background-color: rgb(255, 255, 255);\">\n<td style=\"padding: 12px 16px;border: 1px solid rgb(222, 226, 230);font-weight: 500;\">\n<section style=\"text-align: center;\"><span leaf=\"\">\u6d4b\u8bd5\u6267\u884c\u65f6\u95f4<\/span><\/section>\n<\/td>\n<td style=\"padding: 12px 16px;border: 1px solid rgb(222, 226, 230);\">\n<section style=\"text-align: center;\"><span leaf=\"\">\u8f83\u77ed\uff08\u5206\u949f\u7ea7\uff09<\/span><\/section>\n<\/td>\n<td style=\"padding: 12px 16px;border: 1px solid rgb(222, 226, 230);\">\n<section><span leaf=\"\">\u8f83\u957f\uff08\u5c0f\u65f6\u7ea7\uff0c\u9700\u5e76\u884c\u5316\uff09<\/span><\/section>\n<\/td>\n<\/tr>\n<tr style=\"background-color: rgb(248, 249, 250);\">\n<td style=\"padding: 12px 16px;border: 1px solid rgb(222, 226, 230);font-weight: 500;\">\n<section style=\"text-align: center;\"><span leaf=\"\">\u56e2\u961f\u534f\u4f5c<\/span><\/section>\n<\/td>\n<td style=\"padding: 12px 16px;border: 1px solid rgb(222, 226, 230);\">\n<section style=\"text-align: center;\"><span leaf=\"\">\u7edf\u4e00\u53d1\u5e03\u7a97\u53e3<\/span><\/section>\n<\/td>\n<td style=\"padding: 12px 16px;border: 1px solid rgb(222, 226, 230);\">\n<section><span leaf=\"\">\u72ec\u7acb\u90e8\u7f72\uff0c\u9700\u7248\u672c\u517c\u5bb9\u7ba1\u7406<\/span><\/section>\n<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<h3 style=\"color: rgb(51, 51, 51);font-family: -apple-system, BlinkMacSystemFont, &quot;Segoe UI&quot;, &quot;PingFang SC&quot;, &quot;Hiragino Sans GB&quot;, &quot;Microsoft YaHei&quot;, sans-serif;font-style: normal;font-variant-ligatures: normal;font-variant-caps: normal;letter-spacing: normal;orphans: 2;text-align: start;text-indent: 0px;text-transform: none;widows: 2;word-spacing: 0px;-webkit-text-stroke-width: 0px;white-space: normal;text-decoration-thickness: initial;text-decoration-style: initial;text-decoration-color: initial;font-size: 20px;font-weight: 600;margin-top: 30px;margin-bottom: 15px;\"><span leaf=\"\">1.3 \u5fae\u670d\u52a1\u6d4b\u8bd5\u7b56\u7565\u9009\u62e9\u6d41\u7a0b<\/span><\/h3>\n<section style=\"text-align: center;\" nodeleaf=\"\">\n<figure class=\"wx-qr-wrap\"><img decoding=\"async\" class=\"rich_pages wxw-img\" data-aistatus=\"1\" data-imgfileid=\"100000373\" data-s=\"300,640\" data-type=\"png\" type=\"block\" src=\"https:\/\/mmbiz.qpic.cn\/mmbiz_png\/BWmfcibGhS1LZh5ib9TzNhJhQlmdCUryMAXTQwQpMDNykUKnoRl5P9QZJYSMn94xHV3QKrRGCz497sPqcVAxaJW6vib9QjOxINumAwgpQl24TE\/640?wx_fmt=png&#038;from=appmsg\" \/><figcaption class=\"wx-qr-tip\"><img decoding=\"async\" src=\"https:\/\/www.deartester.com\/wp-content\/uploads\/2026\/09\/wechat-qr.jpg\" alt=\"\u5fae\u4fe1\u516c\u4f17\u53f7\u4e8c\u7ef4\u7801\" loading=\"lazy\"><span>\u56fe\u7247\u5f15\u81ea\u5fae\u4fe1\u516c\u4f17\u53f7\uff0c\u626b\u7801\u5173\u6ce8\u9605\u8bfb\u539f\u6587<\/span><\/figcaption><\/figure>\n<\/section>\n<section><span leaf=\"\"><br  \/><\/span><\/section>\n<hr style=\"border-style: solid;border-width: 1px 0 0;border-color: rgba(0,0,0,0.1);-webkit-transform-origin: 0 0;-webkit-transform: scale(1, 0.5);transform-origin: 0 0;transform: scale(1, 0.5);\"  \/>\n<section><span leaf=\"\"><br  \/><\/span><\/section>\n<h2 style=\"font-family: -apple-system, BlinkMacSystemFont, &quot;Segoe UI&quot;, &quot;PingFang SC&quot;, &quot;Hiragino Sans GB&quot;, &quot;Microsoft YaHei&quot;, sans-serif;font-style: normal;font-variant-ligatures: normal;font-variant-caps: normal;letter-spacing: normal;orphans: 2;text-align: start;text-indent: 0px;text-transform: none;widows: 2;word-spacing: 0px;-webkit-text-stroke-width: 0px;white-space: normal;text-decoration-thickness: initial;text-decoration-style: initial;text-decoration-color: initial;font-size: 24px;font-weight: bold;color: rgb(25, 118, 210);margin-top: 40px;margin-bottom: 20px;padding-bottom: 10px;border-bottom: 3px solid rgb(25, 118, 210);\" data-pm-slice=\"0 0 []\"><span leaf=\"\">\u4e8c\u3001\u5fae\u670d\u52a1\u63a5\u53e3\u6d4b\u8bd5\u6838\u5fc3\u8981\u70b9<\/span><\/h2>\n<h3 style=\"color: rgb(51, 51, 51);font-family: -apple-system, BlinkMacSystemFont, &quot;Segoe UI&quot;, &quot;PingFang SC&quot;, &quot;Hiragino Sans GB&quot;, &quot;Microsoft YaHei&quot;, sans-serif;font-style: normal;font-variant-ligatures: normal;font-variant-caps: normal;letter-spacing: normal;orphans: 2;text-align: start;text-indent: 0px;text-transform: none;widows: 2;word-spacing: 0px;-webkit-text-stroke-width: 0px;white-space: normal;text-decoration-thickness: initial;text-decoration-style: initial;text-decoration-color: initial;font-size: 20px;font-weight: 600;margin-top: 30px;margin-bottom: 15px;\"><span leaf=\"\">2.1 \u63a5\u53e3\u5951\u7ea6\u4e0eAPI\u89c4\u8303\uff08OpenAPI\/Swagger\uff09<\/span><\/h3>\n<p style=\"color: rgb(51, 51, 51);font-family: -apple-system, BlinkMacSystemFont, &quot;Segoe UI&quot;, &quot;PingFang SC&quot;, &quot;Hiragino Sans GB&quot;, &quot;Microsoft YaHei&quot;, sans-serif;font-size: 16px;font-style: normal;font-variant-ligatures: normal;font-variant-caps: normal;font-weight: 400;letter-spacing: normal;orphans: 2;text-align: start;text-indent: 0px;text-transform: none;widows: 2;word-spacing: 0px;-webkit-text-stroke-width: 0px;white-space: normal;text-decoration-thickness: initial;text-decoration-style: initial;text-decoration-color: initial;margin-bottom: 15px;\"><span leaf=\"\">\u5728\u5fae\u670d\u52a1\u67b6\u6784\u4e2d\uff0c<\/span><strong><span leaf=\"\">\u63a5\u53e3\u5951\u7ea6\uff08Contract\uff09<\/span><\/strong><span leaf=\"\">\u662f\u670d\u52a1\u95f4\u534f\u4f5c\u7684\u57fa\u7840\u3002\u6ca1\u6709\u6e05\u6670\u7684\u5951\u7ea6\uff0c\u5c31\u50cf\u4e24\u4e2a\u4eba\u8bf4\u4e0d\u540c\u7684\u8bed\u8a00\uff0c\u6c9f\u901a\u5fc5\u7136\u51fa\u95ee\u9898\u3002<\/span><\/p>\n<p style=\"color: rgb(51, 51, 51);font-family: -apple-system, BlinkMacSystemFont, &quot;Segoe UI&quot;, &quot;PingFang SC&quot;, &quot;Hiragino Sans GB&quot;, &quot;Microsoft YaHei&quot;, sans-serif;font-size: 16px;font-style: normal;font-variant-ligatures: normal;font-variant-caps: normal;font-weight: 400;letter-spacing: normal;orphans: 2;text-align: start;text-indent: 0px;text-transform: none;widows: 2;word-spacing: 0px;-webkit-text-stroke-width: 0px;white-space: normal;text-decoration-thickness: initial;text-decoration-style: initial;text-decoration-color: initial;margin-bottom: 15px;\"><strong><span leaf=\"\">OpenAPI\u89c4\u8303\uff08\u539f\u540dSwagger\uff09<\/span><\/strong><span leaf=\"\">\u662f\u76ee\u524d\u6700\u4e3b\u6d41\u7684RESTful API\u63cf\u8ff0\u6807\u51c6\u3002\u4e00\u4e2a\u6807\u51c6\u7684OpenAPI\u6587\u6863\u5e94\u8be5\u5305\u542b\uff1a<\/span><\/p>\n<table style=\"width:559px;\">\n<tbody>\n<tr>\n<td data-colwidth=\"118\">\n<section style=\"text-align: center;\"><strong data-pm-slice=\"0 0 []\"><span leaf=\"\"><span textstyle=\"\" style=\"font-size: 15px;color: #ffa900;\">\u7aef\u70b9\u5b9a\u4e49<\/span><\/span><\/strong><span><span leaf=\"\"><span textstyle=\"\" style=\"font-size: 15px;color: #ffa900;\">\uff1a<\/span><\/span><\/span><\/section>\n<\/td>\n<td data-colwidth=\"441\">\n<section style=\"text-align: center;\"><span data-pm-slice=\"0 0 []\"><span leaf=\"\"><span textstyle=\"\" style=\"font-size: 15px;\">URL\u8def\u5f84\u3001HTTP\u65b9\u6cd5\uff08GET\/POST\/PUT\/DELETE\uff09<\/span><\/span><\/span><\/section>\n<\/td>\n<\/tr>\n<tr>\n<td data-colwidth=\"118\">\n<section style=\"text-align: center;\"><strong data-pm-slice=\"0 0 []\"><span leaf=\"\" style=\"font-weight: bold;\"><span textstyle=\"\" style=\"font-size: 15px;color: #ffa900;\">\u8bf7\u6c42\u53c2\u6570<\/span><\/span><\/strong><span><span leaf=\"\" style=\"font-weight: bold;\"><span textstyle=\"\" style=\"font-size: 15px;color: #ffa900;\">\uff1a<\/span><\/span><\/span><\/section>\n<\/td>\n<td data-colwidth=\"441\">\n<section style=\"text-align: center;\"><span data-pm-slice=\"0 0 []\"><span leaf=\"\"><span textstyle=\"\" style=\"font-size: 15px;\">Path\u53c2\u6570\u3001Header\u53c2\u6570\u3001Query\u53c2\u6570\u3001Body\u7ed3\u6784<\/span><\/span><\/span><\/section>\n<\/td>\n<\/tr>\n<tr>\n<td data-colwidth=\"118\">\n<section style=\"text-align: center;\"><strong data-pm-slice=\"0 0 []\"><span leaf=\"\" style=\"font-weight: bold;\"><span textstyle=\"\" style=\"font-size: 15px;color: #ffa900;\">\u54cd\u5e94\u5b9a\u4e49<\/span><\/span><\/strong><span><span leaf=\"\" style=\"font-weight: bold;\"><span textstyle=\"\" style=\"font-size: 15px;color: #ffa900;\">\uff1a<\/span><\/span><\/span><\/section>\n<\/td>\n<td data-colwidth=\"441\">\n<section style=\"text-align: center;\"><span data-pm-slice=\"0 0 []\"><span leaf=\"\"><span textstyle=\"\" style=\"font-size: 15px;\">\u72b6\u6001\u7801\u3001\u54cd\u5e94\u4f53\u7ed3\u6784\u3001\u9519\u8bef\u683c\u5f0f<\/span><\/span><\/span><\/section>\n<\/td>\n<\/tr>\n<tr>\n<td data-colwidth=\"118\">\n<section style=\"text-align: center;\"><strong data-pm-slice=\"0 0 []\"><span leaf=\"\" style=\"font-weight: bold;\"><span textstyle=\"\" style=\"font-size: 15px;color: #ffa900;\">\u6570\u636e\u7c7b\u578b<\/span><\/span><\/strong><span><span leaf=\"\" style=\"font-weight: bold;\"><span textstyle=\"\" style=\"font-size: 15px;color: #ffa900;\">\uff1a<\/span><\/span><\/span><\/section>\n<\/td>\n<td data-colwidth=\"441\">\n<section style=\"text-align: center;\"><span data-pm-slice=\"0 0 []\"><span leaf=\"\"><span textstyle=\"\" style=\"font-size: 15px;\">\u5b57\u6bb5\u7c7b\u578b\u3001\u662f\u5426\u5fc5\u586b\u3001\u53d6\u503c\u8303\u56f4<\/span><\/span><\/span><\/section>\n<\/td>\n<\/tr>\n<tr>\n<td data-colwidth=\"118\">\n<section style=\"text-align: center;\"><strong data-pm-slice=\"0 0 []\"><span leaf=\"\" style=\"font-weight: bold;\"><span textstyle=\"\" style=\"font-size: 15px;color: #ffa900;\">\u8ba4\u8bc1\u65b9\u5f0f<\/span><\/span><\/strong><span><span leaf=\"\" style=\"font-weight: bold;\"><span textstyle=\"\" style=\"font-size: 15px;color: #ffa900;\">\uff1a<\/span><\/span><\/span><\/section>\n<\/td>\n<td data-colwidth=\"441\">\n<section style=\"text-align: center;\"><span data-pm-slice=\"0 0 []\"><span leaf=\"\"><span textstyle=\"\" style=\"font-size: 15px;\">API Key\u3001OAuth2\u3001JWT\u7b49<\/span><\/span><\/span><\/section>\n<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p style=\"color: rgb(51, 51, 51);font-family: -apple-system, BlinkMacSystemFont, &quot;Segoe UI&quot;, &quot;PingFang SC&quot;, &quot;Hiragino Sans GB&quot;, &quot;Microsoft YaHei&quot;, sans-serif;font-size: 16px;font-style: normal;font-variant-ligatures: normal;font-variant-caps: normal;font-weight: 400;letter-spacing: normal;orphans: 2;text-align: start;text-indent: 0px;text-transform: none;widows: 2;word-spacing: 0px;-webkit-text-stroke-width: 0px;white-space: normal;text-decoration-thickness: initial;text-decoration-style: initial;text-decoration-color: initial;margin-bottom: 15px;\"><span leaf=\"\"><br  \/><\/span><\/p>\n<ul style=\"font-size: 15px;line-height: 1.8;margin: 0px;padding-left: 20px;\" class=\"list-paddingleft-1\"><\/ul>\n<p style=\"color: rgb(51, 51, 51);font-family: -apple-system, BlinkMacSystemFont, &quot;Segoe UI&quot;, &quot;PingFang SC&quot;, &quot;Hiragino Sans GB&quot;, &quot;Microsoft YaHei&quot;, sans-serif;font-size: 16px;font-style: normal;font-variant-ligatures: normal;font-variant-caps: normal;font-weight: 400;letter-spacing: normal;orphans: 2;text-align: start;text-indent: 0px;text-transform: none;widows: 2;word-spacing: 0px;-webkit-text-stroke-width: 0px;white-space: normal;text-decoration-thickness: initial;text-decoration-style: initial;text-decoration-color: initial;margin-bottom: 15px;\"><strong><span leaf=\"\">\u5b9e\u6218\u5efa\u8bae\uff1a<\/span><\/strong><\/p>\n<ol style=\"color: rgb(51, 51, 51);font-family: -apple-system, BlinkMacSystemFont, &quot;Segoe UI&quot;, &quot;PingFang SC&quot;, &quot;Hiragino Sans GB&quot;, &quot;Microsoft YaHei&quot;, sans-serif;font-size: 16px;font-style: normal;font-variant-ligatures: normal;font-variant-caps: normal;font-weight: 400;letter-spacing: normal;orphans: 2;text-align: start;text-indent: 0px;text-transform: none;widows: 2;word-spacing: 0px;-webkit-text-stroke-width: 0px;white-space: normal;text-decoration-thickness: initial;text-decoration-style: initial;text-decoration-color: initial;line-height: 2;margin-bottom: 25px;padding-left: 25px;\" class=\"list-paddingleft-1\">\n<li style=\"margin-bottom: 8px;\">\n<section><span leaf=\"\">\u63a8\u52a8\u5f00\u53d1\u56e2\u961f\u4f7f\u7528<\/span><strong><span leaf=\"\">\u8bbe\u8ba1\u4f18\u5148\uff08Design-First\uff09<\/span><\/strong><span leaf=\"\">\u65b9\u5f0f\uff1a\u5148\u5199OpenAPI\u89c4\u8303\uff0c\u518d\u5199\u4ee3\u7801<\/span><\/section>\n<\/li>\n<li style=\"margin-bottom: 8px;\">\n<section><span leaf=\"\">\u4f7f\u7528<\/span><strong><span leaf=\"\">Swagger Editor<\/span><\/strong><span leaf=\"\">\u6216<\/span><strong><span leaf=\"\">Apifox<\/span><\/strong><span leaf=\"\">\u7b49\u5de5\u5177\u534f\u4f5c\u7f16\u8f91API\u89c4\u8303<\/span><\/section>\n<\/li>\n<li style=\"margin-bottom: 8px;\">\n<section><span leaf=\"\">\u57fa\u4e8eOpenAPI\u89c4\u8303\u81ea\u52a8\u751f\u6210\uff1a<\/span><\/section>\n<\/li>\n<ul style=\"margin-top: 8px;padding-left: 20px;\" class=\"list-paddingleft-1\">\n<li>\n<section><span leaf=\"\">\u6d4b\u8bd5\u7528\u4f8b\uff08\u4f7f\u7528&nbsp;<\/span><code style=\"background-color: rgb(245, 245, 245);padding: 2px 6px;border-radius: 3px;font-size: 14px;\"><span leaf=\"\">swagger-codegen<\/span><\/code><span leaf=\"\">&nbsp;\u6216&nbsp;<\/span><code style=\"background-color: rgb(245, 245, 245);padding: 2px 6px;border-radius: 3px;font-size: 14px;\"><span leaf=\"\">openapi-generator<\/span><\/code><span leaf=\"\">\uff09<\/span><\/section>\n<\/li>\n<li>\n<section><span leaf=\"\">Mock\u670d\u52a1\uff08\u4f7f\u7528&nbsp;<\/span><code style=\"background-color: rgb(245, 245, 245);padding: 2px 6px;border-radius: 3px;font-size: 14px;\"><span leaf=\"\">Prism<\/span><\/code><span leaf=\"\">&nbsp;\u6216&nbsp;<\/span><code style=\"background-color: rgb(245, 245, 245);padding: 2px 6px;border-radius: 3px;font-size: 14px;\"><span leaf=\"\">WireMock<\/span><\/code><span leaf=\"\">\uff09<\/span><\/section>\n<\/li>\n<li>\n<section><span leaf=\"\">\u63a5\u53e3\u6587\u6863\uff08Swagger UI\u81ea\u52a8\u751f\u6210\uff09<\/span><\/section>\n<\/li>\n<\/ul>\n<li style=\"margin-bottom: 8px;\">\n<section><span leaf=\"\">\u5728CI\/CD\u6d41\u6c34\u7ebf\u4e2d\u6821\u9a8cOpenAPI\u89c4\u8303\u7684\u5408\u89c4\u6027\uff08\u4f7f\u7528&nbsp;<\/span><code style=\"background-color: rgb(245, 245, 245);padding: 2px 6px;border-radius: 3px;font-size: 14px;\"><span leaf=\"\">spectral<\/span><\/code><span leaf=\"\">&nbsp;\u8fdb\u884cLint\u68c0\u67e5\uff09<\/span><\/section>\n<\/li>\n<\/ol>\n<h3 style=\"color: rgb(51, 51, 51);font-family: -apple-system, BlinkMacSystemFont, &quot;Segoe UI&quot;, &quot;PingFang SC&quot;, &quot;Hiragino Sans GB&quot;, &quot;Microsoft YaHei&quot;, sans-serif;font-style: normal;font-variant-ligatures: normal;font-variant-caps: normal;letter-spacing: normal;orphans: 2;text-align: start;text-indent: 0px;text-transform: none;widows: 2;word-spacing: 0px;-webkit-text-stroke-width: 0px;white-space: normal;text-decoration-thickness: initial;text-decoration-style: initial;text-decoration-color: initial;font-size: 20px;font-weight: 600;margin-top: 30px;margin-bottom: 15px;\"><span leaf=\"\">2.2 \u63a5\u53e3\u6d4b\u8bd5\u5206\u5c42\u7b56\u7565<\/span><\/h3>\n<p style=\"color: rgb(51, 51, 51);font-family: -apple-system, BlinkMacSystemFont, &quot;Segoe UI&quot;, &quot;PingFang SC&quot;, &quot;Hiragino Sans GB&quot;, &quot;Microsoft YaHei&quot;, sans-serif;font-size: 16px;font-style: normal;font-variant-ligatures: normal;font-variant-caps: normal;font-weight: 400;letter-spacing: normal;orphans: 2;text-align: start;text-indent: 0px;text-transform: none;widows: 2;word-spacing: 0px;-webkit-text-stroke-width: 0px;white-space: normal;text-decoration-thickness: initial;text-decoration-style: initial;text-decoration-color: initial;margin-bottom: 15px;\"><span leaf=\"\">\u5fae\u670d\u52a1\u63a5\u53e3\u6d4b\u8bd5\u5e94\u8be5\u5206\u5c42\u8fdb\u884c\uff0c\u6bcf\u4e00\u5c42\u5173\u6ce8\u4e0d\u540c\u7684\u6d4b\u8bd5\u76ee\u6807\uff1a<\/span><\/p>\n<p style=\"font-size: 15px;margin: 0px 0px 10px;font-weight: 600;color: rgb(245, 127, 23);text-align: center;\"><span leaf=\"\"><span textstyle=\"\" style=\"font-size: 16px;\">\u63a5\u53e3\u6d4b\u8bd5\u5206\u5c42\u6a21\u578b<\/span><\/span><\/p>\n<table>\n<tbody>\n<tr>\n<td data-colwidth=\"576\"><strong><span leaf=\"\">\u7b2c1\u5c42\uff1a\u5951\u7ea6\u6d4b\u8bd5<\/span><\/strong><\/p>\n<section><span leaf=\"\">&nbsp;&#8211; \u9a8c\u8bc1\u63a5\u53e3\u5951\u7ea6\u662f\u5426\u88ab\u9075\u5b88\uff08Pact\uff09<\/span><\/section>\n<ul style=\"font-size: 15px;line-height: 1.8;margin: 0px;padding-left: 20px;\" class=\"list-paddingleft-1\">\n<li style=\"margin-bottom: 5px;\"><strong><span leaf=\"\">\u7b2c2\u5c42\uff1a\u7ec4\u4ef6\u63a5\u53e3\u6d4b\u8bd5<\/span><\/strong><br \/>\n<section><span leaf=\"\">&nbsp;&#8211; \u6d4b\u8bd5\u5355\u4e2a\u670d\u52a1\u7684\u63a5\u53e3\uff08\u4f7f\u7528Mock\u4f9d\u8d56\uff09<\/span><\/section>\n<\/li>\n<li style=\"margin-bottom: 5px;\"><strong><span leaf=\"\">\u7b2c3\u5c42\uff1a\u96c6\u6210\u63a5\u53e3\u6d4b\u8bd5<\/span><\/strong><br \/>\n<section><span leaf=\"\">&nbsp;&#8211; \u6d4b\u8bd5\u771f\u5b9e\u670d\u52a1\u95f4\u7684\u63a5\u53e3\u8c03\u7528<\/span><\/section>\n<\/li>\n<li style=\"margin-bottom: 5px;\"><strong><span leaf=\"\">\u7b2c4\u5c42\uff1a\u7aef\u5230\u7aef\u63a5\u53e3\u6d4b\u8bd5<\/span><\/strong><br \/>\n<section><span leaf=\"\">&nbsp;&#8211; \u6d4b\u8bd5\u5b8c\u6574\u4e1a\u52a1\u6d41\u7684\u63a5\u53e3\u8c03\u7528\u94fe<\/span><\/section>\n<\/li>\n<\/ul>\n<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p style=\"font-size: 15px;margin: 0px 0px 10px;font-weight: 600;color: rgb(245, 127, 23);\"><span leaf=\"\"><br  \/><\/span><\/p>\n<ul style=\"font-size: 15px;line-height: 1.8;margin: 0px;padding-left: 20px;\" class=\"list-paddingleft-1\"><\/ul>\n<h3 style=\"color: rgb(51, 51, 51);font-family: -apple-system, BlinkMacSystemFont, &quot;Segoe UI&quot;, &quot;PingFang SC&quot;, &quot;Hiragino Sans GB&quot;, &quot;Microsoft YaHei&quot;, sans-serif;font-style: normal;font-variant-ligatures: normal;font-variant-caps: normal;letter-spacing: normal;orphans: 2;text-align: start;text-indent: 0px;text-transform: none;widows: 2;word-spacing: 0px;-webkit-text-stroke-width: 0px;white-space: normal;text-decoration-thickness: initial;text-decoration-style: initial;text-decoration-color: initial;font-size: 20px;font-weight: 600;margin-top: 30px;margin-bottom: 15px;\"><span leaf=\"\">2.3 \u63a5\u53e3\u4f9d\u8d56\u7ba1\u7406\uff08Mock\/Stub\/Service Virtualization\uff09<\/span><\/h3>\n<p style=\"color: rgb(51, 51, 51);font-family: -apple-system, BlinkMacSystemFont, &quot;Segoe UI&quot;, &quot;PingFang SC&quot;, &quot;Hiragino Sans GB&quot;, &quot;Microsoft YaHei&quot;, sans-serif;font-size: 16px;font-style: normal;font-variant-ligatures: normal;font-variant-caps: normal;font-weight: 400;letter-spacing: normal;orphans: 2;text-align: start;text-indent: 0px;text-transform: none;widows: 2;word-spacing: 0px;-webkit-text-stroke-width: 0px;white-space: normal;text-decoration-thickness: initial;text-decoration-style: initial;text-decoration-color: initial;margin-bottom: 15px;\"><span leaf=\"\">\u5fae\u670d\u52a1\u6d4b\u8bd5\u4e2d\u6700\u5927\u7684\u6311\u6218\u4e4b\u4e00\u662f<\/span><strong><span leaf=\"\">\u4f9d\u8d56\u7ba1\u7406<\/span><\/strong><span leaf=\"\">\u3002\u4e00\u4e2a\u670d\u52a1\u53ef\u80fd\u4f9d\u8d56\u5341\u51e0\u4e2a\u5176\u4ed6\u670d\u52a1\uff0c\u5982\u4f55\u5728\u6d4b\u8bd5\u4e2d\u5904\u7406\u8fd9\u4e9b\u4f9d\u8d56\uff1f<\/span><\/p>\n<p style=\"color: rgb(51, 51, 51);font-family: -apple-system, BlinkMacSystemFont, &quot;Segoe UI&quot;, &quot;PingFang SC&quot;, &quot;Hiragino Sans GB&quot;, &quot;Microsoft YaHei&quot;, sans-serif;font-size: 16px;font-style: normal;font-variant-ligatures: normal;font-variant-caps: normal;font-weight: 400;letter-spacing: normal;orphans: 2;text-align: start;text-indent: 0px;text-transform: none;widows: 2;word-spacing: 0px;-webkit-text-stroke-width: 0px;white-space: normal;text-decoration-thickness: initial;text-decoration-style: initial;text-decoration-color: initial;margin-bottom: 15px;\"><strong><span leaf=\"\">\u4e09\u79cd\u4f9d\u8d56\u6a21\u62df\u7b56\u7565\uff1a<\/span><\/strong><\/p>\n<table style=\"border-collapse:collapse;border:1px solid rgb(222, 226, 230);font-size:14px;min-width:338px;\">\n<thead>\n<tr style=\"background: linear-gradient(135deg, rgb(52, 152, 219), rgb(41, 128, 185));color: rgb(255, 255, 255);\">\n<th data-colwidth=\"144\" style=\"padding: 14px 16px;text-align: left;font-weight: 600;border: 1px solid rgb(41, 128, 185);\">\n<section style=\"text-align: center;\"><span leaf=\"\"><span textstyle=\"\" style=\"font-size: 16px;color: #ffa900;\">\u7b56 \u7565<\/span><\/span><\/section>\n<\/th>\n<th data-colwidth=\"144\" style=\"padding: 14px 16px;text-align: left;font-weight: 600;border: 1px solid rgb(41, 128, 185);\">\n<section style=\"text-align: center;\"><span leaf=\"\"><span textstyle=\"\" style=\"font-size: 16px;color: #ffa900;\">\u5b9a \u4e49<\/span><\/span><\/section>\n<\/th>\n<th style=\"padding: 14px 16px;text-align: left;font-weight: 600;border: 1px solid rgb(41, 128, 185);\">\n<section style=\"text-align: center;\"><span leaf=\"\"><span textstyle=\"\" style=\"font-size: 16px;color: #ffa900;\">\u9002\u7528\u573a\u666f<\/span><\/span><\/section>\n<\/th>\n<th style=\"padding: 14px 16px;text-align: left;font-weight: 600;border: 1px solid rgb(41, 128, 185);\">\n<section style=\"text-align: center;\"><span leaf=\"\"><span textstyle=\"\" style=\"font-size: 16px;color: #ffa900;\">\u5de5 \u5177<\/span><\/span><\/section>\n<\/th>\n<\/tr>\n<\/thead>\n<tbody>\n<tr style=\"background-color: rgb(248, 249, 250);\">\n<td data-colwidth=\"144\" style=\"padding: 12px 16px;border: 1px solid rgb(222, 226, 230);font-weight: 500;\">\n<section><span leaf=\"\">Stub\uff08\u6869\uff09<\/span><\/section>\n<\/td>\n<td data-colwidth=\"144\" style=\"padding: 12px 16px;border: 1px solid rgb(222, 226, 230);\">\n<section><span leaf=\"\">\u8fd4\u56de\u56fa\u5b9a\u54cd\u5e94\u7684\u5047\u670d\u52a1<\/span><\/section>\n<\/td>\n<td style=\"padding: 12px 16px;border: 1px solid rgb(222, 226, 230);\">\n<section><span leaf=\"\">\u7b80\u5355\u4f9d\u8d56\uff0c\u65e0\u9700\u52a8\u6001\u903b\u8f91<\/span><\/section>\n<\/td>\n<td style=\"padding: 12px 16px;border: 1px solid rgb(222, 226, 230);\">\n<section><span leaf=\"\">WireMock, Nock<\/span><\/section>\n<\/td>\n<\/tr>\n<tr style=\"background-color: rgb(255, 255, 255);\">\n<td data-colwidth=\"144\" style=\"padding: 12px 16px;border: 1px solid rgb(222, 226, 230);font-weight: 500;\">\n<section><span leaf=\"\">Mock\uff08\u6a21\u62df\uff09<\/span><\/section>\n<\/td>\n<td data-colwidth=\"144\" style=\"padding: 12px 16px;border: 1px solid rgb(222, 226, 230);\">\n<section><span leaf=\"\">\u53ef\u9a8c\u8bc1\u8c03\u7528\u884c\u4e3a\u7684\u6a21\u62df\u5bf9\u8c61<\/span><\/section>\n<\/td>\n<td style=\"padding: 12px 16px;border: 1px solid rgb(222, 226, 230);\">\n<section><span leaf=\"\">\u9700\u8981\u9a8c\u8bc1\u8c03\u7528\u53c2\u6570\u548c\u6b21\u6570<\/span><\/section>\n<\/td>\n<td style=\"padding: 12px 16px;border: 1px solid rgb(222, 226, 230);\">\n<section><span leaf=\"\">MockServer, pytest-mock<\/span><\/section>\n<\/td>\n<\/tr>\n<tr style=\"background-color: rgb(248, 249, 250);\">\n<td data-colwidth=\"144\" style=\"padding: 12px 16px;border: 1px solid rgb(222, 226, 230);font-weight: 500;\">\n<section><span leaf=\"\">Service Virtualization<\/span><\/section>\n<\/td>\n<td data-colwidth=\"144\" style=\"padding: 12px 16px;border: 1px solid rgb(222, 226, 230);\">\n<section><span leaf=\"\">\u5f55\u5236\u771f\u5b9e\u670d\u52a1\u884c\u4e3a\u5e76\u56de\u653e<\/span><\/section>\n<\/td>\n<td style=\"padding: 12px 16px;border: 1px solid rgb(222, 226, 230);\">\n<section><span leaf=\"\">\u590d\u6742\u4f9d\u8d56\uff0c\u9700\u8981\u771f\u5b9e\u884c\u4e3a<\/span><\/section>\n<\/td>\n<td style=\"padding: 12px 16px;border: 1px solid rgb(222, 226, 230);\">\n<section><span leaf=\"\">Hoverfly, TrafficParrot<\/span><\/section>\n<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p style=\"font-size: 15px;margin: 0px;color: rgb(27, 94, 32);\"><strong><span leaf=\"\">\u2705 \u6700\u4f73\u5b9e\u8df5\uff1a<\/span><\/strong><span leaf=\"\">\u7ec4\u4ef6\u6d4b\u8bd5\u9636\u6bb5\u4f7f\u7528Mock\/Stub\u9694\u79bb\u4f9d\u8d56\uff0c\u96c6\u6210\u6d4b\u8bd5\u9636\u6bb5\u4f7f\u7528Service Virtualization\u6a21\u62df\u771f\u5b9e\u884c\u4e3a\uff0c\u7aef\u5230\u7aef\u6d4b\u8bd5\u9636\u6bb5\u4f7f\u7528\u771f\u5b9e\u4f9d\u8d56\uff08\u6216\u9884\u53d1\u5e03\u73af\u5883\uff09\u3002<\/span><\/p>\n<p style=\"font-size: 15px;margin: 0px;color: rgb(27, 94, 32);\"><span leaf=\"\"><br  \/><\/span><\/p>\n<hr style=\"border-style: solid;border-width: 1px 0 0;border-color: rgba(0,0,0,0.1);-webkit-transform-origin: 0 0;-webkit-transform: scale(1, 0.5);transform-origin: 0 0;transform: scale(1, 0.5);\"  \/>\n<p style=\"font-size: 15px;margin: 0px;color: rgb(27, 94, 32);\"><span leaf=\"\"><br  \/><\/span><\/p>\n<h2 style=\"font-family: -apple-system, BlinkMacSystemFont, &quot;Segoe UI&quot;, &quot;PingFang SC&quot;, &quot;Hiragino Sans GB&quot;, &quot;Microsoft YaHei&quot;, sans-serif;font-style: normal;font-variant-ligatures: normal;font-variant-caps: normal;letter-spacing: normal;orphans: 2;text-align: start;text-indent: 0px;text-transform: none;widows: 2;word-spacing: 0px;-webkit-text-stroke-width: 0px;white-space: normal;text-decoration-thickness: initial;text-decoration-style: initial;text-decoration-color: initial;font-size: 24px;font-weight: bold;color: rgb(25, 118, 210);margin-top: 40px;margin-bottom: 20px;padding-bottom: 10px;border-bottom: 3px solid rgb(25, 118, 210);\"><span leaf=\"\">\u4e09\u3001\u5951\u7ea6\u6d4b\u8bd5\uff1aPact\u5b9e\u6218<\/span><\/h2>\n<p style=\"color: rgb(51, 51, 51);font-family: -apple-system, BlinkMacSystemFont, &quot;Segoe UI&quot;, &quot;PingFang SC&quot;, &quot;Hiragino Sans GB&quot;, &quot;Microsoft YaHei&quot;, sans-serif;font-size: 16px;font-style: normal;font-variant-ligatures: normal;font-variant-caps: normal;font-weight: 400;letter-spacing: normal;orphans: 2;text-align: start;text-indent: 0px;text-transform: none;widows: 2;word-spacing: 0px;-webkit-text-stroke-width: 0px;white-space: normal;text-decoration-thickness: initial;text-decoration-style: initial;text-decoration-color: initial;margin-bottom: 20px;\"><span leaf=\"\">\u5951\u7ea6\u6d4b\u8bd5\u662f\u5fae\u670d\u52a1\u6d4b\u8bd5\u7684\u6838\u5fc3\u3002\u5b83\u89e3\u51b3\u4e86\u8fd9\u6837\u7684\u95ee\u9898\uff1a<\/span><strong><span leaf=\"\">&#8220;\u6211\u4fee\u6539\u4e86\u670d\u52a1A\u7684\u63a5\u53e3\uff0c\u600e\u4e48\u786e\u4fdd\u670d\u52a1B\u4e0d\u4f1a\u56e0\u4e3a\u6211\u7684\u4fee\u6539\u800c\u5d29\u6e83\uff1f&#8221;<\/span><\/strong><\/p>\n<h3 style=\"color: rgb(51, 51, 51);font-family: -apple-system, BlinkMacSystemFont, &quot;Segoe UI&quot;, &quot;PingFang SC&quot;, &quot;Hiragino Sans GB&quot;, &quot;Microsoft YaHei&quot;, sans-serif;font-style: normal;font-variant-ligatures: normal;font-variant-caps: normal;letter-spacing: normal;orphans: 2;text-align: start;text-indent: 0px;text-transform: none;widows: 2;word-spacing: 0px;-webkit-text-stroke-width: 0px;white-space: normal;text-decoration-thickness: initial;text-decoration-style: initial;text-decoration-color: initial;font-size: 20px;font-weight: 600;margin-top: 30px;margin-bottom: 15px;\"><span leaf=\"\">3.1 \u5951\u7ea6\u6d4b\u8bd5\u539f\u7406<\/span><\/h3>\n<section style=\"text-align: center;\" nodeleaf=\"\">\n<figure class=\"wx-qr-wrap\"><img decoding=\"async\" class=\"rich_pages wxw-img\" data-aistatus=\"1\" data-imgfileid=\"100000374\" data-s=\"300,640\" data-type=\"png\" type=\"block\" src=\"https:\/\/mmbiz.qpic.cn\/mmbiz_png\/BWmfcibGhS1J7qTRLV7tIQLrweRicbQACk0gy3hzEeZ9ycny6P5J9ib7JR9Aaoxib03WtZxYjZn0zSibhWh9z1udpjWMd4AVxxIFVqEZgVJhkhJQ\/640?wx_fmt=png&#038;from=appmsg\" \/><figcaption class=\"wx-qr-tip\"><img decoding=\"async\" src=\"https:\/\/www.deartester.com\/wp-content\/uploads\/2026\/09\/wechat-qr.jpg\" alt=\"\u5fae\u4fe1\u516c\u4f17\u53f7\u4e8c\u7ef4\u7801\" loading=\"lazy\"><span>\u56fe\u7247\u5f15\u81ea\u5fae\u4fe1\u516c\u4f17\u53f7\uff0c\u626b\u7801\u5173\u6ce8\u9605\u8bfb\u539f\u6587<\/span><\/figcaption><\/figure>\n<\/section>\n<h3 style=\"color: rgb(51, 51, 51);font-family: -apple-system, BlinkMacSystemFont, &quot;Segoe UI&quot;, &quot;PingFang SC&quot;, &quot;Hiragino Sans GB&quot;, &quot;Microsoft YaHei&quot;, sans-serif;font-style: normal;font-variant-ligatures: normal;font-variant-caps: normal;letter-spacing: normal;orphans: 2;text-align: start;text-indent: 0px;text-transform: none;widows: 2;word-spacing: 0px;-webkit-text-stroke-width: 0px;white-space: normal;text-decoration-thickness: initial;text-decoration-style: initial;text-decoration-color: initial;font-size: 20px;font-weight: 600;margin-top: 30px;margin-bottom: 15px;\" data-pm-slice=\"0 0 []\"><span leaf=\"\">3.2 Pact\u4f7f\u7528\u6b65\u9aa4<\/span><\/h3>\n<p style=\"color: rgb(51, 51, 51);font-family: -apple-system, BlinkMacSystemFont, &quot;Segoe UI&quot;, &quot;PingFang SC&quot;, &quot;Hiragino Sans GB&quot;, &quot;Microsoft YaHei&quot;, sans-serif;font-size: 16px;font-style: normal;font-variant-ligatures: normal;font-variant-caps: normal;font-weight: 400;letter-spacing: normal;orphans: 2;text-align: start;text-indent: 0px;text-transform: none;widows: 2;word-spacing: 0px;-webkit-text-stroke-width: 0px;white-space: normal;text-decoration-thickness: initial;text-decoration-style: initial;text-decoration-color: initial;margin-bottom: 15px;\"><strong><span leaf=\"\">\u6d88\u8d39\u8005\u7aef\uff08\u4ee5JavaScript\u4e3a\u4f8b\uff09\uff1a<\/span><\/strong><\/p>\n<section class=\"code-snippet__fix code-snippet__js\">\n<ul class=\"code-snippet__line-index code-snippet__js\">\n<li><\/li>\n<li><\/li>\n<li><\/li>\n<li><\/li>\n<li><\/li>\n<li><\/li>\n<li><\/li>\n<li><\/li>\n<li><\/li>\n<li><\/li>\n<li><\/li>\n<li><\/li>\n<li><\/li>\n<li><\/li>\n<li><\/li>\n<li><\/li>\n<li><\/li>\n<li><\/li>\n<li><\/li>\n<li><\/li>\n<li><\/li>\n<li><\/li>\n<li><\/li>\n<li><\/li>\n<li><\/li>\n<li><\/li>\n<li><\/li>\n<li><\/li>\n<li><\/li>\n<li><\/li>\n<li><\/li>\n<li><\/li>\n<li><\/li>\n<li><\/li>\n<li><\/li>\n<li><\/li>\n<li><\/li>\n<li><\/li>\n<li><\/li>\n<li><\/li>\n<li><\/li>\n<li><\/li>\n<li><\/li>\n<li><\/li>\n<li><\/li>\n<\/ul>\n<pre class=\"code-snippet__js\" data-lang=\"php\"><code><span leaf=\"\"><span class=\"code-snippet__comment\">\/\/ 1. \u5b89\u88c5Pact<\/span><\/span><\/code><code><span leaf=\"\"><span class=\"code-snippet__comment\">\/\/ npm install -D @pact-foundation\/pact<\/span><\/span><\/code><code><span leaf=\"\"><span class=\"code-snippet__comment\">\/\/ 2. \u7f16\u5199\u6d88\u8d39\u8005\u6d4b\u8bd5<\/span><\/span><\/code><code><span leaf=\"\"><span class=\"code-snippet__keyword\">const<\/span>&nbsp;{ Pact } =&nbsp;<span class=\"code-snippet__keyword\">require<\/span>(<span class=\"code-snippet__string\">'@pact-foundation\/pact'<\/span>);<\/span><\/code><code><span leaf=\"\"><span class=\"code-snippet__title\">describe<\/span>(<span class=\"code-snippet__string\">'Order Service Consumer'<\/span>, () =&gt; {<\/span><\/code><code><span leaf=\"\">&nbsp;&nbsp;<span class=\"code-snippet__keyword\">const<\/span>&nbsp;<span class=\"code-snippet__variable\">provider<\/span>&nbsp;=&nbsp;<span class=\"code-snippet__keyword\">new<\/span>&nbsp;<span class=\"code-snippet__title\">Pact<\/span>({<\/span><\/code><code><span leaf=\"\">&nbsp; &nbsp; consumer:&nbsp;<span class=\"code-snippet__string\">'WebFrontend'<\/span>,<\/span><\/code><code><span leaf=\"\">&nbsp; &nbsp; provider:&nbsp;<span class=\"code-snippet__string\">'OrderService'<\/span>,<\/span><\/code><code><span leaf=\"\">&nbsp; &nbsp; port:&nbsp;<span class=\"code-snippet__number\">8080<\/span>,<\/span><\/code><code><span leaf=\"\">&nbsp; &nbsp; log:&nbsp;<span class=\"code-snippet__string\">'.\/logs\/pact.log'<\/span>,<\/span><\/code><code><span leaf=\"\">&nbsp; &nbsp; dir:&nbsp;<span class=\"code-snippet__string\">'.\/pacts'<\/span>,<\/span><\/code><code><span leaf=\"\">&nbsp; });<\/span><\/code><code><span leaf=\"\">&nbsp;&nbsp;<span class=\"code-snippet__title\">beforeAll<\/span>(() =&gt; provider.<span class=\"code-snippet__title\">setup<\/span>());<\/span><\/code><code><span leaf=\"\">&nbsp;&nbsp;<span class=\"code-snippet__title\">it<\/span>(<span class=\"code-snippet__string\">'should create an order'<\/span>,&nbsp;<span class=\"code-snippet__title\">async<\/span>&nbsp;() =&gt; {<\/span><\/code><code><span leaf=\"\">&nbsp; &nbsp; \/\/ \u5b9a\u4e49\u671f\u671b\u7684\u63a5\u53e3\u4ea4\u4e92<\/span><\/code><code><span leaf=\"\">&nbsp; &nbsp; await provider.<span class=\"code-snippet__title\">addInteraction<\/span>({<\/span><\/code><code><span leaf=\"\">&nbsp; &nbsp; &nbsp;&nbsp;<span class=\"code-snippet__attr\">state<\/span>:&nbsp;<span class=\"code-snippet__string\">'order does not exist'<\/span>,<\/span><\/code><code><span leaf=\"\">&nbsp; &nbsp; &nbsp;&nbsp;<span class=\"code-snippet__attr\">uponReceiving<\/span>:&nbsp;<span class=\"code-snippet__string\">'a request to create an order'<\/span>,<\/span><\/code><code><span leaf=\"\">&nbsp; &nbsp; &nbsp;&nbsp;<span class=\"code-snippet__attr\">withRequest<\/span>: {<\/span><\/code><code><span leaf=\"\">&nbsp; &nbsp; &nbsp; &nbsp;&nbsp;<span class=\"code-snippet__attr\">method<\/span>:&nbsp;<span class=\"code-snippet__string\">'POST'<\/span>,<\/span><\/code><code><span leaf=\"\">&nbsp; &nbsp; &nbsp; &nbsp;&nbsp;<span class=\"code-snippet__attr\">path<\/span>:&nbsp;<span class=\"code-snippet__string\">'\/orders'<\/span>,<\/span><\/code><code><span leaf=\"\">&nbsp; &nbsp; &nbsp; &nbsp;&nbsp;<span class=\"code-snippet__attr\">body<\/span>: {<\/span><\/code><code><span leaf=\"\">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp;<span class=\"code-snippet__attr\">userId<\/span>:&nbsp;<span class=\"code-snippet__number\">123<\/span>,<\/span><\/code><code><span leaf=\"\">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp;<span class=\"code-snippet__attr\">productId<\/span>:&nbsp;<span class=\"code-snippet__number\">456<\/span>,<\/span><\/code><code><span leaf=\"\">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp;<span class=\"code-snippet__attr\">quantity<\/span>:&nbsp;<span class=\"code-snippet__number\">2<\/span><\/span><\/code><code><span leaf=\"\">&nbsp; &nbsp; &nbsp; &nbsp; }<\/span><\/code><code><span leaf=\"\">&nbsp; &nbsp; &nbsp; },<\/span><\/code><code><span leaf=\"\">&nbsp; &nbsp; &nbsp;&nbsp;<span class=\"code-snippet__attr\">willRespondWith<\/span>: {<\/span><\/code><code><span leaf=\"\">&nbsp; &nbsp; &nbsp; &nbsp;&nbsp;<span class=\"code-snippet__attr\">status<\/span>:&nbsp;<span class=\"code-snippet__number\">201<\/span>,<\/span><\/code><code><span leaf=\"\">&nbsp; &nbsp; &nbsp; &nbsp;&nbsp;<span class=\"code-snippet__attr\">body<\/span>: {<\/span><\/code><code><span leaf=\"\">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp;<span class=\"code-snippet__attr\">orderId<\/span>:&nbsp;<span class=\"code-snippet__string\">'abc123'<\/span>,<\/span><\/code><code><span leaf=\"\">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp;<span class=\"code-snippet__attr\">status<\/span>:&nbsp;<span class=\"code-snippet__string\">'CREATED'<\/span><\/span><\/code><code><span leaf=\"\">&nbsp; &nbsp; &nbsp; &nbsp; }<\/span><\/code><code><span leaf=\"\">&nbsp; &nbsp; &nbsp; }<\/span><\/code><code><span leaf=\"\">&nbsp; &nbsp; });<\/span><\/code><code><span leaf=\"\">&nbsp; &nbsp; \/\/ \u6267\u884c\u6d88\u8d39\u8005\u4ee3\u7801<\/span><\/code><code><span leaf=\"\">&nbsp; &nbsp;&nbsp;<span class=\"code-snippet__keyword\">const<\/span>&nbsp;response = await&nbsp;<span class=\"code-snippet__title\">createOrder<\/span>({<\/span><\/code><code><span leaf=\"\">&nbsp; &nbsp; &nbsp;&nbsp;<span class=\"code-snippet__attr\">userId<\/span>:&nbsp;<span class=\"code-snippet__number\">123<\/span>,<\/span><\/code><code><span leaf=\"\">&nbsp; &nbsp; &nbsp;&nbsp;<span class=\"code-snippet__attr\">productId<\/span>:&nbsp;<span class=\"code-snippet__number\">456<\/span>,<\/span><\/code><code><span leaf=\"\">&nbsp; &nbsp; &nbsp;&nbsp;<span class=\"code-snippet__attr\">quantity<\/span>:&nbsp;<span class=\"code-snippet__number\">2<\/span><\/span><\/code><code><span leaf=\"\">&nbsp; &nbsp; });<\/span><\/code><code><span leaf=\"\">&nbsp; &nbsp;&nbsp;<span class=\"code-snippet__title\">expect<\/span>(response.orderId).<span class=\"code-snippet__title\">toEqual<\/span>(<span class=\"code-snippet__string\">'abc123'<\/span>);<\/span><\/code><code><span leaf=\"\">&nbsp; });<\/span><\/code><code><span leaf=\"\">&nbsp;&nbsp;<span class=\"code-snippet__title\">afterAll<\/span>(() =&gt; provider.<span class=\"code-snippet__title\">finalize<\/span>());<\/span><\/code><code><span leaf=\"\">});<\/span><\/code><\/pre>\n<\/section>\n<section><strong style=\"color: rgb(51, 51, 51);font-family: -apple-system, BlinkMacSystemFont, &quot;Segoe UI&quot;, &quot;PingFang SC&quot;, &quot;Hiragino Sans GB&quot;, &quot;Microsoft YaHei&quot;, sans-serif;font-size: 16px;font-style: normal;font-variant-ligatures: normal;font-variant-caps: normal;letter-spacing: normal;orphans: 2;text-align: start;text-indent: 0px;text-transform: none;widows: 2;word-spacing: 0px;-webkit-text-stroke-width: 0px;white-space: normal;background-color: rgb(255, 255, 255);text-decoration-thickness: initial;text-decoration-style: initial;text-decoration-color: initial;\" data-pm-slice=\"0 0 []\"><span leaf=\"\">\u63d0\u4f9b\u8005\u7aef\u9a8c\u8bc1\uff08\u4ee5Python\u4e3a\u4f8b\uff09\uff1a<\/span><\/strong><\/section>\n<section class=\"code-snippet__fix code-snippet__js\">\n<ul class=\"code-snippet__line-index code-snippet__js\">\n<li><\/li>\n<li><\/li>\n<li><\/li>\n<li><\/li>\n<li><\/li>\n<li><\/li>\n<li><\/li>\n<li><\/li>\n<li><\/li>\n<li><\/li>\n<li><\/li>\n<li><\/li>\n<li><\/li>\n<li><\/li>\n<li><\/li>\n<li><\/li>\n<li><\/li>\n<\/ul>\n<pre class=\"code-snippet__js\" data-lang=\"python\"><code><span leaf=\"\"><span class=\"code-snippet__comment\"># 1. \u5b89\u88c5pact-python<\/span><\/span><\/code><code><span leaf=\"\"><span class=\"code-snippet__comment\"># pip install pact-python<\/span><\/span><\/code><code><span leaf=\"\"><span class=\"code-snippet__comment\"># 2. \u7f16\u5199\u63d0\u4f9b\u8005\u9a8c\u8bc1<\/span><\/span><\/code><code><span leaf=\"\"><span class=\"code-snippet__keyword\">import<\/span>&nbsp;pytest<\/span><\/code><code><span leaf=\"\"><span class=\"code-snippet__keyword\">from<\/span>&nbsp;pact&nbsp;<span class=\"code-snippet__keyword\">import<\/span>&nbsp;Verifier<\/span><\/code><code><span leaf=\"\"><span class=\"code-snippet__meta\">@pytest.fixture<\/span><\/span><\/code><code><span leaf=\"\"><span class=\"code-snippet__keyword\">def<\/span>&nbsp;<span class=\"code-snippet__title\">verifier<\/span>():<\/span><\/code><code><span leaf=\"\">&nbsp; &nbsp;&nbsp;<span class=\"code-snippet__keyword\">return<\/span>&nbsp;Verifier(<\/span><\/code><code><span leaf=\"\">&nbsp; &nbsp; &nbsp; &nbsp; provider_name=<span class=\"code-snippet__string\">'OrderService'<\/span>,<\/span><\/code><code><span leaf=\"\">&nbsp; &nbsp; &nbsp; &nbsp; provider_base_url=<span class=\"code-snippet__string\">'http:\/\/localhost:5000'<\/span><\/span><\/code><code><span leaf=\"\">&nbsp; &nbsp; )<\/span><\/code><code><span leaf=\"\"><span class=\"code-snippet__keyword\">def<\/span>&nbsp;<span class=\"code-snippet__title\">test_provider_fulfills_consumer_contract<\/span>(<span class=\"code-snippet__params\">verifier<\/span>):<\/span><\/code><code><span leaf=\"\">&nbsp; &nbsp;&nbsp;<span class=\"code-snippet__comment\"># \u4ecePact Broker\u62c9\u53d6\u5951\u7ea6\u6587\u4ef6\u5e76\u9a8c\u8bc1<\/span><\/span><\/code><code><span leaf=\"\">&nbsp; &nbsp; success, logs = verifier.verify_pacts(<\/span><\/code><code><span leaf=\"\">&nbsp; &nbsp; &nbsp; &nbsp;&nbsp;<span class=\"code-snippet__string\">'http:\/\/pact-broker\/pacts\/provider\/OrderService\/consumer\/WebFrontend\/latest'<\/span><\/span><\/code><code><span leaf=\"\">&nbsp; &nbsp; )<\/span><\/code><code><span leaf=\"\">&nbsp; &nbsp;&nbsp;<span class=\"code-snippet__keyword\">assert<\/span>&nbsp;success ==&nbsp;<span class=\"code-snippet__number\">0<\/span>,&nbsp;<span class=\"code-snippet__string\">f\"Pact verification failed:\\n<\/span><span class=\"code-snippet__string\"><span class=\"code-snippet__subst\">{logs}<\/span><\/span><span class=\"code-snippet__string\">\"<\/span><\/span><\/code><\/pre>\n<\/section>\n<h3 style=\"color: rgb(51, 51, 51);font-family: -apple-system, BlinkMacSystemFont, &quot;Segoe UI&quot;, &quot;PingFang SC&quot;, &quot;Hiragino Sans GB&quot;, &quot;Microsoft YaHei&quot;, sans-serif;font-style: normal;font-variant-ligatures: normal;font-variant-caps: normal;letter-spacing: normal;orphans: 2;text-align: start;text-indent: 0px;text-transform: none;widows: 2;word-spacing: 0px;-webkit-text-stroke-width: 0px;white-space: normal;text-decoration-thickness: initial;text-decoration-style: initial;text-decoration-color: initial;font-size: 20px;font-weight: 600;margin-top: 30px;margin-bottom: 15px;\" data-pm-slice=\"0 0 []\"><span leaf=\"\">3.3 \u5951\u7ea6\u6d4b\u8bd5 vs \u96c6\u6210\u6d4b\u8bd5<\/span><\/h3>\n<table style=\"color: rgb(51, 51, 51);font-family: -apple-system, BlinkMacSystemFont, &quot;Segoe UI&quot;, &quot;PingFang SC&quot;, &quot;Hiragino Sans GB&quot;, &quot;Microsoft YaHei&quot;, sans-serif;font-style: normal;font-variant-ligatures: normal;font-variant-caps: normal;font-weight: 400;letter-spacing: normal;orphans: 2;text-align: start;text-transform: none;widows: 2;word-spacing: 0px;-webkit-text-stroke-width: 0px;white-space: normal;background-color: rgb(255, 255, 255);text-decoration-thickness: initial;text-decoration-style: initial;text-decoration-color: initial;width: 800px;border-collapse: collapse;border: 1px solid rgb(222, 226, 230);font-size: 14px;\">\n<thead>\n<tr style=\"background: linear-gradient(135deg, rgb(52, 152, 219), rgb(41, 128, 185));color: rgb(255, 255, 255);\">\n<th style=\"padding: 14px 16px;text-align: left;font-weight: 600;border: 1px solid rgb(41, 128, 185);\">\n<section style=\"text-align: center;\"><span leaf=\"\"><span textstyle=\"\" style=\"color: #ffa900;\">\u5bf9\u6bd4\u7ef4\u5ea6<\/span><\/span><\/section>\n<\/th>\n<th style=\"padding: 14px 16px;text-align: left;font-weight: 600;border: 1px solid rgb(41, 128, 185);\">\n<section style=\"text-align: center;\"><span leaf=\"\"><span textstyle=\"\" style=\"color: #ffa900;\">\u5951\u7ea6\u6d4b\u8bd5<\/span><\/span><\/section>\n<\/th>\n<th style=\"padding: 14px 16px;text-align: left;font-weight: 600;border: 1px solid rgb(41, 128, 185);\">\n<section style=\"text-align: center;\"><span leaf=\"\"><span textstyle=\"\" style=\"color: #ffa900;\">\u96c6\u6210\u6d4b\u8bd5<\/span><\/span><\/section>\n<\/th>\n<\/tr>\n<\/thead>\n<tbody>\n<tr style=\"background-color: rgb(248, 249, 250);\">\n<td style=\"padding: 12px 16px;border: 1px solid rgb(222, 226, 230);font-weight: 500;\">\n<section style=\"text-align: center;\"><span leaf=\"\">\u6d4b\u8bd5\u5bf9\u8c61<\/span><\/section>\n<\/td>\n<td style=\"padding: 12px 16px;border: 1px solid rgb(222, 226, 230);\">\n<section><span leaf=\"\">\u63a5\u53e3\u5951\u7ea6\uff08\u8bf7\u6c42\/\u54cd\u5e94\u683c\u5f0f\uff09<\/span><\/section>\n<\/td>\n<td style=\"padding: 12px 16px;border: 1px solid rgb(222, 226, 230);\">\n<section><span leaf=\"\">\u771f\u5b9e\u670d\u52a1\u95f4\u4ea4\u4e92<\/span><\/section>\n<\/td>\n<\/tr>\n<tr style=\"background-color: rgb(255, 255, 255);\">\n<td style=\"padding: 12px 16px;border: 1px solid rgb(222, 226, 230);font-weight: 500;\">\n<section style=\"text-align: center;\"><span leaf=\"\">\u6267\u884c\u901f\u5ea6<\/span><\/section>\n<\/td>\n<td style=\"padding: 12px 16px;border: 1px solid rgb(222, 226, 230);\">\n<section><span leaf=\"\">\u5feb\uff08Mock\u670d\u52a1\uff09<\/span><\/section>\n<\/td>\n<td style=\"padding: 12px 16px;border: 1px solid rgb(222, 226, 230);\">\n<section><span leaf=\"\">\u6162\uff08\u771f\u5b9e\u7f51\u7edc\u8c03\u7528\uff09<\/span><\/section>\n<\/td>\n<\/tr>\n<tr style=\"background-color: rgb(248, 249, 250);\">\n<td style=\"padding: 12px 16px;border: 1px solid rgb(222, 226, 230);font-weight: 500;\">\n<section style=\"text-align: center;\"><span leaf=\"\">\u73af\u5883\u4f9d\u8d56<\/span><\/section>\n<\/td>\n<td style=\"padding: 12px 16px;border: 1px solid rgb(222, 226, 230);\">\n<section><span leaf=\"\">\u65e0\uff08\u53ef\u672c\u5730\u8fd0\u884c\uff09<\/span><\/section>\n<\/td>\n<td style=\"padding: 12px 16px;border: 1px solid rgb(222, 226, 230);\">\n<section><span leaf=\"\">\u9700\u8981\u90e8\u7f72\u4f9d\u8d56\u670d\u52a1<\/span><\/section>\n<\/td>\n<\/tr>\n<tr style=\"background-color: rgb(255, 255, 255);\">\n<td style=\"padding: 12px 16px;border: 1px solid rgb(222, 226, 230);font-weight: 500;\">\n<section style=\"text-align: center;\"><span leaf=\"\">\u53d1\u73b0\u95ee\u9898\u65f6\u673a<\/span><\/section>\n<\/td>\n<td style=\"padding: 12px 16px;border: 1px solid rgb(222, 226, 230);\">\n<section><span leaf=\"\">\u5f00\u53d1\u9636\u6bb5\uff08\u5951\u7ea6\u53d8\u66f4\u5373\u62a5\u9519\uff09<\/span><\/section>\n<\/td>\n<td style=\"padding: 12px 16px;border: 1px solid rgb(222, 226, 230);\">\n<section><span leaf=\"\">\u96c6\u6210\u9636\u6bb5\uff08\u90e8\u7f72\u540e\u624d\u53d1\u73b0\uff09<\/span><\/section>\n<\/td>\n<\/tr>\n<tr style=\"background-color: rgb(248, 249, 250);\">\n<td style=\"padding: 12px 16px;border: 1px solid rgb(222, 226, 230);font-weight: 500;\">\n<section style=\"text-align: center;\"><span leaf=\"\">\u7ef4\u62a4\u6210\u672c<\/span><\/section>\n<\/td>\n<td style=\"padding: 12px 16px;border: 1px solid rgb(222, 226, 230);\">\n<section><span leaf=\"\">\u4e2d\uff08\u9700\u8981\u7ef4\u62a4\u5951\u7ea6\u6587\u4ef6\uff09<\/span><\/section>\n<\/td>\n<td style=\"padding: 12px 16px;border: 1px solid rgb(222, 226, 230);\">\n<section><span leaf=\"\">\u9ad8\uff08\u73af\u5883\u4e0d\u7a33\u5b9a\u65f6\u7ecf\u5e38\u5931\u8d25\uff09<\/span><\/section>\n<\/td>\n<\/tr>\n<tr style=\"background-color: rgb(255, 255, 255);\">\n<td style=\"padding: 12px 16px;border: 1px solid rgb(222, 226, 230);font-weight: 500;\">\n<section style=\"text-align: center;\"><span leaf=\"\">\u63a8\u8350\u9636\u6bb5<\/span><\/section>\n<\/td>\n<td style=\"padding: 12px 16px;border: 1px solid rgb(222, 226, 230);\">\n<section><span leaf=\"\">CI\u6d41\u6c34\u7ebf\uff0cPull Request\u9636\u6bb5<\/span><\/section>\n<\/td>\n<td style=\"padding: 12px 16px;border: 1px solid rgb(222, 226, 230);\">\n<section><span leaf=\"\">staging\u73af\u5883\uff0c\u9884\u53d1\u5e03\u9a8c\u8bc1<\/span><\/section>\n<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<section><strong style=\"color: rgb(27, 94, 32);font-family: -apple-system, BlinkMacSystemFont, &quot;Segoe UI&quot;, &quot;PingFang SC&quot;, &quot;Hiragino Sans GB&quot;, &quot;Microsoft YaHei&quot;, sans-serif;font-size: 15px;font-style: normal;font-variant-ligatures: normal;font-variant-caps: normal;letter-spacing: normal;orphans: 2;text-align: start;text-indent: 0px;text-transform: none;widows: 2;word-spacing: 0px;-webkit-text-stroke-width: 0px;white-space: normal;background-color: rgb(232, 245, 233);text-decoration-thickness: initial;text-decoration-style: initial;text-decoration-color: initial;\" data-pm-slice=\"0 0 []\"><span leaf=\"\"><span textstyle=\"\" style=\"background-color: #ffffff;\">\u2705 \u7ed3\u8bba\uff1a<\/span><\/span><\/strong><span style=\"color: rgb(27, 94, 32);font-family: -apple-system, BlinkMacSystemFont, &quot;Segoe UI&quot;, &quot;PingFang SC&quot;, &quot;Hiragino Sans GB&quot;, &quot;Microsoft YaHei&quot;, sans-serif;font-size: 15px;font-style: normal;font-variant-ligatures: normal;font-variant-caps: normal;font-weight: 400;letter-spacing: normal;orphans: 2;text-align: start;text-indent: 0px;text-transform: none;widows: 2;word-spacing: 0px;-webkit-text-stroke-width: 0px;background-color: rgb(232, 245, 233);text-decoration-thickness: initial;text-decoration-style: initial;text-decoration-color: initial;display: inline !important;float: none;\"><span leaf=\"\"><span textstyle=\"\" style=\"background-color: #ffffff;\">\u5951\u7ea6\u6d4b\u8bd5\u548c\u96c6\u6210\u6d4b\u8bd5\u4e0d\u662f\u4e8c\u9009\u4e00\uff0c\u800c\u662f\u4e92\u8865\u3002\u5951\u7ea6\u6d4b\u8bd5\u4fdd\u8bc1&#8221;\u63a5\u53e3\u5951\u7ea6\u4e0d\u7834&#8221;\uff0c\u96c6\u6210\u6d4b\u8bd5\u4fdd\u8bc1&#8221;\u771f\u5b9e\u8c03\u7528\u53ef\u884c&#8221;\u3002<\/span><\/span><\/span><\/section>\n<hr style=\"border-style: solid;border-width: 1px 0 0;border-color: rgba(0,0,0,0.1);-webkit-transform-origin: 0 0;-webkit-transform: scale(1, 0.5);transform-origin: 0 0;transform: scale(1, 0.5);\"  \/>\n<section><span leaf=\"\"><br  \/><\/span><\/section>\n<h2 style=\"font-family: -apple-system, BlinkMacSystemFont, &quot;Segoe UI&quot;, &quot;PingFang SC&quot;, &quot;Hiragino Sans GB&quot;, &quot;Microsoft YaHei&quot;, sans-serif;font-style: normal;font-variant-ligatures: normal;font-variant-caps: normal;letter-spacing: normal;orphans: 2;text-align: start;text-indent: 0px;text-transform: none;widows: 2;word-spacing: 0px;-webkit-text-stroke-width: 0px;white-space: normal;text-decoration-thickness: initial;text-decoration-style: initial;text-decoration-color: initial;font-size: 24px;font-weight: bold;color: rgb(25, 118, 210);margin-top: 40px;margin-bottom: 20px;padding-bottom: 10px;border-bottom: 3px solid rgb(25, 118, 210);\" data-pm-slice=\"0 0 []\"><span leaf=\"\">\u56db\u3001\u63a5\u53e3\u81ea\u52a8\u5316\u6d4b\u8bd5\u6846\u67b6\u642d\u5efa<\/span><\/h2>\n<h3 style=\"color: rgb(51, 51, 51);font-family: -apple-system, BlinkMacSystemFont, &quot;Segoe UI&quot;, &quot;PingFang SC&quot;, &quot;Hiragino Sans GB&quot;, &quot;Microsoft YaHei&quot;, sans-serif;font-style: normal;font-variant-ligatures: normal;font-variant-caps: normal;letter-spacing: normal;orphans: 2;text-align: start;text-indent: 0px;text-transform: none;widows: 2;word-spacing: 0px;-webkit-text-stroke-width: 0px;white-space: normal;text-decoration-thickness: initial;text-decoration-style: initial;text-decoration-color: initial;font-size: 20px;font-weight: 600;margin-top: 30px;margin-bottom: 15px;\"><span leaf=\"\">4.1 \u6846\u67b6\u9009\u578b\u5bf9\u6bd4<\/span><\/h3>\n<p style=\"color: rgb(51, 51, 51);font-family: -apple-system, BlinkMacSystemFont, &quot;Segoe UI&quot;, &quot;PingFang SC&quot;, &quot;Hiragino Sans GB&quot;, &quot;Microsoft YaHei&quot;, sans-serif;font-size: 16px;font-style: normal;font-variant-ligatures: normal;font-variant-caps: normal;font-weight: 400;letter-spacing: normal;orphans: 2;text-align: start;text-indent: 0px;text-transform: none;widows: 2;word-spacing: 0px;-webkit-text-stroke-width: 0px;white-space: normal;text-decoration-thickness: initial;text-decoration-style: initial;text-decoration-color: initial;margin-bottom: 15px;\"><span leaf=\"\">\u9009\u62e9\u5408\u9002\u7684\u6d4b\u8bd5\u6846\u67b6\u662f\u6210\u529f\u7684\u4e00\u534a\u3002\u4ee5\u4e0b\u662f\u4e3b\u6d41\u5fae\u670d\u52a1\u63a5\u53e3\u6d4b\u8bd5\u6846\u67b6\u7684\u5bf9\u6bd4\uff1a<\/span><\/p>\n<table style=\"width: 800px;border-collapse: collapse;border: 1px solid rgb(222, 226, 230);font-size: 14px;\">\n<thead>\n<tr style=\"background: linear-gradient(135deg, rgb(52, 152, 219), rgb(41, 128, 185));color: rgb(255, 255, 255);\">\n<th style=\"padding: 14px 16px;text-align: left;font-weight: 600;border: 1px solid rgb(41, 128, 185);\">\n<section style=\"text-align: center;\"><span leaf=\"\"><span textstyle=\"\" style=\"color: #ffa900;\">\u6846\u67b6<\/span><\/span><\/section>\n<\/th>\n<th style=\"padding: 14px 16px;text-align: left;font-weight: 600;border: 1px solid rgb(41, 128, 185);\">\n<section style=\"text-align: center;\"><span leaf=\"\"><span textstyle=\"\" style=\"color: #ffa900;\">\u8bed\u8a00<\/span><\/span><\/section>\n<\/th>\n<th style=\"padding: 14px 16px;text-align: left;font-weight: 600;border: 1px solid rgb(41, 128, 185);\">\n<section style=\"text-align: center;\"><span leaf=\"\"><span textstyle=\"\" style=\"color: #ffa900;\">\u4f18\u52bf<\/span><\/span><\/section>\n<\/th>\n<th style=\"padding: 14px 16px;text-align: left;font-weight: 600;border: 1px solid rgb(41, 128, 185);\">\n<section style=\"text-align: center;\"><span leaf=\"\"><span textstyle=\"\" style=\"color: #ffa900;\">\u9002\u7528\u573a\u666f<\/span><\/span><\/section>\n<\/th>\n<th style=\"padding: 14px 16px;text-align: left;font-weight: 600;border: 1px solid rgb(41, 128, 185);\">\n<section style=\"text-align: center;\"><span leaf=\"\"><span textstyle=\"\" style=\"color: #ffa900;\">\u5b66\u4e60\u6210\u672c<\/span><\/span><\/section>\n<\/th>\n<\/tr>\n<\/thead>\n<tbody>\n<tr style=\"background-color: rgb(248, 249, 250);\">\n<td style=\"padding: 12px 16px;border: 1px solid rgb(222, 226, 230);font-weight: 500;\">\n<section><span leaf=\"\">PyTest + Requests<\/span><\/section>\n<\/td>\n<td style=\"padding: 12px 16px;border: 1px solid rgb(222, 226, 230);\">\n<section><span leaf=\"\">Python<\/span><\/section>\n<\/td>\n<td style=\"padding: 12px 16px;border: 1px solid rgb(222, 226, 230);\">\n<section><span leaf=\"\">\u7b80\u6d01\u7075\u6d3b\uff0c\u751f\u6001\u4e30\u5bcc\uff0cFixture\u5f3a\u5927<\/span><\/section>\n<\/td>\n<td style=\"padding: 12px 16px;border: 1px solid rgb(222, 226, 230);\">\n<section><span leaf=\"\">Python\u6280\u672f\u6808\u56e2\u961f<\/span><\/section>\n<\/td>\n<td style=\"padding: 12px 16px;border: 1px solid rgb(222, 226, 230);\">\n<section><span leaf=\"\">\u2b50\u2b50<\/span><\/section>\n<\/td>\n<\/tr>\n<tr style=\"background-color: rgb(255, 255, 255);\">\n<td style=\"padding: 12px 16px;border: 1px solid rgb(222, 226, 230);font-weight: 500;\">\n<section><span leaf=\"\">RestAssured<\/span><\/section>\n<\/td>\n<td style=\"padding: 12px 16px;border: 1px solid rgb(222, 226, 230);\">\n<section><span leaf=\"\">Java<\/span><\/section>\n<\/td>\n<td style=\"padding: 12px 16px;border: 1px solid rgb(222, 226, 230);\">\n<section><span leaf=\"\">DSL\u4f18\u96c5\uff0c\u4e0eJava\u751f\u6001\u65e0\u7f1d\u96c6\u6210<\/span><\/section>\n<\/td>\n<td style=\"padding: 12px 16px;border: 1px solid rgb(222, 226, 230);\">\n<section><span leaf=\"\">Java\u6280\u672f\u6808\u56e2\u961f<\/span><\/section>\n<\/td>\n<td style=\"padding: 12px 16px;border: 1px solid rgb(222, 226, 230);\">\n<section><span leaf=\"\">\u2b50\u2b50\u2b50<\/span><\/section>\n<\/td>\n<\/tr>\n<tr style=\"background-color: rgb(248, 249, 250);\">\n<td style=\"padding: 12px 16px;border: 1px solid rgb(222, 226, 230);font-weight: 500;\">\n<section><span leaf=\"\">SuperTest<\/span><\/section>\n<\/td>\n<td style=\"padding: 12px 16px;border: 1px solid rgb(222, 226, 230);\">\n<section><span leaf=\"\">Node.js<\/span><\/section>\n<\/td>\n<td style=\"padding: 12px 16px;border: 1px solid rgb(222, 226, 230);\">\n<section><span leaf=\"\">\u8f7b\u91cf\u7ea7\uff0c\u9002\u5408Express\/Koa\u63a5\u53e3\u6d4b\u8bd5<\/span><\/section>\n<\/td>\n<td style=\"padding: 12px 16px;border: 1px solid rgb(222, 226, 230);\">\n<section><span leaf=\"\">\u524d\u7aef\/Node.js\u56e2\u961f<\/span><\/section>\n<\/td>\n<td style=\"padding: 12px 16px;border: 1px solid rgb(222, 226, 230);\">\n<section><span leaf=\"\">\u2b50\u2b50<\/span><\/section>\n<\/td>\n<\/tr>\n<tr style=\"background-color: rgb(255, 255, 255);\">\n<td style=\"padding: 12px 16px;border: 1px solid rgb(222, 226, 230);font-weight: 500;\">\n<section><span leaf=\"\">Postman + Newman<\/span><\/section>\n<\/td>\n<td style=\"padding: 12px 16px;border: 1px solid rgb(222, 226, 230);\">\n<section><span leaf=\"\">GUI + Node.js<\/span><\/section>\n<\/td>\n<td style=\"padding: 12px 16px;border: 1px solid rgb(222, 226, 230);\">\n<section><span leaf=\"\">\u6613\u4e0a\u624b\uff0c\u534f\u4f5c\u53cb\u597d\uff0c\u652f\u6301CI<\/span><\/section>\n<\/td>\n<td style=\"padding: 12px 16px;border: 1px solid rgb(222, 226, 230);\">\n<section><span leaf=\"\">\u975e\u7a0b\u5e8f\u5458\u3001\u5feb\u901f\u539f\u578b<\/span><\/section>\n<\/td>\n<td style=\"padding: 12px 16px;border: 1px solid rgb(222, 226, 230);\">\n<section><span leaf=\"\">\u2b50<\/span><\/section>\n<\/td>\n<\/tr>\n<tr style=\"background-color: rgb(248, 249, 250);\">\n<td style=\"padding: 12px 16px;border: 1px solid rgb(222, 226, 230);font-weight: 500;\">\n<section><span leaf=\"\">Karate<\/span><\/section>\n<\/td>\n<td style=\"padding: 12px 16px;border: 1px solid rgb(222, 226, 230);\">\n<section><span leaf=\"\">Java + DSL<\/span><\/section>\n<\/td>\n<td style=\"padding: 12px 16px;border: 1px solid rgb(222, 226, 230);\">\n<section><span leaf=\"\">BDD\u8bed\u6cd5\uff0c\u5185\u7f6e\u65ad\u8a00\uff0c\u652f\u6301GraphQL<\/span><\/section>\n<\/td>\n<td style=\"padding: 12px 16px;border: 1px solid rgb(222, 226, 230);\">\n<section><span leaf=\"\">API\u81ea\u52a8\u5316\u4e13\u9879\u56e2\u961f<\/span><\/section>\n<\/td>\n<td style=\"padding: 12px 16px;border: 1px solid rgb(222, 226, 230);\">\n<section><span leaf=\"\">\u2b50\u2b50<\/span><\/section>\n<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<h3 style=\"color: rgb(51, 51, 51);font-family: -apple-system, BlinkMacSystemFont, &quot;Segoe UI&quot;, &quot;PingFang SC&quot;, &quot;Hiragino Sans GB&quot;, &quot;Microsoft YaHei&quot;, sans-serif;font-style: normal;font-variant-ligatures: normal;font-variant-caps: normal;letter-spacing: normal;orphans: 2;text-align: start;text-indent: 0px;text-transform: none;widows: 2;word-spacing: 0px;-webkit-text-stroke-width: 0px;white-space: normal;text-decoration-thickness: initial;text-decoration-style: initial;text-decoration-color: initial;font-size: 20px;font-weight: 600;margin-top: 30px;margin-bottom: 15px;\"><span leaf=\"\">4.2 PyTest + Requests \u5b8c\u6574\u793a\u4f8b<\/span><\/h3>\n<p style=\"color: rgb(51, 51, 51);font-family: -apple-system, BlinkMacSystemFont, &quot;Segoe UI&quot;, &quot;PingFang SC&quot;, &quot;Hiragino Sans GB&quot;, &quot;Microsoft YaHei&quot;, sans-serif;font-size: 16px;font-style: normal;font-variant-ligatures: normal;font-variant-caps: normal;font-weight: 400;letter-spacing: normal;orphans: 2;text-align: start;text-indent: 0px;text-transform: none;widows: 2;word-spacing: 0px;-webkit-text-stroke-width: 0px;white-space: normal;text-decoration-thickness: initial;text-decoration-style: initial;text-decoration-color: initial;margin-bottom: 15px;\"><span leaf=\"\">\u4ee5<\/span><strong><span leaf=\"\">PyTest + Requests<\/span><\/strong><span leaf=\"\">\u4e3a\u4f8b\uff0c\u5c55\u793a\u4e00\u4e2a\u5b8c\u6574\u7684\u5fae\u670d\u52a1\u63a5\u53e3\u81ea\u52a8\u5316\u6d4b\u8bd5\u6846\u67b6\uff1a<\/span><\/p>\n<section class=\"code-snippet__fix code-snippet__js\">\n<ul class=\"code-snippet__line-index code-snippet__js\">\n<li><\/li>\n<li><\/li>\n<li><\/li>\n<li><\/li>\n<li><\/li>\n<li><\/li>\n<li><\/li>\n<li><\/li>\n<li><\/li>\n<li><\/li>\n<li><\/li>\n<li><\/li>\n<li><\/li>\n<li><\/li>\n<li><\/li>\n<li><\/li>\n<li><\/li>\n<li><\/li>\n<li><\/li>\n<li><\/li>\n<li><\/li>\n<li><\/li>\n<li><\/li>\n<li><\/li>\n<li><\/li>\n<li><\/li>\n<li><\/li>\n<li><\/li>\n<li><\/li>\n<li><\/li>\n<li><\/li>\n<li><\/li>\n<li><\/li>\n<li><\/li>\n<li><\/li>\n<li><\/li>\n<li><\/li>\n<li><\/li>\n<li><\/li>\n<li><\/li>\n<li><\/li>\n<li><\/li>\n<li><\/li>\n<li><\/li>\n<li><\/li>\n<li><\/li>\n<li><\/li>\n<li><\/li>\n<li><\/li>\n<li><\/li>\n<li><\/li>\n<li><\/li>\n<li><\/li>\n<li><\/li>\n<li><\/li>\n<li><\/li>\n<li><\/li>\n<li><\/li>\n<li><\/li>\n<li><\/li>\n<li><\/li>\n<li><\/li>\n<li><\/li>\n<li><\/li>\n<li><\/li>\n<li><\/li>\n<li><\/li>\n<li><\/li>\n<li><\/li>\n<li><\/li>\n<li><\/li>\n<li><\/li>\n<li><\/li>\n<li><\/li>\n<li><\/li>\n<li><\/li>\n<li><\/li>\n<li><\/li>\n<li><\/li>\n<li><\/li>\n<li><\/li>\n<li><\/li>\n<li><\/li>\n<li><\/li>\n<li><\/li>\n<li><\/li>\n<li><\/li>\n<li><\/li>\n<li><\/li>\n<li><\/li>\n<\/ul>\n<pre class=\"code-snippet__js\" data-lang=\"python\"><code><span leaf=\"\"><span class=\"code-snippet__comment\"># tests\/test_order_service.py<\/span><\/span><\/code><code><span leaf=\"\"><span class=\"code-snippet__keyword\">import<\/span>&nbsp;pytest<\/span><\/code><code><span leaf=\"\"><span class=\"code-snippet__keyword\">import<\/span>&nbsp;requests<\/span><\/code><code><span leaf=\"\"><span class=\"code-snippet__keyword\">from<\/span>&nbsp;config&nbsp;<span class=\"code-snippet__keyword\">import<\/span>&nbsp;BASE_URL, AUTH_TOKEN<\/span><\/code><code><span leaf=\"\"><span class=\"code-snippet__comment\"># Fixture\uff1a\u521b\u5efa\u6d4b\u8bd5\u6570\u636e<\/span><\/span><\/code><code><span leaf=\"\"><span class=\"code-snippet__meta\">@pytest.fixture<\/span><\/span><\/code><code><span leaf=\"\"><span class=\"code-snippet__keyword\">def<\/span>&nbsp;<span class=\"code-snippet__title\">create_test_user<\/span>():<\/span><\/code><code><span leaf=\"\">&nbsp; &nbsp;&nbsp;<span class=\"code-snippet__string\">\"\"\"\u521b\u5efa\u6d4b\u8bd5\u7528\u6237\"\"\"<\/span><\/span><\/code><code><span leaf=\"\">&nbsp; &nbsp; response = requests.post(<span class=\"code-snippet__string\">f\"<\/span><span class=\"code-snippet__string\"><span class=\"code-snippet__subst\">{BASE_URL}<\/span><\/span><span class=\"code-snippet__string\">\/users\"<\/span>, json={<\/span><\/code><code><span leaf=\"\">&nbsp; &nbsp; &nbsp; &nbsp;&nbsp;<span class=\"code-snippet__string\">\"username\"<\/span>:&nbsp;<span class=\"code-snippet__string\">\"test_user_001\"<\/span>,<\/span><\/code><code><span leaf=\"\">&nbsp; &nbsp; &nbsp; &nbsp;&nbsp;<span class=\"code-snippet__string\">\"email\"<\/span>:&nbsp;<span class=\"code-snippet__string\">\"test@example.com\"<\/span><\/span><\/code><code><span leaf=\"\">&nbsp; &nbsp; }, headers={<span class=\"code-snippet__string\">\"Authorization\"<\/span>:&nbsp;<span class=\"code-snippet__string\">f\"Bearer&nbsp;<\/span><span class=\"code-snippet__string\"><span class=\"code-snippet__subst\">{AUTH_TOKEN}<\/span><\/span><span class=\"code-snippet__string\">\"<\/span>})<\/span><\/code><code><span leaf=\"\">&nbsp; &nbsp; user_id = response.json()[<span class=\"code-snippet__string\">\"id\"<\/span>]<\/span><\/code><code><span leaf=\"\">&nbsp; &nbsp;&nbsp;<span class=\"code-snippet__keyword\">yield<\/span>&nbsp;user_id<\/span><\/code><code><span leaf=\"\">&nbsp; &nbsp;&nbsp;<span class=\"code-snippet__comment\"># Teardown\uff1a\u6e05\u7406\u6d4b\u8bd5\u6570\u636e<\/span><\/span><\/code><code><span leaf=\"\">&nbsp; &nbsp; requests.delete(<span class=\"code-snippet__string\">f\"<\/span><span class=\"code-snippet__string\"><span class=\"code-snippet__subst\">{BASE_URL}<\/span><\/span><span class=\"code-snippet__string\">\/users\/<\/span><span class=\"code-snippet__string\"><span class=\"code-snippet__subst\">{user_id}<\/span><\/span><span class=\"code-snippet__string\">\"<\/span>,&nbsp;<\/span><\/code><code><span leaf=\"\">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; headers={<span class=\"code-snippet__string\">\"Authorization\"<\/span>:&nbsp;<span class=\"code-snippet__string\">f\"Bearer&nbsp;<\/span><span class=\"code-snippet__string\"><span class=\"code-snippet__subst\">{AUTH_TOKEN}<\/span><\/span><span class=\"code-snippet__string\">\"<\/span>})<\/span><\/code><code><span leaf=\"\"><span class=\"code-snippet__comment\"># Fixture\uff1a\u83b7\u53d6API\u5ba2\u6237\u7aef<\/span><\/span><\/code><code><span leaf=\"\"><span class=\"code-snippet__meta\">@pytest.fixture<\/span><\/span><\/code><code><span leaf=\"\"><span class=\"code-snippet__keyword\">def<\/span>&nbsp;<span class=\"code-snippet__title\">api_client<\/span>():<\/span><\/code><code><span leaf=\"\">&nbsp; &nbsp; session = requests.Session()<\/span><\/code><code><span leaf=\"\">&nbsp; &nbsp; session.headers.update({<\/span><\/code><code><span leaf=\"\">&nbsp; &nbsp; &nbsp; &nbsp;&nbsp;<span class=\"code-snippet__string\">\"Authorization\"<\/span>:&nbsp;<span class=\"code-snippet__string\">f\"Bearer&nbsp;<\/span><span class=\"code-snippet__string\"><span class=\"code-snippet__subst\">{AUTH_TOKEN}<\/span><\/span><span class=\"code-snippet__string\">\"<\/span>,<\/span><\/code><code><span leaf=\"\">&nbsp; &nbsp; &nbsp; &nbsp;&nbsp;<span class=\"code-snippet__string\">\"Content-Type\"<\/span>:&nbsp;<span class=\"code-snippet__string\">\"application\/json\"<\/span><\/span><\/code><code><span leaf=\"\">&nbsp; &nbsp; })<\/span><\/code><code><span leaf=\"\">&nbsp; &nbsp;&nbsp;<span class=\"code-snippet__keyword\">return<\/span>&nbsp;session<\/span><\/code><code><span leaf=\"\"><span class=\"code-snippet__keyword\">class<\/span>&nbsp;<span class=\"code-snippet__title\">TestOrderService<\/span>:<\/span><\/code><code><span leaf=\"\">&nbsp; &nbsp;&nbsp;<span class=\"code-snippet__string\">\"\"\"\u8ba2\u5355\u670d\u52a1\u63a5\u53e3\u6d4b\u8bd5\"\"\"<\/span><\/span><\/code><code><span leaf=\"\">&nbsp; &nbsp;&nbsp;<span class=\"code-snippet__keyword\">def<\/span>&nbsp;<span class=\"code-snippet__title\">test_create_order_success<\/span>(<span class=\"code-snippet__params\">self, api_client, create_test_user<\/span>):<\/span><\/code><code><span leaf=\"\">&nbsp; &nbsp; &nbsp; &nbsp;&nbsp;<span class=\"code-snippet__string\">\"\"\"\u6d4b\u8bd5\u521b\u5efa\u8ba2\u5355 - \u6210\u529f\u573a\u666f\"\"\"<\/span><\/span><\/code><code><span leaf=\"\">&nbsp; &nbsp; &nbsp; &nbsp; user_id = create_test_user<\/span><\/code><code><span leaf=\"\"><br  \/><\/span><\/code><code><span leaf=\"\">&nbsp; &nbsp; &nbsp; &nbsp;&nbsp;<span class=\"code-snippet__comment\"># \u8c03\u7528\u521b\u5efa\u8ba2\u5355\u63a5\u53e3<\/span><\/span><\/code><code><span leaf=\"\">&nbsp; &nbsp; &nbsp; &nbsp; response = api_client.post(<span class=\"code-snippet__string\">f\"<\/span><span class=\"code-snippet__string\"><span class=\"code-snippet__subst\">{BASE_URL}<\/span><\/span><span class=\"code-snippet__string\">\/orders\"<\/span>, json={<\/span><\/code><code><span leaf=\"\">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp;<span class=\"code-snippet__string\">\"userId\"<\/span>: user_id,<\/span><\/code><code><span leaf=\"\">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp;<span class=\"code-snippet__string\">\"productId\"<\/span>:&nbsp;<span class=\"code-snippet__string\">\"PROD-001\"<\/span>,<\/span><\/code><code><span leaf=\"\">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp;<span class=\"code-snippet__string\">\"quantity\"<\/span>:&nbsp;<span class=\"code-snippet__number\">2<\/span>,<\/span><\/code><code><span leaf=\"\">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp;<span class=\"code-snippet__string\">\"shippingAddress\"<\/span>: {<\/span><\/code><code><span leaf=\"\">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp;<span class=\"code-snippet__string\">\"province\"<\/span>:&nbsp;<span class=\"code-snippet__string\">\"\u5e7f\u4e1c\"<\/span>,<\/span><\/code><code><span leaf=\"\">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp;<span class=\"code-snippet__string\">\"city\"<\/span>:&nbsp;<span class=\"code-snippet__string\">\"\u6df1\u5733\"<\/span><\/span><\/code><code><span leaf=\"\">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; }<\/span><\/code><code><span leaf=\"\">&nbsp; &nbsp; &nbsp; &nbsp; })<\/span><\/code><code><span leaf=\"\">&nbsp; &nbsp; &nbsp; &nbsp;&nbsp;<span class=\"code-snippet__comment\"># \u65ad\u8a00\uff1a\u72b6\u6001\u7801<\/span><\/span><\/code><code><span leaf=\"\">&nbsp; &nbsp; &nbsp; &nbsp;&nbsp;<span class=\"code-snippet__keyword\">assert<\/span>&nbsp;response.status_code ==&nbsp;<span class=\"code-snippet__number\">201<\/span>,&nbsp;<span class=\"code-snippet__string\">f\"Expected 201, got&nbsp;<\/span><span class=\"code-snippet__string\"><span class=\"code-snippet__subst\">{response.status_code}<\/span><\/span><span class=\"code-snippet__string\">\"<\/span><\/span><\/code><code><span leaf=\"\"><br  \/><\/span><\/code><code><span leaf=\"\">&nbsp; &nbsp; &nbsp; &nbsp;&nbsp;<span class=\"code-snippet__comment\"># \u65ad\u8a00\uff1a\u54cd\u5e94\u4f53\u7ed3\u6784<\/span><\/span><\/code><code><span leaf=\"\">&nbsp; &nbsp; &nbsp; &nbsp; data = response.json()<\/span><\/code><code><span leaf=\"\">&nbsp; &nbsp; &nbsp; &nbsp;&nbsp;<span class=\"code-snippet__keyword\">assert<\/span>&nbsp;<span class=\"code-snippet__string\">\"orderId\"<\/span>&nbsp;<span class=\"code-snippet__keyword\">in<\/span>&nbsp;data,&nbsp;<span class=\"code-snippet__string\">\"Response should contain orderId\"<\/span><\/span><\/code><code><span leaf=\"\">&nbsp; &nbsp; &nbsp; &nbsp;&nbsp;<span class=\"code-snippet__keyword\">assert<\/span>&nbsp;<span class=\"code-snippet__string\">\"status\"<\/span>&nbsp;<span class=\"code-snippet__keyword\">in<\/span>&nbsp;data,&nbsp;<span class=\"code-snippet__string\">\"Response should contain status\"<\/span><\/span><\/code><code><span leaf=\"\">&nbsp; &nbsp; &nbsp; &nbsp;&nbsp;<span class=\"code-snippet__keyword\">assert<\/span>&nbsp;data[<span class=\"code-snippet__string\">\"status\"<\/span>] ==&nbsp;<span class=\"code-snippet__string\">\"CREATED\"<\/span>,&nbsp;<span class=\"code-snippet__string\">\"Order status should be CREATED\"<\/span><\/span><\/code><code><span leaf=\"\"><br  \/><\/span><\/code><code><span leaf=\"\">&nbsp; &nbsp; &nbsp; &nbsp;&nbsp;<span class=\"code-snippet__comment\"># \u65ad\u8a00\uff1a\u6570\u636e\u7ed3\u6784\u7c7b\u578b<\/span><\/span><\/code><code><span leaf=\"\">&nbsp; &nbsp; &nbsp; &nbsp;&nbsp;<span class=\"code-snippet__keyword\">assert<\/span>&nbsp;<span class=\"code-snippet__built_in\">isinstance<\/span>(data[<span class=\"code-snippet__string\">\"orderId\"<\/span>],&nbsp;<span class=\"code-snippet__built_in\">str<\/span>),&nbsp;<span class=\"code-snippet__string\">\"orderId should be string\"<\/span><\/span><\/code><code><span leaf=\"\">&nbsp; &nbsp; &nbsp; &nbsp;&nbsp;<span class=\"code-snippet__keyword\">assert<\/span>&nbsp;<span class=\"code-snippet__built_in\">len<\/span>(data[<span class=\"code-snippet__string\">\"orderId\"<\/span>]) &gt;&nbsp;<span class=\"code-snippet__number\">0<\/span>,&nbsp;<span class=\"code-snippet__string\">\"orderId should not be empty\"<\/span><\/span><\/code><code><span leaf=\"\">&nbsp; &nbsp; @pytest.mark.parametrize(<span class=\"code-snippet__string\">\"invalid_data,expected_error\"<\/span>, [<\/span><\/code><code><span leaf=\"\">&nbsp; &nbsp; &nbsp; &nbsp; ({<span class=\"code-snippet__string\">\"userId\"<\/span>:&nbsp;<span class=\"code-snippet__string\">\"\"<\/span>},&nbsp;<span class=\"code-snippet__string\">\"userId is required\"<\/span>),<\/span><\/code><code><span leaf=\"\">&nbsp; &nbsp; &nbsp; &nbsp; ({<span class=\"code-snippet__string\">\"productId\"<\/span>:&nbsp;<span class=\"code-snippet__string\">\"INVALID\"<\/span>},&nbsp;<span class=\"code-snippet__string\">\"product not found\"<\/span>),<\/span><\/code><code><span leaf=\"\">&nbsp; &nbsp; &nbsp; &nbsp; ({<span class=\"code-snippet__string\">\"quantity\"<\/span>:&nbsp;<span class=\"code-snippet__number\">0<\/span>},&nbsp;<span class=\"code-snippet__string\">\"quantity must be positive\"<\/span>),<\/span><\/code><code><span leaf=\"\">&nbsp; &nbsp; ])<\/span><\/code><code><span leaf=\"\">&nbsp; &nbsp;&nbsp;<span class=\"code-snippet__keyword\">def<\/span>&nbsp;<span class=\"code-snippet__title\">test_create_order_validation<\/span>(<span class=\"code-snippet__params\">self, api_client, invalid_data, expected_error<\/span>):<\/span><\/code><code><span leaf=\"\">&nbsp; &nbsp; &nbsp; &nbsp;&nbsp;<span class=\"code-snippet__string\">\"\"\"\u53c2\u6570\u5316\u6d4b\u8bd5\uff1a\u521b\u5efa\u8ba2\u5355 - \u53c2\u6570\u6821\u9a8c\"\"\"<\/span><\/span><\/code><code><span leaf=\"\">&nbsp; &nbsp; &nbsp; &nbsp; response = api_client.post(<span class=\"code-snippet__string\">f\"<\/span><span class=\"code-snippet__string\"><span class=\"code-snippet__subst\">{BASE_URL}<\/span><\/span><span class=\"code-snippet__string\">\/orders\"<\/span>, json=invalid_data)<\/span><\/code><code><span leaf=\"\"><br  \/><\/span><\/code><code><span leaf=\"\">&nbsp; &nbsp; &nbsp; &nbsp;&nbsp;<span class=\"code-snippet__keyword\">assert<\/span>&nbsp;response.status_code ==&nbsp;<span class=\"code-snippet__number\">400<\/span><\/span><\/code><code><span leaf=\"\">&nbsp; &nbsp; &nbsp; &nbsp;&nbsp;<span class=\"code-snippet__keyword\">assert<\/span>&nbsp;expected_error&nbsp;<span class=\"code-snippet__keyword\">in<\/span>&nbsp;response.json()[<span class=\"code-snippet__string\">\"message\"<\/span>]<\/span><\/code><code><span leaf=\"\">&nbsp; &nbsp;&nbsp;<span class=\"code-snippet__keyword\">def<\/span>&nbsp;<span class=\"code-snippet__title\">test_get_order_by_id<\/span>(<span class=\"code-snippet__params\">self, api_client, create_test_user<\/span>):<\/span><\/code><code><span leaf=\"\">&nbsp; &nbsp; &nbsp; &nbsp;&nbsp;<span class=\"code-snippet__string\">\"\"\"\u6d4b\u8bd5\u67e5\u8be2\u8ba2\u5355\u8be6\u60c5\"\"\"<\/span><\/span><\/code><code><span leaf=\"\">&nbsp; &nbsp; &nbsp; &nbsp;&nbsp;<span class=\"code-snippet__comment\"># \u5148\u521b\u5efa\u8ba2\u5355<\/span><\/span><\/code><code><span leaf=\"\">&nbsp; &nbsp; &nbsp; &nbsp; create_resp = api_client.post(<span class=\"code-snippet__string\">f\"<\/span><span class=\"code-snippet__string\"><span class=\"code-snippet__subst\">{BASE_URL}<\/span><\/span><span class=\"code-snippet__string\">\/orders\"<\/span>, json={<\/span><\/code><code><span leaf=\"\">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp;<span class=\"code-snippet__string\">\"userId\"<\/span>: create_test_user,<\/span><\/code><code><span leaf=\"\">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp;<span class=\"code-snippet__string\">\"productId\"<\/span>:&nbsp;<span class=\"code-snippet__string\">\"PROD-001\"<\/span>,<\/span><\/code><code><span leaf=\"\">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp;<span class=\"code-snippet__string\">\"quantity\"<\/span>:&nbsp;<span class=\"code-snippet__number\">1<\/span><\/span><\/code><code><span leaf=\"\">&nbsp; &nbsp; &nbsp; &nbsp; })<\/span><\/code><code><span leaf=\"\">&nbsp; &nbsp; &nbsp; &nbsp; order_id = create_resp.json()[<span class=\"code-snippet__string\">\"orderId\"<\/span>]<\/span><\/code><code><span leaf=\"\">&nbsp; &nbsp; &nbsp; &nbsp;&nbsp;<span class=\"code-snippet__comment\"># \u67e5\u8be2\u8ba2\u5355<\/span><\/span><\/code><code><span leaf=\"\">&nbsp; &nbsp; &nbsp; &nbsp; get_resp = api_client.get(<span class=\"code-snippet__string\">f\"<\/span><span class=\"code-snippet__string\"><span class=\"code-snippet__subst\">{BASE_URL}<\/span><\/span><span class=\"code-snippet__string\">\/orders\/<\/span><span class=\"code-snippet__string\"><span class=\"code-snippet__subst\">{order_id}<\/span><\/span><span class=\"code-snippet__string\">\"<\/span>)<\/span><\/code><code><span leaf=\"\"><br  \/><\/span><\/code><code><span leaf=\"\">&nbsp; &nbsp; &nbsp; &nbsp;&nbsp;<span class=\"code-snippet__keyword\">assert<\/span>&nbsp;get_resp.status_code ==&nbsp;<span class=\"code-snippet__number\">200<\/span><\/span><\/code><code><span leaf=\"\">&nbsp; &nbsp; &nbsp; &nbsp;&nbsp;<span class=\"code-snippet__keyword\">assert<\/span>&nbsp;get_resp.json()[<span class=\"code-snippet__string\">\"orderId\"<\/span>] == order_id<\/span><\/code><code><span leaf=\"\">&nbsp; &nbsp; &nbsp; &nbsp;&nbsp;<span class=\"code-snippet__keyword\">assert<\/span>&nbsp;<span class=\"code-snippet__string\">\"createdAt\"<\/span>&nbsp;<span class=\"code-snippet__keyword\">in<\/span>&nbsp;get_resp.json()<\/span><\/code><code><span leaf=\"\">&nbsp; &nbsp; @pytest.mark.slow<\/span><\/code><code><span leaf=\"\">&nbsp; &nbsp;&nbsp;<span class=\"code-snippet__keyword\">def<\/span>&nbsp;<span class=\"code-snippet__title\">test_order_timeout_scenario<\/span>(<span class=\"code-snippet__params\">self, api_client<\/span>):<\/span><\/code><code><span leaf=\"\">&nbsp; &nbsp; &nbsp; &nbsp;&nbsp;<span class=\"code-snippet__string\">\"\"\"\u6d4b\u8bd5\u8ba2\u5355\u670d\u52a1\u8d85\u65f6\u5904\u7406\"\"\"<\/span><\/span><\/code><code><span leaf=\"\">&nbsp; &nbsp; &nbsp; &nbsp;&nbsp;<span class=\"code-snippet__comment\"># \u6a21\u62df\u8d85\u65f6\u573a\u666f\uff08\u9700\u8981Mock\u670d\u52a1\u914d\u5408\uff09<\/span><\/span><\/code><code><span leaf=\"\">&nbsp; &nbsp; &nbsp; &nbsp;&nbsp;<span class=\"code-snippet__keyword\">with<\/span>&nbsp;pytest.raises(requests.exceptions.Timeout):<\/span><\/code><code><span leaf=\"\">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; api_client.post(<\/span><\/code><code><span leaf=\"\">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp;<span class=\"code-snippet__string\">f\"<\/span><span class=\"code-snippet__string\"><span class=\"code-snippet__subst\">{BASE_URL}<\/span><\/span><span class=\"code-snippet__string\">\/orders\"<\/span>,<\/span><\/code><code><span leaf=\"\">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; json={<span class=\"code-snippet__string\">\"userId\"<\/span>:&nbsp;<span class=\"code-snippet__string\">\"123\"<\/span>,&nbsp;<span class=\"code-snippet__string\">\"productId\"<\/span>:&nbsp;<span class=\"code-snippet__string\">\"PROD-001\"<\/span>},<\/span><\/code><code><span leaf=\"\">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; timeout=<span class=\"code-snippet__number\">0.001<\/span>&nbsp;&nbsp;<span class=\"code-snippet__comment\"># \u6781\u77ed\u8d85\u65f6<\/span><\/span><\/code><code><span leaf=\"\">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; )<\/span><\/code><\/pre>\n<\/section>\n<section><strong style=\"color: rgb(51, 51, 51);font-family: -apple-system, BlinkMacSystemFont, &quot;Segoe UI&quot;, &quot;PingFang SC&quot;, &quot;Hiragino Sans GB&quot;, &quot;Microsoft YaHei&quot;, sans-serif;font-size: 15px;font-style: normal;font-variant-ligatures: normal;font-variant-caps: normal;letter-spacing: normal;orphans: 2;text-align: start;text-indent: 0px;text-transform: none;widows: 2;word-spacing: 0px;-webkit-text-stroke-width: 0px;white-space: normal;background-color: rgb(255, 255, 255);text-decoration-thickness: initial;text-decoration-style: initial;text-decoration-color: initial;\" data-pm-slice=\"0 0 []\"><span leaf=\"\">\u76ee\u5f55\u7ed3\u6784\u5efa\u8bae\uff1a<\/span><\/strong><\/section>\n<table>\n<tbody>\n<tr>\n<td data-colwidth=\"576\">\n<p data-pm-slice=\"0 0 []\"><span leaf=\"\">microservice-test-framework\/<\/span><\/p>\n<p><span leaf=\"\">\u251c\u2500\u2500 config\/<\/span><\/p>\n<p><span leaf=\"\">\u251c\u2500\u2500 __init__.py<\/span><\/p>\n<p><span leaf=\"\">\u2514\u2500\u2500 config.py &nbsp;<\/span><span style=\"color: rgb(153, 153, 153);\"><span leaf=\"\"># \u73af\u5883\u914d\u7f6e<\/span><\/span><\/p>\n<p><span leaf=\"\">\u251c\u2500\u2500 tests\/<\/span><\/p>\n<p><span leaf=\"\">\u251c\u2500\u2500 __init__.py<\/span><\/p>\n<p><span leaf=\"\">\u251c\u2500\u2500 conftest.py &nbsp;<\/span><span style=\"color: rgb(153, 153, 153);\"><span leaf=\"\"># \u516c\u5171Fixture<\/span><\/span><\/p>\n<p><span leaf=\"\">\u251c\u2500\u2500 test_order_service.py<\/span><\/p>\n<p><span leaf=\"\">\u2514\u2500\u2500 test_payment_service.py<\/span><\/p>\n<p><span leaf=\"\">\u251c\u2500\u2500 utils\/<\/span><\/p>\n<p><span leaf=\"\">\u251c\u2500\u2500 api_client.py &nbsp;<\/span><span style=\"color: rgb(153, 153, 153);\"><span leaf=\"\"># \u5c01\u88c5API\u8c03\u7528<\/span><\/span><\/p>\n<p><span leaf=\"\">\u2514\u2500\u2500 assertions.py &nbsp;<\/span><span style=\"color: rgb(153, 153, 153);\"><span leaf=\"\"># \u81ea\u5b9a\u4e49\u65ad\u8a00<\/span><\/span><\/p>\n<p><span leaf=\"\">\u251c\u2500\u2500 data\/ &nbsp;<\/span><span style=\"color: rgb(153, 153, 153);\"><span leaf=\"\"># \u6d4b\u8bd5\u6570\u636e<\/span><\/span><\/p>\n<p><span leaf=\"\">\u251c\u2500\u2500 pytest.ini &nbsp;<\/span><span style=\"color: rgb(153, 153, 153);\"><span leaf=\"\"># PyTest\u914d\u7f6e<\/span><\/span><\/p>\n<p><span leaf=\"\">\u2514\u2500\u2500 requirements.txt<\/span><\/p>\n<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<h3 style=\"color: rgb(51, 51, 51);font-family: -apple-system, BlinkMacSystemFont, &quot;Segoe UI&quot;, &quot;PingFang SC&quot;, &quot;Hiragino Sans GB&quot;, &quot;Microsoft YaHei&quot;, sans-serif;font-style: normal;font-variant-ligatures: normal;font-variant-caps: normal;letter-spacing: normal;orphans: 2;text-align: start;text-indent: 0px;text-transform: none;widows: 2;word-spacing: 0px;-webkit-text-stroke-width: 0px;white-space: normal;text-decoration-thickness: initial;text-decoration-style: initial;text-decoration-color: initial;font-size: 20px;font-weight: 600;margin-top: 30px;margin-bottom: 15px;\" data-pm-slice=\"0 0 []\"><span leaf=\"\">4.3 \u6570\u636e\u9a71\u52a8\u4e0e\u53c2\u6570\u5316<\/span><\/h3>\n<p style=\"color: rgb(51, 51, 51);font-family: -apple-system, BlinkMacSystemFont, &quot;Segoe UI&quot;, &quot;PingFang SC&quot;, &quot;Hiragino Sans GB&quot;, &quot;Microsoft YaHei&quot;, sans-serif;font-size: 16px;font-style: normal;font-variant-ligatures: normal;font-variant-caps: normal;font-weight: 400;letter-spacing: normal;orphans: 2;text-align: start;text-indent: 0px;text-transform: none;widows: 2;word-spacing: 0px;-webkit-text-stroke-width: 0px;white-space: normal;text-decoration-thickness: initial;text-decoration-style: initial;text-decoration-color: initial;margin-bottom: 15px;\"><span leaf=\"\">\u6570\u636e\u9a71\u52a8\u6d4b\u8bd5\uff08Data-Driven Testing\uff09\u662f\u63a5\u53e3\u81ea\u52a8\u5316\u7684\u91cd\u8981\u7ec4\u6210\u90e8\u5206\u3002\u901a\u8fc7<\/span><strong><span leaf=\"\">\u53c2\u6570\u5316<\/span><\/strong><span leaf=\"\">\uff0c\u53ef\u4ee5\u7528\u4e00\u5957\u6d4b\u8bd5\u903b\u8f91\u8986\u76d6\u591a\u79cd\u573a\u666f\u3002<\/span><\/p>\n<section class=\"code-snippet__fix code-snippet__js\">\n<ul class=\"code-snippet__line-index code-snippet__js\">\n<li><\/li>\n<li><\/li>\n<li><\/li>\n<li><\/li>\n<li><\/li>\n<li><\/li>\n<li><\/li>\n<li><\/li>\n<li><\/li>\n<li><\/li>\n<li><\/li>\n<li><\/li>\n<li><\/li>\n<li><\/li>\n<li><\/li>\n<li><\/li>\n<li><\/li>\n<li><\/li>\n<li><\/li>\n<li><\/li>\n<li><\/li>\n<li><\/li>\n<li><\/li>\n<li><\/li>\n<li><\/li>\n<li><\/li>\n<li><\/li>\n<li><\/li>\n<li><\/li>\n<li><\/li>\n<\/ul>\n<pre class=\"code-snippet__js\" data-lang=\"python\"><code><span leaf=\"\"><span class=\"code-snippet__comment\"># \u4f7f\u7528JSON\u6587\u4ef6\u9a71\u52a8\u6d4b\u8bd5\u6570\u636e<\/span><\/span><\/code><code><span leaf=\"\"><span class=\"code-snippet__comment\"># data\/test_cases.json<\/span><\/span><\/code><code><span leaf=\"\">[<\/span><\/code><code><span leaf=\"\">&nbsp; {<\/span><\/code><code><span leaf=\"\">&nbsp; &nbsp;&nbsp;<span class=\"code-snippet__string\">\"name\"<\/span>:&nbsp;<span class=\"code-snippet__string\">\"\u6b63\u5e38\u4e0b\u5355\"<\/span>,<\/span><\/code><code><span leaf=\"\">&nbsp; &nbsp;&nbsp;<span class=\"code-snippet__string\">\"request\"<\/span>: {<span class=\"code-snippet__string\">\"userId\"<\/span>:&nbsp;<span class=\"code-snippet__string\">\"123\"<\/span>,&nbsp;<span class=\"code-snippet__string\">\"productId\"<\/span>:&nbsp;<span class=\"code-snippet__string\">\"PROD-001\"<\/span>,&nbsp;<span class=\"code-snippet__string\">\"quantity\"<\/span>:&nbsp;<span class=\"code-snippet__number\">2<\/span>},<\/span><\/code><code><span leaf=\"\">&nbsp; &nbsp;&nbsp;<span class=\"code-snippet__string\">\"expected_status\"<\/span>:&nbsp;<span class=\"code-snippet__number\">201<\/span>,<\/span><\/code><code><span leaf=\"\">&nbsp; &nbsp;&nbsp;<span class=\"code-snippet__string\">\"expected_message\"<\/span>:&nbsp;<span class=\"code-snippet__string\">\"Order created successfully\"<\/span><\/span><\/code><code><span leaf=\"\">&nbsp; },<\/span><\/code><code><span leaf=\"\">&nbsp; {<\/span><\/code><code><span leaf=\"\">&nbsp; &nbsp;&nbsp;<span class=\"code-snippet__string\">\"name\"<\/span>:&nbsp;<span class=\"code-snippet__string\">\"\u5e93\u5b58\u4e0d\u8db3\"<\/span>,<\/span><\/code><code><span leaf=\"\">&nbsp; &nbsp;&nbsp;<span class=\"code-snippet__string\">\"request\"<\/span>: {<span class=\"code-snippet__string\">\"userId\"<\/span>:&nbsp;<span class=\"code-snippet__string\">\"123\"<\/span>,&nbsp;<span class=\"code-snippet__string\">\"productId\"<\/span>:&nbsp;<span class=\"code-snippet__string\">\"PROD-001\"<\/span>,&nbsp;<span class=\"code-snippet__string\">\"quantity\"<\/span>:&nbsp;<span class=\"code-snippet__number\">9999<\/span>},<\/span><\/code><code><span leaf=\"\">&nbsp; &nbsp;&nbsp;<span class=\"code-snippet__string\">\"expected_status\"<\/span>:&nbsp;<span class=\"code-snippet__number\">409<\/span>,<\/span><\/code><code><span leaf=\"\">&nbsp; &nbsp;&nbsp;<span class=\"code-snippet__string\">\"expected_message\"<\/span>:&nbsp;<span class=\"code-snippet__string\">\"Insufficient stock\"<\/span><\/span><\/code><code><span leaf=\"\">&nbsp; }<\/span><\/code><code><span leaf=\"\">]<\/span><\/code><code><span leaf=\"\"><span class=\"code-snippet__comment\"># tests\/test_data_driven.py<\/span><\/span><\/code><code><span leaf=\"\"><span class=\"code-snippet__keyword\">import<\/span>&nbsp;json<\/span><\/code><code><span leaf=\"\"><span class=\"code-snippet__keyword\">import<\/span>&nbsp;pytest<\/span><\/code><code><span leaf=\"\"><span class=\"code-snippet__meta\">@pytest.mark.parametrize(<\/span><span class=\"code-snippet__meta\"><span class=\"code-snippet__params\"><span class=\"code-snippet__string\">\"test_case\"<\/span><\/span><\/span><span class=\"code-snippet__meta\"><span class=\"code-snippet__params\">,&nbsp;<\/span><\/span><\/span><\/code><code><span leaf=\"\">&nbsp; &nbsp; json.load(<span class=\"code-snippet__params\"><span class=\"code-snippet__built_in\">open<\/span><\/span><span class=\"code-snippet__params\">(<\/span><span class=\"code-snippet__params\"><span class=\"code-snippet__params\"><span class=\"code-snippet__string\">\"data\/test_cases.json\"<\/span><\/span><\/span><span class=\"code-snippet__params\">)<\/span>))<\/span><\/code><code><span leaf=\"\"><span class=\"code-snippet__keyword\">def<\/span>&nbsp;<span class=\"code-snippet__title\">test_create_order_data_driven<\/span>(<span class=\"code-snippet__params\">api_client, test_case<\/span>):<\/span><\/code><code><span leaf=\"\">&nbsp; &nbsp;&nbsp;<span class=\"code-snippet__string\">\"\"\"\u6570\u636e\u9a71\u52a8\uff1a\u4eceJSON\u6587\u4ef6\u8bfb\u53d6\u6d4b\u8bd5\u7528\u4f8b\"\"\"<\/span><\/span><\/code><code><span leaf=\"\">&nbsp; &nbsp; response = api_client.post(<\/span><\/code><code><span leaf=\"\">&nbsp; &nbsp; &nbsp; &nbsp;&nbsp;<span class=\"code-snippet__string\">f\"<\/span><span class=\"code-snippet__string\"><span class=\"code-snippet__subst\">{BASE_URL}<\/span><\/span><span class=\"code-snippet__string\">\/orders\"<\/span>,&nbsp;<\/span><\/code><code><span leaf=\"\">&nbsp; &nbsp; &nbsp; &nbsp; json=test_case[<span class=\"code-snippet__string\">\"request\"<\/span>]<\/span><\/code><code><span leaf=\"\">&nbsp; &nbsp; )<\/span><\/code><code><span leaf=\"\"><br  \/><\/span><\/code><code><span leaf=\"\">&nbsp; &nbsp;&nbsp;<span class=\"code-snippet__keyword\">assert<\/span>&nbsp;response.status_code == test_case[<span class=\"code-snippet__string\">\"expected_status\"<\/span>]<\/span><\/code><code><span leaf=\"\">&nbsp; &nbsp;&nbsp;<span class=\"code-snippet__keyword\">assert<\/span>&nbsp;test_case[<span class=\"code-snippet__string\">\"expected_message\"<\/span>]&nbsp;<span class=\"code-snippet__keyword\">in<\/span>&nbsp;response.text<\/span><\/code><\/pre>\n<\/section>\n<h3 style=\"color: rgb(51, 51, 51);font-family: -apple-system, BlinkMacSystemFont, &quot;Segoe UI&quot;, &quot;PingFang SC&quot;, &quot;Hiragino Sans GB&quot;, &quot;Microsoft YaHei&quot;, sans-serif;font-style: normal;font-variant-ligatures: normal;font-variant-caps: normal;letter-spacing: normal;orphans: 2;text-align: start;text-indent: 0px;text-transform: none;widows: 2;word-spacing: 0px;-webkit-text-stroke-width: 0px;white-space: normal;text-decoration-thickness: initial;text-decoration-style: initial;text-decoration-color: initial;font-size: 20px;font-weight: 600;margin-top: 30px;margin-bottom: 15px;\" data-pm-slice=\"0 0 []\"><span leaf=\"\">4.4 \u6d4b\u8bd5\u6570\u636e\u7ba1\u7406\u7b56\u7565<\/span><\/h3>\n<section style=\"color: rgb(51, 51, 51);font-family: -apple-system, BlinkMacSystemFont, &quot;Segoe UI&quot;, &quot;PingFang SC&quot;, &quot;Hiragino Sans GB&quot;, &quot;Microsoft YaHei&quot;, sans-serif;font-size: 16px;font-style: normal;font-variant-ligatures: normal;font-variant-caps: normal;font-weight: 400;letter-spacing: normal;orphans: 2;text-align: center;text-indent: 0px;text-transform: none;widows: 2;word-spacing: 0px;-webkit-text-stroke-width: 0px;white-space: normal;text-decoration-thickness: initial;text-decoration-style: initial;text-decoration-color: initial;margin-bottom: 15px;\"><strong data-pm-slice=\"0 0 []\"><span data-pm-slice=\"0 0 []\"><span leaf=\"\"><span textstyle=\"\" style=\"color: #ffa900;\">\u6d4b\u8bd5\u6570\u636e\u7ba1\u7406\u76844\u79cd\u7b56\u7565\uff1a<\/span><\/span><\/span><\/strong><\/section>\n<table>\n<tbody>\n<tr>\n<td data-colwidth=\"576\">\n<ol style=\"color: rgb(51, 51, 51);font-family: -apple-system, BlinkMacSystemFont, &quot;Segoe UI&quot;, &quot;PingFang SC&quot;, &quot;Hiragino Sans GB&quot;, &quot;Microsoft YaHei&quot;, sans-serif;font-style: normal;font-variant-ligatures: normal;font-variant-caps: normal;font-weight: 400;letter-spacing: normal;orphans: 2;text-align: start;text-indent: 0px;text-transform: none;widows: 2;word-spacing: 0px;-webkit-text-stroke-width: 0px;white-space: normal;text-decoration-thickness: initial;text-decoration-style: initial;text-decoration-color: initial;font-size: 15px;line-height: 1.8;margin: 0px;padding-left: 20px;\" class=\"list-paddingleft-1\">\n<li style=\"margin-bottom: 5px;\"><strong><span leaf=\"\">Fixture\u521b\u5efa + Teardown\u9500\u6bc1<\/span><\/strong><br \/>\n<section><span leaf=\"\">\uff1a\u6bcf\u4e2a\u6d4b\u8bd5\u7528\u4f8b\u72ec\u7acb\u521b\u5efa\u548c\u6e05\u7406\u6570\u636e\uff08\u63a8\u8350\uff09<\/span><\/section>\n<\/li>\n<li style=\"margin-bottom: 5px;\"><strong><span leaf=\"\">\u6570\u636e\u5e93\u5feb\u7167 + \u56de\u6eda<\/span><\/strong><br \/>\n<section><span leaf=\"\">\uff1a\u6d4b\u8bd5\u524d\u5feb\u7167\uff0c\u6d4b\u8bd5\u540e\u56de\u6eda\uff08\u9002\u5408\u590d\u6742\u573a\u666f\uff09<\/span><\/section>\n<\/li>\n<li style=\"margin-bottom: 5px;\"><strong><span leaf=\"\">Mock\u6570\u636e\u6e90<\/span><\/strong><br \/>\n<section><span leaf=\"\">\uff1a\u4f7f\u7528Mock\u670d\u52a1\u8fd4\u56de\u9884\u8bbe\u6570\u636e\uff08\u7ec4\u4ef6\u6d4b\u8bd5\u9636\u6bb5\uff09<\/span><\/section>\n<\/li>\n<li style=\"margin-bottom: 5px;\"><strong><span leaf=\"\">\u6d4b\u8bd5\u6570\u636e\u5de5\u5382\uff08Factory Boy\uff09<\/span><\/strong><br \/>\n<section><span leaf=\"\">\uff1a\u4f7f\u7528\u5de5\u5382\u6a21\u5f0f\u751f\u6210\u6d4b\u8bd5\u6570\u636e<\/span><\/section>\n<\/li>\n<\/ol>\n<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<section><strong style=\"color: rgb(51, 51, 51);font-family: -apple-system, BlinkMacSystemFont, &quot;Segoe UI&quot;, &quot;PingFang SC&quot;, &quot;Hiragino Sans GB&quot;, &quot;Microsoft YaHei&quot;, sans-serif;font-size: 15px;font-style: normal;font-variant-ligatures: normal;font-variant-caps: normal;letter-spacing: normal;orphans: 2;text-align: start;text-indent: 0px;text-transform: none;widows: 2;word-spacing: 0px;-webkit-text-stroke-width: 0px;white-space: normal;background-color: rgb(255, 255, 255);text-decoration-thickness: initial;text-decoration-style: initial;text-decoration-color: initial;\" data-pm-slice=\"0 0 []\"><span leaf=\"\"><br  \/><\/span><\/strong><\/section>\n<hr style=\"border-style: solid;border-width: 1px 0 0;border-color: rgba(0,0,0,0.1);-webkit-transform-origin: 0 0;-webkit-transform: scale(1, 0.5);transform-origin: 0 0;transform: scale(1, 0.5);\"  \/>\n<section><strong style=\"color: rgb(51, 51, 51);font-family: -apple-system, BlinkMacSystemFont, &quot;Segoe UI&quot;, &quot;PingFang SC&quot;, &quot;Hiragino Sans GB&quot;, &quot;Microsoft YaHei&quot;, sans-serif;font-size: 15px;font-style: normal;font-variant-ligatures: normal;font-variant-caps: normal;letter-spacing: normal;orphans: 2;text-align: start;text-indent: 0px;text-transform: none;widows: 2;word-spacing: 0px;-webkit-text-stroke-width: 0px;white-space: normal;background-color: rgb(255, 255, 255);text-decoration-thickness: initial;text-decoration-style: initial;text-decoration-color: initial;\" data-pm-slice=\"0 0 []\"><span leaf=\"\"><br  \/><\/span><\/strong><\/section>\n<h2 style=\"font-family: -apple-system, BlinkMacSystemFont, &quot;Segoe UI&quot;, &quot;PingFang SC&quot;, &quot;Hiragino Sans GB&quot;, &quot;Microsoft YaHei&quot;, sans-serif;font-style: normal;font-variant-ligatures: normal;font-variant-caps: normal;letter-spacing: normal;orphans: 2;text-align: start;text-indent: 0px;text-transform: none;widows: 2;word-spacing: 0px;-webkit-text-stroke-width: 0px;white-space: normal;text-decoration-thickness: initial;text-decoration-style: initial;text-decoration-color: initial;font-size: 24px;font-weight: bold;color: rgb(25, 118, 210);margin-top: 40px;margin-bottom: 20px;padding-bottom: 10px;border-bottom: 3px solid rgb(25, 118, 210);\" data-pm-slice=\"0 0 []\"><span leaf=\"\">\u4e94\u3001\u5fae\u670d\u52a1\u5168\u94fe\u8def\u6d4b\u8bd5<\/span><\/h2>\n<p style=\"color: rgb(51, 51, 51);font-family: -apple-system, BlinkMacSystemFont, &quot;Segoe UI&quot;, &quot;PingFang SC&quot;, &quot;Hiragino Sans GB&quot;, &quot;Microsoft YaHei&quot;, sans-serif;font-size: 16px;font-style: normal;font-variant-ligatures: normal;font-variant-caps: normal;font-weight: 400;letter-spacing: normal;orphans: 2;text-align: start;text-indent: 0px;text-transform: none;widows: 2;word-spacing: 0px;-webkit-text-stroke-width: 0px;white-space: normal;text-decoration-thickness: initial;text-decoration-style: initial;text-decoration-color: initial;margin-bottom: 20px;\"><span leaf=\"\">\u5f53\u4f60\u7684\u7cfb\u7edf\u6709\u51e0\u5341\u4e2a\u5fae\u670d\u52a1\uff0c\u7528\u6237\u7684\u4e00\u4e2a\u64cd\u4f5c\u53ef\u80fd\u7a7f\u8d8a\u5341\u51e0\u4e2a\u670d\u52a1\u65f6\uff0c<\/span><strong><span leaf=\"\">\u5168\u94fe\u8def\u6d4b\u8bd5<\/span><\/strong><span leaf=\"\">\u5c31\u6210\u4e86\u4fdd\u969c\u7cfb\u7edf\u53ef\u9760\u6027\u7684\u5173\u952e\u3002<\/span><\/p>\n<h3 style=\"color: rgb(51, 51, 51);font-family: -apple-system, BlinkMacSystemFont, &quot;Segoe UI&quot;, &quot;PingFang SC&quot;, &quot;Hiragino Sans GB&quot;, &quot;Microsoft YaHei&quot;, sans-serif;font-style: normal;font-variant-ligatures: normal;font-variant-caps: normal;letter-spacing: normal;orphans: 2;text-align: start;text-indent: 0px;text-transform: none;widows: 2;word-spacing: 0px;-webkit-text-stroke-width: 0px;white-space: normal;text-decoration-thickness: initial;text-decoration-style: initial;text-decoration-color: initial;font-size: 20px;font-weight: 600;margin-top: 30px;margin-bottom: 15px;\"><span leaf=\"\">5.1 \u5168\u94fe\u8def\u6d4b\u8bd5\u67b6\u6784<\/span><\/h3>\n<section style=\"text-align: center;\" nodeleaf=\"\">\n<figure class=\"wx-qr-wrap\"><img decoding=\"async\" class=\"rich_pages wxw-img\" data-aistatus=\"1\" data-imgfileid=\"100000375\" data-s=\"300,640\" data-type=\"png\" type=\"block\" src=\"https:\/\/mmbiz.qpic.cn\/mmbiz_png\/BWmfcibGhS1JGOiccRJC3WOtmyyod8TW1v9ZuM12EVBz181harxosqpMlQML0ACGdHrjpDLbEUKaTGlKzb896uvdAkxtXaaQ3hmpwatpJgSsw\/640?wx_fmt=png&#038;from=appmsg\" \/><figcaption class=\"wx-qr-tip\"><img decoding=\"async\" src=\"https:\/\/www.deartester.com\/wp-content\/uploads\/2026\/09\/wechat-qr.jpg\" alt=\"\u5fae\u4fe1\u516c\u4f17\u53f7\u4e8c\u7ef4\u7801\" loading=\"lazy\"><span>\u56fe\u7247\u5f15\u81ea\u5fae\u4fe1\u516c\u4f17\u53f7\uff0c\u626b\u7801\u5173\u6ce8\u9605\u8bfb\u539f\u6587<\/span><\/figcaption><\/figure>\n<\/section>\n<h3 style=\"color: rgb(51, 51, 51);font-family: -apple-system, BlinkMacSystemFont, &quot;Segoe UI&quot;, &quot;PingFang SC&quot;, &quot;Hiragino Sans GB&quot;, &quot;Microsoft YaHei&quot;, sans-serif;font-style: normal;font-variant-ligatures: normal;font-variant-caps: normal;letter-spacing: normal;orphans: 2;text-align: start;text-indent: 0px;text-transform: none;widows: 2;word-spacing: 0px;-webkit-text-stroke-width: 0px;white-space: normal;text-decoration-thickness: initial;text-decoration-style: initial;text-decoration-color: initial;font-size: 20px;font-weight: 600;margin-top: 30px;margin-bottom: 15px;\" data-pm-slice=\"0 0 []\"><span leaf=\"\">5.2 \u94fe\u8def\u8ffd\u8e2a\u5728\u6d4b\u8bd5\u4e2d\u7684\u5e94\u7528<\/span><\/h3>\n<p style=\"color: rgb(51, 51, 51);font-family: -apple-system, BlinkMacSystemFont, &quot;Segoe UI&quot;, &quot;PingFang SC&quot;, &quot;Hiragino Sans GB&quot;, &quot;Microsoft YaHei&quot;, sans-serif;font-size: 16px;font-style: normal;font-variant-ligatures: normal;font-variant-caps: normal;font-weight: 400;letter-spacing: normal;orphans: 2;text-align: start;text-indent: 0px;text-transform: none;widows: 2;word-spacing: 0px;-webkit-text-stroke-width: 0px;white-space: normal;text-decoration-thickness: initial;text-decoration-style: initial;text-decoration-color: initial;margin-bottom: 15px;\"><span leaf=\"\">\u94fe\u8def\u8ffd\u8e2a\uff08Distributed Tracing\uff09\u662f\u5168\u94fe\u8def\u6d4b\u8bd5\u7684&#8221;\u773c\u775b&#8221;\u3002<\/span><strong><span leaf=\"\">Jaeger<\/span><\/strong><span leaf=\"\">\u548c<\/span><strong><span leaf=\"\">Zipkin<\/span><\/strong><span leaf=\"\">\u662f\u76ee\u524d\u6700\u4e3b\u6d41\u7684\u4e24\u4e2a\u5f00\u6e90\u94fe\u8def\u8ffd\u8e2a\u7cfb\u7edf\u3002<\/span><\/p>\n<p style=\"color: rgb(51, 51, 51);font-family: -apple-system, BlinkMacSystemFont, &quot;Segoe UI&quot;, &quot;PingFang SC&quot;, &quot;Hiragino Sans GB&quot;, &quot;Microsoft YaHei&quot;, sans-serif;font-size: 16px;font-style: normal;font-variant-ligatures: normal;font-variant-caps: normal;font-weight: 400;letter-spacing: normal;orphans: 2;text-align: start;text-indent: 0px;text-transform: none;widows: 2;word-spacing: 0px;-webkit-text-stroke-width: 0px;white-space: normal;text-decoration-thickness: initial;text-decoration-style: initial;text-decoration-color: initial;margin-bottom: 15px;\"><strong><span leaf=\"\">\u5728\u6d4b\u8bd5\u4e2d\u7684\u4ef7\u503c\uff1a<\/span><\/strong><\/p>\n<ul style=\"color: rgb(51, 51, 51);font-family: -apple-system, BlinkMacSystemFont, &quot;Segoe UI&quot;, &quot;PingFang SC&quot;, &quot;Hiragino Sans GB&quot;, &quot;Microsoft YaHei&quot;, sans-serif;font-size: 16px;font-style: normal;font-variant-ligatures: normal;font-variant-caps: normal;font-weight: 400;letter-spacing: normal;orphans: 2;text-align: start;text-indent: 0px;text-transform: none;widows: 2;word-spacing: 0px;-webkit-text-stroke-width: 0px;white-space: normal;text-decoration-thickness: initial;text-decoration-style: initial;text-decoration-color: initial;line-height: 2;margin-bottom: 25px;padding-left: 25px;\" class=\"list-paddingleft-1\">\n<li style=\"margin-bottom: 8px;\"><strong><span leaf=\"\">\u6027\u80fd\u74f6\u9888\u5b9a\u4f4d<\/span><\/strong><br \/>\n<section><span leaf=\"\">\uff1a\u627e\u51fa\u8c03\u7528\u94fe\u4e2d\u6700\u6162\u7684\u670d\u52a1\uff08P99\u5ef6\u8fdf\u5206\u6790\uff09<\/span><\/section>\n<\/li>\n<li style=\"margin-bottom: 8px;\"><strong><span leaf=\"\">\u4f9d\u8d56\u62d3\u6251\u9a8c\u8bc1<\/span><\/strong><br \/>\n<section><span leaf=\"\">\uff1a\u9a8c\u8bc1\u670d\u52a1\u95f4\u7684\u8c03\u7528\u5173\u7cfb\u662f\u5426\u7b26\u5408\u9884\u671f<\/span><\/section>\n<\/li>\n<li style=\"margin-bottom: 8px;\"><strong><span leaf=\"\">\u5f02\u5e38\u4f20\u64ad\u8ffd\u8e2a<\/span><\/strong><br \/>\n<section><span leaf=\"\">\uff1a\u5f53\u67d0\u4e2a\u670d\u52a1\u51fa\u9519\uff0c\u8ffd\u8e2a\u9519\u8bef\u5982\u4f55\u5f71\u54cd\u4e0a\u6e38\u670d\u52a1<\/span><\/section>\n<\/li>\n<li style=\"margin-bottom: 8px;\"><strong><span leaf=\"\">\u6d4b\u8bd5\u8986\u76d6\u7387\u8bc4\u4f30<\/span><\/strong><br \/>\n<section><span leaf=\"\">\uff1a\u901a\u8fc7Trace\u5206\u6790\uff0c\u627e\u51fa\u672a\u88ab\u6d4b\u8bd5\u8986\u76d6\u7684\u8c03\u7528\u8def\u5f84<\/span><\/section>\n<\/li>\n<\/ul>\n<p style=\"font-size: 15px;margin: 0px;color: rgb(13, 71, 161);\"><strong><span leaf=\"\">\ud83d\udca1 \u5b9e\u6218\u6280\u5de7\uff1a<\/span><\/strong><span leaf=\"\">\u5728\u81ea\u52a8\u5316\u6d4b\u8bd5\u4e2d\u96c6\u6210Jaeger Client\uff0c\u6bcf\u4e2a\u6d4b\u8bd5\u7528\u4f8b\u6267\u884c\u540e\uff0c\u81ea\u52a8\u67e5\u8be2Trace\u6570\u636e\uff0c\u65ad\u8a00\u8c03\u7528\u94fe\u662f\u5426\u7b26\u5408\u9884\u671f\uff08\u5982\uff1a\u8ba2\u5355\u670d\u52a1\u5fc5\u987b\u8c03\u7528\u652f\u4ed8\u670d\u52a1\uff0c\u4e14\u652f\u4ed8\u670d\u52a1\u7684\u54cd\u5e94\u65f6\u95f4\u5fc5\u987b\u5c0f\u4e8e500ms\uff09\u3002<\/span><\/p>\n<h3 style=\"color: rgb(51, 51, 51);font-family: -apple-system, BlinkMacSystemFont, &quot;Segoe UI&quot;, &quot;PingFang SC&quot;, &quot;Hiragino Sans GB&quot;, &quot;Microsoft YaHei&quot;, sans-serif;font-style: normal;font-variant-ligatures: normal;font-variant-caps: normal;letter-spacing: normal;orphans: 2;text-align: start;text-indent: 0px;text-transform: none;widows: 2;word-spacing: 0px;-webkit-text-stroke-width: 0px;white-space: normal;text-decoration-thickness: initial;text-decoration-style: initial;text-decoration-color: initial;font-size: 20px;font-weight: 600;margin-top: 30px;margin-bottom: 15px;\"><span leaf=\"\">5.3 \u6d41\u91cf\u56de\u653e\uff08JVM-Sandbox-Repeater\uff09<\/span><\/h3>\n<p style=\"color: rgb(51, 51, 51);font-family: -apple-system, BlinkMacSystemFont, &quot;Segoe UI&quot;, &quot;PingFang SC&quot;, &quot;Hiragino Sans GB&quot;, &quot;Microsoft YaHei&quot;, sans-serif;font-size: 16px;font-style: normal;font-variant-ligatures: normal;font-variant-caps: normal;font-weight: 400;letter-spacing: normal;orphans: 2;text-align: start;text-indent: 0px;text-transform: none;widows: 2;word-spacing: 0px;-webkit-text-stroke-width: 0px;white-space: normal;text-decoration-thickness: initial;text-decoration-style: initial;text-decoration-color: initial;margin-bottom: 15px;\"><span leaf=\"\">\u6d41\u91cf\u56de\u653e\u662f\u5fae\u670d\u52a1\u6d4b\u8bd5\u7684&#8221;\u65f6\u95f4\u673a\u5668&#8221;\u3002\u5b83\u5141\u8bb8\u4f60\u5c06\u751f\u4ea7\u73af\u5883\u7684\u771f\u5b9e\u6d41\u91cf\uff0c\u5728\u6d4b\u8bd5\u73af\u5883\u4e2d&#8221;\u56de\u653e&#8221;\u4e00\u904d\uff0c\u9a8c\u8bc1\u65b0\u7248\u672c\u7684\u884c\u4e3a\u662f\u5426\u4e0e\u65e7\u7248\u672c\u4e00\u81f4\u3002<\/span><\/p>\n<p style=\"color: rgb(51, 51, 51);font-family: -apple-system, BlinkMacSystemFont, &quot;Segoe UI&quot;, &quot;PingFang SC&quot;, &quot;Hiragino Sans GB&quot;, &quot;Microsoft YaHei&quot;, sans-serif;font-size: 16px;font-style: normal;font-variant-ligatures: normal;font-variant-caps: normal;font-weight: 400;letter-spacing: normal;orphans: 2;text-align: start;text-indent: 0px;text-transform: none;widows: 2;word-spacing: 0px;-webkit-text-stroke-width: 0px;white-space: normal;text-decoration-thickness: initial;text-decoration-style: initial;text-decoration-color: initial;margin-bottom: 15px;\"><strong><span leaf=\"\">JVM-Sandbox-Repeater<\/span><\/strong><span leaf=\"\">\uff08\u963f\u91cc\u5f00\u6e90\uff09\u662fJava\u751f\u6001\u4e2d\u6700\u6210\u719f\u7684\u6d41\u91cf\u56de\u653e\u5de5\u5177\u3002<\/span><\/p>\n<p style=\"color: rgb(51, 51, 51);font-family: -apple-system, BlinkMacSystemFont, &quot;Segoe UI&quot;, &quot;PingFang SC&quot;, &quot;Hiragino Sans GB&quot;, &quot;Microsoft YaHei&quot;, sans-serif;font-size: 16px;font-style: normal;font-variant-ligatures: normal;font-variant-caps: normal;font-weight: 400;letter-spacing: normal;orphans: 2;text-align: start;text-indent: 0px;text-transform: none;widows: 2;word-spacing: 0px;-webkit-text-stroke-width: 0px;white-space: normal;text-decoration-thickness: initial;text-decoration-style: initial;text-decoration-color: initial;margin-bottom: 15px;\"><strong><span leaf=\"\">\u6d41\u91cf\u56de\u653e\u7684\u5de5\u4f5c\u6d41\u7a0b\uff1a<\/span><\/strong><\/p>\n<ol style=\"color: rgb(51, 51, 51);font-family: -apple-system, BlinkMacSystemFont, &quot;Segoe UI&quot;, &quot;PingFang SC&quot;, &quot;Hiragino Sans GB&quot;, &quot;Microsoft YaHei&quot;, sans-serif;font-size: 16px;font-style: normal;font-variant-ligatures: normal;font-variant-caps: normal;font-weight: 400;letter-spacing: normal;orphans: 2;text-align: start;text-indent: 0px;text-transform: none;widows: 2;word-spacing: 0px;-webkit-text-stroke-width: 0px;white-space: normal;text-decoration-thickness: initial;text-decoration-style: initial;text-decoration-color: initial;line-height: 2;margin-bottom: 25px;padding-left: 25px;\" class=\"list-paddingleft-1\">\n<li style=\"margin-bottom: 8px;\"><strong><span leaf=\"\">\u5f55\u5236\uff08Record\uff09<\/span><\/strong><br \/>\n<section><span leaf=\"\">\uff1a\u5728\u751f\u4ea7\u73af\u5883\u90e8\u7f72Repeater Agent\uff0c\u5f55\u5236\u771f\u5b9e\u8bf7\u6c42\u7684\u5165\u53c2\u548c\u51fa\u53c2<\/span><\/section>\n<\/li>\n<li style=\"margin-bottom: 8px;\"><strong><span leaf=\"\">\u5b58\u50a8\uff08Store\uff09<\/span><\/strong><br \/>\n<section><span leaf=\"\">\uff1a\u5c06\u5f55\u5236\u7684\u6d41\u91cf\u6570\u636e\u5b58\u50a8\u5230\u6570\u636e\u5e93\u6216\u6587\u4ef6<\/span><\/section>\n<\/li>\n<li style=\"margin-bottom: 8px;\"><strong><span leaf=\"\">\u56de\u653e\uff08Replay\uff09<\/span><\/strong><br \/>\n<section><span leaf=\"\">\uff1a\u5728\u6d4b\u8bd5\u73af\u5883\u56de\u653e\u5f55\u5236\u7684\u6d41\u91cf\uff0c\u5bf9\u6bd4\u65b0\u65e7\u7248\u672c\u7684\u54cd\u5e94<\/span><\/section>\n<\/li>\n<li style=\"margin-bottom: 8px;\"><strong><span leaf=\"\">\u6bd4\u5bf9\uff08Compare\uff09<\/span><\/strong><br \/>\n<section><span leaf=\"\">\uff1a\u81ea\u52a8\u6bd4\u5bf9\u56de\u653e\u7ed3\u679c\u4e0e\u5f55\u5236\u7ed3\u679c\uff0c\u6807\u8bb0\u5dee\u5f02<\/span><\/section>\n<\/li>\n<\/ol>\n<p style=\"font-size: 15px;margin: 0px;color: rgb(183, 28, 28);\"><strong><span leaf=\"\">\u26a0\ufe0f \u6ce8\u610f\u4e8b\u9879\uff1a<\/span><\/strong><span leaf=\"\">\u6d41\u91cf\u56de\u653e\u4e0d\u9002\u5408\u6240\u6709\u573a\u666f\u3002\u5bf9\u4e8e\u5199\u64cd\u4f5c\uff08\u5982\u521b\u5efa\u8ba2\u5355\uff09\uff0c\u9700\u8981\u505a\u597d\u6570\u636e\u9694\u79bb\uff0c\u907f\u514d\u56de\u653e\u65f6\u4ea7\u751f\u810f\u6570\u636e\u3002\u63a8\u8350\u4f7f\u7528&#8221;\u5f71\u5b50\u5e93&#8221;\uff08Shadow Database\uff09\u6280\u672f\u9694\u79bb\u56de\u653e\u6570\u636e\u3002<\/span><\/p>\n<h3 style=\"color: rgb(51, 51, 51);font-family: -apple-system, BlinkMacSystemFont, &quot;Segoe UI&quot;, &quot;PingFang SC&quot;, &quot;Hiragino Sans GB&quot;, &quot;Microsoft YaHei&quot;, sans-serif;font-style: normal;font-variant-ligatures: normal;font-variant-caps: normal;letter-spacing: normal;orphans: 2;text-align: start;text-indent: 0px;text-transform: none;widows: 2;word-spacing: 0px;-webkit-text-stroke-width: 0px;white-space: normal;text-decoration-thickness: initial;text-decoration-style: initial;text-decoration-color: initial;font-size: 20px;font-weight: 600;margin-top: 30px;margin-bottom: 15px;\"><span leaf=\"\">5.4 \u6df7\u6c8c\u5de5\u7a0b\uff08Chaos Mesh\uff09\u6545\u969c\u6ce8\u5165<\/span><\/h3>\n<p style=\"color: rgb(51, 51, 51);font-family: -apple-system, BlinkMacSystemFont, &quot;Segoe UI&quot;, &quot;PingFang SC&quot;, &quot;Hiragino Sans GB&quot;, &quot;Microsoft YaHei&quot;, sans-serif;font-size: 16px;font-style: normal;font-variant-ligatures: normal;font-variant-caps: normal;font-weight: 400;letter-spacing: normal;orphans: 2;text-align: start;text-indent: 0px;text-transform: none;widows: 2;word-spacing: 0px;-webkit-text-stroke-width: 0px;white-space: normal;text-decoration-thickness: initial;text-decoration-style: initial;text-decoration-color: initial;margin-bottom: 15px;\"><span leaf=\"\">\u6df7\u6c8c\u5de5\u7a0b\uff08Chaos Engineering\uff09\u662f\u4e3b\u52a8&#8221;\u641e\u7834\u574f&#8221;\u7684\u6d4b\u8bd5\u65b9\u6cd5\u8bba\u3002<\/span><strong><span leaf=\"\">Chaos Mesh<\/span><\/strong><span leaf=\"\">\uff08CNCF\u9879\u76ee\uff09\u662fKubernetes\u751f\u6001\u4e2d\u6700\u6d41\u884c\u7684\u6df7\u6c8c\u5de5\u7a0b\u5e73\u53f0\u3002<\/span><\/p>\n<p style=\"color: rgb(51, 51, 51);font-family: -apple-system, BlinkMacSystemFont, &quot;Segoe UI&quot;, &quot;PingFang SC&quot;, &quot;Hiragino Sans GB&quot;, &quot;Microsoft YaHei&quot;, sans-serif;font-size: 16px;font-style: normal;font-variant-ligatures: normal;font-variant-caps: normal;font-weight: 400;letter-spacing: normal;orphans: 2;text-align: start;text-indent: 0px;text-transform: none;widows: 2;word-spacing: 0px;-webkit-text-stroke-width: 0px;white-space: normal;text-decoration-thickness: initial;text-decoration-style: initial;text-decoration-color: initial;margin-bottom: 15px;\"><strong><span leaf=\"\">\u5728\u6d4b\u8bd5\u4e2d\u53ef\u4ee5\u6ce8\u5165\u7684\u6545\u969c\u7c7b\u578b\uff1a<\/span><\/strong><\/p>\n<table style=\"width: 800px;border-collapse: collapse;border: 1px solid rgb(222, 226, 230);font-size: 14px;\">\n<thead>\n<tr style=\"background: linear-gradient(135deg, rgb(52, 152, 219), rgb(41, 128, 185));color: rgb(255, 255, 255);\">\n<th style=\"padding: 14px 16px;text-align: left;font-weight: 600;border: 1px solid rgb(41, 128, 185);\">\n<section style=\"text-align: center;\"><span leaf=\"\"><span textstyle=\"\" style=\"color: #ffa900;\">\u6545\u969c\u7c7b\u578b<\/span><\/span><\/section>\n<\/th>\n<th style=\"padding: 14px 16px;text-align: left;font-weight: 600;border: 1px solid rgb(41, 128, 185);\">\n<section style=\"text-align: center;\"><span leaf=\"\"><span textstyle=\"\" style=\"color: #ffa900;\">\u6a21\u62df\u573a\u666f<\/span><\/span><\/section>\n<\/th>\n<th style=\"padding: 14px 16px;text-align: left;font-weight: 600;border: 1px solid rgb(41, 128, 185);\">\n<section style=\"text-align: center;\"><span leaf=\"\"><span textstyle=\"\" style=\"color: #ffa900;\">\u6d4b\u8bd5\u76ee\u6807<\/span><\/span><\/section>\n<\/th>\n<\/tr>\n<\/thead>\n<tbody>\n<tr style=\"background-color: rgb(248, 249, 250);\">\n<td style=\"padding: 12px 16px;border: 1px solid rgb(222, 226, 230);font-weight: 500;\">\n<section style=\"text-align: center;\"><span leaf=\"\">Pod\u6545\u969c<\/span><\/section>\n<\/td>\n<td style=\"padding: 12px 16px;border: 1px solid rgb(222, 226, 230);\">\n<section><span leaf=\"\">\u968f\u673aKill\u6389\u67d0\u4e9bPod<\/span><\/section>\n<\/td>\n<td style=\"padding: 12px 16px;border: 1px solid rgb(222, 226, 230);\">\n<section><span leaf=\"\">\u9a8c\u8bc1\u670d\u52a1\u662f\u5426\u6709\u5bb9\u9519\u80fd\u529b\u548c\u81ea\u52a8\u6062\u590d<\/span><\/section>\n<\/td>\n<\/tr>\n<tr style=\"background-color: rgb(255, 255, 255);\">\n<td style=\"padding: 12px 16px;border: 1px solid rgb(222, 226, 230);font-weight: 500;\">\n<section style=\"text-align: center;\"><span leaf=\"\">\u7f51\u7edc\u5ef6\u8fdf<\/span><\/section>\n<\/td>\n<td style=\"padding: 12px 16px;border: 1px solid rgb(222, 226, 230);\">\n<section><span leaf=\"\">\u6ce8\u51651000ms\u7f51\u7edc\u5ef6\u8fdf<\/span><\/section>\n<\/td>\n<td style=\"padding: 12px 16px;border: 1px solid rgb(222, 226, 230);\">\n<section><span leaf=\"\">\u9a8c\u8bc1\u8d85\u65f6\u91cd\u8bd5\u548c\u7194\u65ad\u673a\u5236<\/span><\/section>\n<\/td>\n<\/tr>\n<tr style=\"background-color: rgb(248, 249, 250);\">\n<td style=\"padding: 12px 16px;border: 1px solid rgb(222, 226, 230);font-weight: 500;\">\n<section style=\"text-align: center;\"><span leaf=\"\">\u7f51\u7edc\u5206\u533a<\/span><\/section>\n<\/td>\n<td style=\"padding: 12px 16px;border: 1px solid rgb(222, 226, 230);\">\n<section><span leaf=\"\">\u65ad\u6389\u670d\u52a1A\u5230\u670d\u52a1B\u7684\u94fe\u63a5<\/span><\/section>\n<\/td>\n<td style=\"padding: 12px 16px;border: 1px solid rgb(222, 226, 230);\">\n<section><span leaf=\"\">\u9a8c\u8bc1\u964d\u7ea7\u7b56\u7565\u548c\u515c\u5e95\u903b\u8f91<\/span><\/section>\n<\/td>\n<\/tr>\n<tr style=\"background-color: rgb(255, 255, 255);\">\n<td style=\"padding: 12px 16px;border: 1px solid rgb(222, 226, 230);font-weight: 500;\">\n<section style=\"text-align: center;\"><span leaf=\"\">CPU\/\u5185\u5b58\u538b\u529b<\/span><\/section>\n<\/td>\n<td style=\"padding: 12px 16px;border: 1px solid rgb(222, 226, 230);\">\n<section><span leaf=\"\">\u5360\u6ee1CPU\u6216\u5185\u5b58<\/span><\/section>\n<\/td>\n<td style=\"padding: 12px 16px;border: 1px solid rgb(222, 226, 230);\">\n<section><span leaf=\"\">\u9a8c\u8bc1\u8d44\u6e90\u9650\u5236\u548cQoS\u7b56\u7565<\/span><\/section>\n<\/td>\n<\/tr>\n<tr style=\"background-color: rgb(248, 249, 250);\">\n<td style=\"padding: 12px 16px;border: 1px solid rgb(222, 226, 230);font-weight: 500;\">\n<section style=\"text-align: center;\"><span leaf=\"\">\u65f6\u949f\u504f\u79fb<\/span><\/section>\n<\/td>\n<td style=\"padding: 12px 16px;border: 1px solid rgb(222, 226, 230);\">\n<section><span leaf=\"\">\u4fee\u6539\u7cfb\u7edf\u65f6\u95f4<\/span><\/section>\n<\/td>\n<td style=\"padding: 12px 16px;border: 1px solid rgb(222, 226, 230);\">\n<section><span leaf=\"\">\u9a8c\u8bc1\u65f6\u95f4\u654f\u611f\u903b\u8f91\uff08\u5982Token\u8fc7\u671f\uff09<\/span><\/section>\n<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<p style=\"font-size: 15px;margin: 0px;color: rgb(27, 94, 32);\"><strong><span leaf=\"\">\u2705 \u6df7\u6c8c\u5de5\u7a0b\u6d4b\u8bd5\u539f\u5219\uff1a<\/span><\/strong><span leaf=\"\">\u5148\u5728\u5c0f\u8303\u56f4\uff08\u975e\u751f\u4ea7\u73af\u5883\uff09\u8bd5\u9a8c\uff0c\u9a8c\u8bc1\u7cfb\u7edf\u6709\u57fa\u672c\u7684\u5bb9\u9519\u80fd\u529b\u540e\uff0c\u518d\u9010\u6b65\u6269\u5927\u5230\u751f\u4ea7\u73af\u5883\u3002\u6c38\u8fdc\u4e0d\u8981\u5728\u672a\u7ecf\u901a\u77e5\u7684\u60c5\u51b5\u4e0b\u5bf9\u751f\u4ea7\u73af\u5883\u6267\u884c\u6df7\u6c8c\u5b9e\u9a8c\uff01<\/span><\/p>\n<section><strong style=\"color: rgb(51, 51, 51);font-family: -apple-system, BlinkMacSystemFont, &quot;Segoe UI&quot;, &quot;PingFang SC&quot;, &quot;Hiragino Sans GB&quot;, &quot;Microsoft YaHei&quot;, sans-serif;font-size: 15px;font-style: normal;font-variant-ligatures: normal;font-variant-caps: normal;letter-spacing: normal;orphans: 2;text-align: start;text-indent: 0px;text-transform: none;widows: 2;word-spacing: 0px;-webkit-text-stroke-width: 0px;white-space: normal;background-color: rgb(255, 255, 255);text-decoration-thickness: initial;text-decoration-style: initial;text-decoration-color: initial;\" data-pm-slice=\"0 0 []\"><span leaf=\"\"><br  \/><\/span><\/strong><\/section>\n<hr style=\"border-style: solid;border-width: 1px 0 0;border-color: rgba(0,0,0,0.1);-webkit-transform-origin: 0 0;-webkit-transform: scale(1, 0.5);transform-origin: 0 0;transform: scale(1, 0.5);\"  \/>\n<section><strong style=\"color: rgb(51, 51, 51);font-family: -apple-system, BlinkMacSystemFont, &quot;Segoe UI&quot;, &quot;PingFang SC&quot;, &quot;Hiragino Sans GB&quot;, &quot;Microsoft YaHei&quot;, sans-serif;font-size: 15px;font-style: normal;font-variant-ligatures: normal;font-variant-caps: normal;letter-spacing: normal;orphans: 2;text-align: start;text-indent: 0px;text-transform: none;widows: 2;word-spacing: 0px;-webkit-text-stroke-width: 0px;white-space: normal;background-color: rgb(255, 255, 255);text-decoration-thickness: initial;text-decoration-style: initial;text-decoration-color: initial;\" data-pm-slice=\"0 0 []\"><span leaf=\"\"><br  \/><\/span><\/strong><\/section>\n<h2 style=\"font-family: -apple-system, BlinkMacSystemFont, &quot;Segoe UI&quot;, &quot;PingFang SC&quot;, &quot;Hiragino Sans GB&quot;, &quot;Microsoft YaHei&quot;, sans-serif;font-style: normal;font-variant-ligatures: normal;font-variant-caps: normal;letter-spacing: normal;orphans: 2;text-align: start;text-indent: 0px;text-transform: none;widows: 2;word-spacing: 0px;-webkit-text-stroke-width: 0px;white-space: normal;text-decoration-thickness: initial;text-decoration-style: initial;text-decoration-color: initial;font-size: 24px;font-weight: bold;color: rgb(25, 118, 210);margin-top: 40px;margin-bottom: 20px;padding-bottom: 10px;border-bottom: 3px solid rgb(25, 118, 210);\" data-pm-slice=\"0 0 []\"><span leaf=\"\">\u516d\u3001\u5fae\u670d\u52a1\u6d4b\u8bd5\u5de5\u5177\u7bb1<\/span><\/h2>\n<p style=\"color: rgb(51, 51, 51);font-family: -apple-system, BlinkMacSystemFont, &quot;Segoe UI&quot;, &quot;PingFang SC&quot;, &quot;Hiragino Sans GB&quot;, &quot;Microsoft YaHei&quot;, sans-serif;font-size: 16px;font-style: normal;font-variant-ligatures: normal;font-variant-caps: normal;font-weight: 400;letter-spacing: normal;orphans: 2;text-align: start;text-indent: 0px;text-transform: none;widows: 2;word-spacing: 0px;-webkit-text-stroke-width: 0px;white-space: normal;text-decoration-thickness: initial;text-decoration-style: initial;text-decoration-color: initial;margin-bottom: 20px;\"><span leaf=\"\">\u5de5\u6b32\u5584\u5176\u4e8b\uff0c\u5fc5\u5148\u5229\u5176\u5668\u3002\u4ee5\u4e0b\u662f\u5fae\u670d\u52a1\u6d4b\u8bd5\u5fc5\u5907\u7684\u5de5\u5177\u7bb1\uff1a<\/span><\/p>\n<table style=\"width: 800px;border-collapse: collapse;border: 1px solid rgb(222, 226, 230);font-size: 14px;\">\n<thead>\n<tr style=\"background: linear-gradient(135deg, rgb(52, 152, 219), rgb(41, 128, 185));color: rgb(255, 255, 255);\">\n<th style=\"padding: 14px 16px;text-align: left;font-weight: 600;border: 1px solid rgb(41, 128, 185);\">\n<section style=\"text-align: center;\"><span leaf=\"\"><span textstyle=\"\" style=\"color: #ffa900;\">\u5de5\u5177<\/span><\/span><\/section>\n<\/th>\n<th style=\"padding: 14px 16px;text-align: left;font-weight: 600;border: 1px solid rgb(41, 128, 185);\">\n<section style=\"text-align: center;\"><span leaf=\"\"><span textstyle=\"\" style=\"color: #ffa900;\">\u7c7b\u522b<\/span><\/span><\/section>\n<\/th>\n<th style=\"padding: 14px 16px;text-align: left;font-weight: 600;border: 1px solid rgb(41, 128, 185);\">\n<section style=\"text-align: center;\"><span leaf=\"\"><span textstyle=\"\" style=\"color: #ffa900;\">\u9002\u7528\u573a\u666f<\/span><\/span><\/section>\n<\/th>\n<th style=\"padding: 14px 16px;text-align: left;font-weight: 600;border: 1px solid rgb(41, 128, 185);\">\n<section style=\"text-align: center;\"><span leaf=\"\"><span textstyle=\"\" style=\"color: #ffa900;\">\u5b66\u4e60\u6210\u672c<\/span><\/span><\/section>\n<\/th>\n<\/tr>\n<\/thead>\n<tbody>\n<tr style=\"background-color: rgb(248, 249, 250);\">\n<td style=\"padding: 12px 16px;border: 1px solid rgb(222, 226, 230);font-weight: 500;\">\n<section><span leaf=\"\">Pact<\/span><\/section>\n<\/td>\n<td style=\"padding: 12px 16px;border: 1px solid rgb(222, 226, 230);\">\n<section><span leaf=\"\">\u5951\u7ea6\u6d4b\u8bd5<\/span><\/section>\n<\/td>\n<td style=\"padding: 12px 16px;border: 1px solid rgb(222, 226, 230);\">\n<section><span leaf=\"\">\u670d\u52a1\u95f4\u63a5\u53e3\u5951\u7ea6\u9a8c\u8bc1<\/span><\/section>\n<\/td>\n<td style=\"padding: 12px 16px;border: 1px solid rgb(222, 226, 230);\">\n<section><span leaf=\"\">\u2b50\u2b50\u2b50<\/span><\/section>\n<\/td>\n<\/tr>\n<tr style=\"background-color: rgb(255, 255, 255);\">\n<td style=\"padding: 12px 16px;border: 1px solid rgb(222, 226, 230);font-weight: 500;\">\n<section><span leaf=\"\">PyTest + Requests<\/span><\/section>\n<\/td>\n<td style=\"padding: 12px 16px;border: 1px solid rgb(222, 226, 230);\">\n<section><span leaf=\"\">\u63a5\u53e3\u81ea\u52a8\u5316<\/span><\/section>\n<\/td>\n<td style=\"padding: 12px 16px;border: 1px solid rgb(222, 226, 230);\">\n<section><span leaf=\"\">RESTful API\u81ea\u52a8\u5316\u6d4b\u8bd5<\/span><\/section>\n<\/td>\n<td style=\"padding: 12px 16px;border: 1px solid rgb(222, 226, 230);\">\n<section><span leaf=\"\">\u2b50\u2b50<\/span><\/section>\n<\/td>\n<\/tr>\n<tr style=\"background-color: rgb(248, 249, 250);\">\n<td style=\"padding: 12px 16px;border: 1px solid rgb(222, 226, 230);font-weight: 500;\">\n<section><span leaf=\"\">WireMock<\/span><\/section>\n<\/td>\n<td style=\"padding: 12px 16px;border: 1px solid rgb(222, 226, 230);\">\n<section><span leaf=\"\">Mock\u670d\u52a1<\/span><\/section>\n<\/td>\n<td style=\"padding: 12px 16px;border: 1px solid rgb(222, 226, 230);\">\n<section><span leaf=\"\">\u6a21\u62dfHTTP\u4f9d\u8d56\u670d\u52a1<\/span><\/section>\n<\/td>\n<td style=\"padding: 12px 16px;border: 1px solid rgb(222, 226, 230);\">\n<section><span leaf=\"\">\u2b50\u2b50<\/span><\/section>\n<\/td>\n<\/tr>\n<tr style=\"background-color: rgb(255, 255, 255);\">\n<td style=\"padding: 12px 16px;border: 1px solid rgb(222, 226, 230);font-weight: 500;\">\n<section><span leaf=\"\">Postman + Newman<\/span><\/section>\n<\/td>\n<td style=\"padding: 12px 16px;border: 1px solid rgb(222, 226, 230);\">\n<section><span leaf=\"\">\u63a5\u53e3\u6d4b\u8bd5<\/span><\/section>\n<\/td>\n<td style=\"padding: 12px 16px;border: 1px solid rgb(222, 226, 230);\">\n<section><span leaf=\"\">\u5feb\u901f\u63a5\u53e3\u8c03\u8bd5\u548c\u56de\u5f52\u6d4b\u8bd5<\/span><\/section>\n<\/td>\n<td style=\"padding: 12px 16px;border: 1px solid rgb(222, 226, 230);\">\n<section><span leaf=\"\">\u2b50<\/span><\/section>\n<\/td>\n<\/tr>\n<tr style=\"background-color: rgb(248, 249, 250);\">\n<td style=\"padding: 12px 16px;border: 1px solid rgb(222, 226, 230);font-weight: 500;\">\n<section><span leaf=\"\">Jaeger<\/span><\/section>\n<\/td>\n<td style=\"padding: 12px 16px;border: 1px solid rgb(222, 226, 230);\">\n<section><span leaf=\"\">\u94fe\u8def\u8ffd\u8e2a<\/span><\/section>\n<\/td>\n<td style=\"padding: 12px 16px;border: 1px solid rgb(222, 226, 230);\">\n<section><span leaf=\"\">\u5206\u5e03\u5f0f\u8c03\u7528\u94fe\u8ffd\u8e2a<\/span><\/section>\n<\/td>\n<td style=\"padding: 12px 16px;border: 1px solid rgb(222, 226, 230);\">\n<section><span leaf=\"\">\u2b50\u2b50\u2b50<\/span><\/section>\n<\/td>\n<\/tr>\n<tr style=\"background-color: rgb(255, 255, 255);\">\n<td style=\"padding: 12px 16px;border: 1px solid rgb(222, 226, 230);font-weight: 500;\">\n<section><span leaf=\"\">Chaos Mesh<\/span><\/section>\n<\/td>\n<td style=\"padding: 12px 16px;border: 1px solid rgb(222, 226, 230);\">\n<section><span leaf=\"\">\u6df7\u6c8c\u5de5\u7a0b<\/span><\/section>\n<\/td>\n<td style=\"padding: 12px 16px;border: 1px solid rgb(222, 226, 230);\">\n<section><span leaf=\"\">K8s\u73af\u5883\u6545\u969c\u6ce8\u5165<\/span><\/section>\n<\/td>\n<td style=\"padding: 12px 16px;border: 1px solid rgb(222, 226, 230);\">\n<section><span leaf=\"\">\u2b50\u2b50\u2b50\u2b50<\/span><\/section>\n<\/td>\n<\/tr>\n<tr style=\"background-color: rgb(248, 249, 250);\">\n<td style=\"padding: 12px 16px;border: 1px solid rgb(222, 226, 230);font-weight: 500;\">\n<section><span leaf=\"\">JVM-Sandbox-Repeater<\/span><\/section>\n<\/td>\n<td style=\"padding: 12px 16px;border: 1px solid rgb(222, 226, 230);\">\n<section><span leaf=\"\">\u6d41\u91cf\u56de\u653e<\/span><\/section>\n<\/td>\n<td style=\"padding: 12px 16px;border: 1px solid rgb(222, 226, 230);\">\n<section><span leaf=\"\">Java\u5e94\u7528\u6d41\u91cf\u5f55\u5236\u56de\u653e<\/span><\/section>\n<\/td>\n<td style=\"padding: 12px 16px;border: 1px solid rgb(222, 226, 230);\">\n<section><span leaf=\"\">\u2b50\u2b50\u2b50\u2b50<\/span><\/section>\n<\/td>\n<\/tr>\n<tr style=\"background-color: rgb(255, 255, 255);\">\n<td style=\"padding: 12px 16px;border: 1px solid rgb(222, 226, 230);font-weight: 500;\">\n<section><span leaf=\"\">SonarQube<\/span><\/section>\n<\/td>\n<td style=\"padding: 12px 16px;border: 1px solid rgb(222, 226, 230);\">\n<section><span leaf=\"\">\u4ee3\u7801\u8d28\u91cf<\/span><\/section>\n<\/td>\n<td style=\"padding: 12px 16px;border: 1px solid rgb(222, 226, 230);\">\n<section><span leaf=\"\">\u9759\u6001\u4ee3\u7801\u5206\u6790\uff0c\u6d4b\u8bd5\u8986\u76d6\u7387<\/span><\/section>\n<\/td>\n<td style=\"padding: 12px 16px;border: 1px solid rgb(222, 226, 230);\">\n<section><span leaf=\"\">\u2b50\u2b50<\/span><\/section>\n<\/td>\n<\/tr>\n<tr style=\"background-color: rgb(248, 249, 250);\">\n<td style=\"padding: 12px 16px;border: 1px solid rgb(222, 226, 230);font-weight: 500;\">\n<section><span leaf=\"\">Apifox<\/span><\/section>\n<\/td>\n<td style=\"padding: 12px 16px;border: 1px solid rgb(222, 226, 230);\">\n<section><span leaf=\"\">API\u534f\u4f5c<\/span><\/section>\n<\/td>\n<td style=\"padding: 12px 16px;border: 1px solid rgb(222, 226, 230);\">\n<section><span leaf=\"\">API\u8bbe\u8ba1\u3001Mock\u3001\u81ea\u52a8\u5316\u4e00\u4f53\u5316<\/span><\/section>\n<\/td>\n<td style=\"padding: 12px 16px;border: 1px solid rgb(222, 226, 230);\">\n<section><span leaf=\"\">\u2b50<\/span><\/section>\n<\/td>\n<\/tr>\n<tr style=\"background-color: rgb(255, 255, 255);\">\n<td style=\"padding: 12px 16px;border: 1px solid rgb(222, 226, 230);font-weight: 500;\">\n<section><span leaf=\"\">K6<\/span><\/section>\n<\/td>\n<td style=\"padding: 12px 16px;border: 1px solid rgb(222, 226, 230);\">\n<section><span leaf=\"\">\u6027\u80fd\u6d4b\u8bd5<\/span><\/section>\n<\/td>\n<td style=\"padding: 12px 16px;border: 1px solid rgb(222, 226, 230);\">\n<section><span leaf=\"\">API\u6027\u80fd\u6d4b\u8bd5\u548c\u8d1f\u8f7d\u6d4b\u8bd5<\/span><\/section>\n<\/td>\n<td style=\"padding: 12px 16px;border: 1px solid rgb(222, 226, 230);\">\n<section><span leaf=\"\">\u2b50\u2b50<\/span><\/section>\n<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<section><strong style=\"color: rgb(51, 51, 51);font-family: -apple-system, BlinkMacSystemFont, &quot;Segoe UI&quot;, &quot;PingFang SC&quot;, &quot;Hiragino Sans GB&quot;, &quot;Microsoft YaHei&quot;, sans-serif;font-size: 15px;font-style: normal;font-variant-ligatures: normal;font-variant-caps: normal;letter-spacing: normal;orphans: 2;text-align: start;text-indent: 0px;text-transform: none;widows: 2;word-spacing: 0px;-webkit-text-stroke-width: 0px;white-space: normal;background-color: rgb(255, 255, 255);text-decoration-thickness: initial;text-decoration-style: initial;text-decoration-color: initial;\" data-pm-slice=\"0 0 []\"><span leaf=\"\"><br  \/><\/span><\/strong><\/section>\n<hr style=\"border-style: solid;border-width: 1px 0 0;border-color: rgba(0,0,0,0.1);-webkit-transform-origin: 0 0;-webkit-transform: scale(1, 0.5);transform-origin: 0 0;transform: scale(1, 0.5);\"  \/>\n<section><strong style=\"color: rgb(51, 51, 51);font-family: -apple-system, BlinkMacSystemFont, &quot;Segoe UI&quot;, &quot;PingFang SC&quot;, &quot;Hiragino Sans GB&quot;, &quot;Microsoft YaHei&quot;, sans-serif;font-size: 15px;font-style: normal;font-variant-ligatures: normal;font-variant-caps: normal;letter-spacing: normal;orphans: 2;text-align: start;text-indent: 0px;text-transform: none;widows: 2;word-spacing: 0px;-webkit-text-stroke-width: 0px;white-space: normal;background-color: rgb(255, 255, 255);text-decoration-thickness: initial;text-decoration-style: initial;text-decoration-color: initial;\" data-pm-slice=\"0 0 []\"><span leaf=\"\"><br  \/><\/span><\/strong><\/section>\n<h2 style=\"font-family: -apple-system, BlinkMacSystemFont, &quot;Segoe UI&quot;, &quot;PingFang SC&quot;, &quot;Hiragino Sans GB&quot;, &quot;Microsoft YaHei&quot;, sans-serif;font-style: normal;font-variant-ligatures: normal;font-variant-caps: normal;letter-spacing: normal;orphans: 2;text-align: start;text-indent: 0px;text-transform: none;widows: 2;word-spacing: 0px;-webkit-text-stroke-width: 0px;white-space: normal;text-decoration-thickness: initial;text-decoration-style: initial;text-decoration-color: initial;font-size: 24px;font-weight: bold;color: rgb(25, 118, 210);margin-top: 40px;margin-bottom: 20px;padding-bottom: 10px;border-bottom: 3px solid rgb(25, 118, 210);\" data-pm-slice=\"0 0 []\"><span leaf=\"\">\u4e03\u3001\u5b9e\u6218\u6848\u4f8b\uff1a\u8ba2\u5355\u670d\u52a1\u5168\u94fe\u8def\u63a5\u53e3\u6d4b\u8bd5<\/span><\/h2>\n<p style=\"color: rgb(51, 51, 51);font-family: -apple-system, BlinkMacSystemFont, &quot;Segoe UI&quot;, &quot;PingFang SC&quot;, &quot;Hiragino Sans GB&quot;, &quot;Microsoft YaHei&quot;, sans-serif;font-size: 16px;font-style: normal;font-variant-ligatures: normal;font-variant-caps: normal;font-weight: 400;letter-spacing: normal;orphans: 2;text-align: start;text-indent: 0px;text-transform: none;widows: 2;word-spacing: 0px;-webkit-text-stroke-width: 0px;white-space: normal;text-decoration-thickness: initial;text-decoration-style: initial;text-decoration-color: initial;margin-bottom: 15px;\"><span leaf=\"\">\u4e0b\u9762\u901a\u8fc7\u4e00\u4e2a\u5b8c\u6574\u7684\u5b9e\u6218\u6848\u4f8b\uff0c\u5c55\u793a\u5982\u4f55\u4ece0\u52301\u6784\u5efa\u5fae\u670d\u52a1\u5168\u94fe\u8def\u63a5\u53e3\u6d4b\u8bd5\u3002<\/span><\/p>\n<h3 style=\"color: rgb(51, 51, 51);font-family: -apple-system, BlinkMacSystemFont, &quot;Segoe UI&quot;, &quot;PingFang SC&quot;, &quot;Hiragino Sans GB&quot;, &quot;Microsoft YaHei&quot;, sans-serif;font-style: normal;font-variant-ligatures: normal;font-variant-caps: normal;letter-spacing: normal;orphans: 2;text-align: start;text-indent: 0px;text-transform: none;widows: 2;word-spacing: 0px;-webkit-text-stroke-width: 0px;white-space: normal;text-decoration-thickness: initial;text-decoration-style: initial;text-decoration-color: initial;font-size: 20px;font-weight: 600;margin-top: 30px;margin-bottom: 15px;\"><span leaf=\"\">7.1 \u4e1a\u52a1\u573a\u666f\u63cf\u8ff0<\/span><\/h3>\n<p style=\"color: rgb(51, 51, 51);font-family: -apple-system, BlinkMacSystemFont, &quot;Segoe UI&quot;, &quot;PingFang SC&quot;, &quot;Hiragino Sans GB&quot;, &quot;Microsoft YaHei&quot;, sans-serif;font-size: 16px;font-style: normal;font-variant-ligatures: normal;font-variant-caps: normal;font-weight: 400;letter-spacing: normal;orphans: 2;text-align: start;text-indent: 0px;text-transform: none;widows: 2;word-spacing: 0px;-webkit-text-stroke-width: 0px;white-space: normal;text-decoration-thickness: initial;text-decoration-style: initial;text-decoration-color: initial;margin-bottom: 15px;\"><span leaf=\"\">\u7535\u5546\u7cfb\u7edf\u7684&#8221;\u7528\u6237\u4e0b\u5355&#8221;\u6d41\u7a0b\u6d89\u53ca\u4ee5\u4e0b\u670d\u52a1\uff1a<\/span><\/p>\n<table>\n<tbody>\n<tr>\n<td data-colwidth=\"287\">\n<section style=\"text-align: center;\"><span style=\"color: rgb(13, 71, 161);font-family: -apple-system, BlinkMacSystemFont, &quot;Segoe UI&quot;, &quot;PingFang SC&quot;, &quot;Hiragino Sans GB&quot;, &quot;Microsoft YaHei&quot;, sans-serif;font-size: 14px;font-style: normal;font-variant-ligatures: normal;font-variant-caps: normal;font-weight: 600;letter-spacing: normal;orphans: 2;text-indent: 0px;text-transform: none;widows: 2;word-spacing: 0px;-webkit-text-stroke-width: 0px;background-color: rgb(227, 242, 253);text-decoration-thickness: initial;text-decoration-style: initial;text-decoration-color: initial;float: none;display: inline !important;\" data-pm-slice=\"0 0 []\"><span leaf=\"\"><span textstyle=\"\" style=\"font-size: 16px;background-color: #ffffff;\">\ud83d\udccb \u4e1a\u52a1\u6d41\u7a0b<\/span><\/span><\/span><\/section>\n<\/td>\n<td data-colwidth=\"287\">\n<section style=\"text-align: center;\"><span style=\"color: rgb(27, 94, 32);font-family: -apple-system, BlinkMacSystemFont, &quot;Segoe UI&quot;, &quot;PingFang SC&quot;, &quot;Hiragino Sans GB&quot;, &quot;Microsoft YaHei&quot;, sans-serif;font-size: 14px;font-style: normal;font-variant-ligatures: normal;font-variant-caps: normal;font-weight: 600;letter-spacing: normal;orphans: 2;text-indent: 0px;text-transform: none;widows: 2;word-spacing: 0px;-webkit-text-stroke-width: 0px;background-color: rgb(232, 245, 233);text-decoration-thickness: initial;text-decoration-style: initial;text-decoration-color: initial;float: none;display: inline !important;\" data-pm-slice=\"0 0 []\"><span leaf=\"\"><span textstyle=\"\" style=\"font-size: 16px;background-color: #ffffff;\">\ud83c\udfaf \u6d4b\u8bd5\u76ee\u6807<\/span><\/span><\/span><\/section>\n<\/td>\n<\/tr>\n<tr>\n<td data-colwidth=\"287\">\n<ol style=\"color: rgb(51, 51, 51);font-family: -apple-system, BlinkMacSystemFont, &quot;Segoe UI&quot;, &quot;PingFang SC&quot;, &quot;Hiragino Sans GB&quot;, &quot;Microsoft YaHei&quot;, sans-serif;font-style: normal;font-variant-ligatures: normal;font-variant-caps: normal;font-weight: 400;letter-spacing: normal;orphans: 2;text-align: start;text-indent: 0px;text-transform: none;widows: 2;word-spacing: 0px;-webkit-text-stroke-width: 0px;white-space: normal;text-decoration-thickness: initial;text-decoration-style: initial;text-decoration-color: initial;font-size: 13px;line-height: 1.8;margin: 0px;padding-left: 20px;\" class=\"list-paddingleft-1\">\n<li>\n<section><span leaf=\"\">\u7528\u6237\u767b\u5f55\uff08\u7528\u6237\u670d\u52a1\uff09<\/span><\/section>\n<\/li>\n<li>\n<section><span leaf=\"\">\u6d4f\u89c8\u5546\u54c1\uff08\u5546\u54c1\u670d\u52a1\uff09<\/span><\/section>\n<\/li>\n<li>\n<section><span leaf=\"\">\u52a0\u5165\u8d2d\u7269\u8f66\uff08\u8d2d\u7269\u8f66\u670d\u52a1\uff09<\/span><\/section>\n<\/li>\n<li>\n<section><span leaf=\"\">\u63d0\u4ea4\u8ba2\u5355\uff08\u8ba2\u5355\u670d\u52a1\uff09<\/span><\/section>\n<\/li>\n<li>\n<section><span leaf=\"\">\u6263\u51cf\u5e93\u5b58\uff08\u5e93\u5b58\u670d\u52a1\uff09<\/span><\/section>\n<\/li>\n<li>\n<section><span leaf=\"\">\u521b\u5efa\u652f\u4ed8\uff08\u652f\u4ed8\u670d\u52a1\uff09<\/span><\/section>\n<\/li>\n<li>\n<section><span leaf=\"\">\u652f\u4ed8\u6210\u529f\u56de\u8c03\uff08\u652f\u4ed8\u56de\u8c03\u670d\u52a1\uff09<\/span><\/section>\n<\/li>\n<li>\n<section><span leaf=\"\">\u8ba2\u5355\u72b6\u6001\u66f4\u65b0\uff08\u8ba2\u5355\u670d\u52a1\uff09<\/span><\/section>\n<\/li>\n<\/ol>\n<\/td>\n<td data-colwidth=\"287\">\n<ul style=\"color: rgb(51, 51, 51);font-family: -apple-system, BlinkMacSystemFont, &quot;Segoe UI&quot;, &quot;PingFang SC&quot;, &quot;Hiragino Sans GB&quot;, &quot;Microsoft YaHei&quot;, sans-serif;font-style: normal;font-variant-ligatures: normal;font-variant-caps: normal;font-weight: 400;letter-spacing: normal;orphans: 2;text-align: start;text-indent: 0px;text-transform: none;widows: 2;word-spacing: 0px;-webkit-text-stroke-width: 0px;white-space: normal;text-decoration-thickness: initial;text-decoration-style: initial;text-decoration-color: initial;font-size: 13px;line-height: 1.8;margin: 0px;padding-left: 20px;\" class=\"list-paddingleft-1\">\n<li>\n<section><span leaf=\"\">\u9a8c\u8bc1\u5b8c\u6574\u4e0b\u5355\u6d41\u7a0b\u53ef\u7528<\/span><\/section>\n<\/li>\n<li>\n<section><span leaf=\"\">\u9a8c\u8bc1\u5f02\u5e38\u573a\u666f\u5904\u7406\uff08\u5e93\u5b58\u4e0d\u8db3\u3001\u652f\u4ed8\u5931\u8d25\uff09<\/span><\/section>\n<\/li>\n<li>\n<section><span leaf=\"\">\u9a8c\u8bc1\u5206\u5e03\u5f0f\u4e8b\u52a1\u4e00\u81f4\u6027<\/span><\/section>\n<\/li>\n<li>\n<section><span leaf=\"\">\u9a8c\u8bc1\u670d\u52a1\u964d\u7ea7\u548c\u7194\u65ad<\/span><\/section>\n<\/li>\n<li>\n<section><span leaf=\"\">\u9a8c\u8bc1\u6027\u80fd\u6307\u6807\uff08P99 &lt; 2s\uff09<\/span><\/section>\n<\/li>\n<\/ul>\n<section><span leaf=\"\"><br  \/><\/span><\/section>\n<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<h3 style=\"color: rgb(51, 51, 51);font-family: -apple-system, BlinkMacSystemFont, &quot;Segoe UI&quot;, &quot;PingFang SC&quot;, &quot;Hiragino Sans GB&quot;, &quot;Microsoft YaHei&quot;, sans-serif;font-style: normal;font-variant-ligatures: normal;font-variant-caps: normal;letter-spacing: normal;orphans: 2;text-align: start;text-indent: 0px;text-transform: none;widows: 2;word-spacing: 0px;-webkit-text-stroke-width: 0px;white-space: normal;text-decoration-thickness: initial;text-decoration-style: initial;text-decoration-color: initial;font-size: 20px;font-weight: 600;margin-top: 30px;margin-bottom: 15px;\" data-pm-slice=\"0 0 []\"><span leaf=\"\">7.2 \u6d4b\u8bd5\u65b9\u6848\u8bbe\u8ba1<\/span><\/h3>\n<p style=\"font-size: 15px;margin: 0px 0px 10px;font-weight: 600;color: rgb(245, 127, 23);\"><span leaf=\"\">\u6d4b\u8bd5\u7b56\u7565\uff1a<\/span><\/p>\n<ul style=\"font-size: 15px;line-height: 1.8;margin: 0px;padding-left: 20px;\" class=\"list-paddingleft-1\">\n<li style=\"margin-bottom: 5px;\"><strong><span leaf=\"\">\u9636\u6bb51\uff1a\u5951\u7ea6\u6d4b\u8bd5<\/span><\/strong><br \/>\n<section><span leaf=\"\">&nbsp;&#8211; \u4e3a\u6bcf\u4e2a\u670d\u52a1\u5b9a\u4e49Pact\u5951\u7ea6\uff0c\u786e\u4fdd\u63a5\u53e3\u517c\u5bb9<\/span><\/section>\n<\/li>\n<li style=\"margin-bottom: 5px;\"><strong><span leaf=\"\">\u9636\u6bb52\uff1a\u7ec4\u4ef6\u6d4b\u8bd5<\/span><\/strong><br \/>\n<section><span leaf=\"\">&nbsp;&#8211; \u4f7f\u7528WireMock\u6a21\u62df\u4f9d\u8d56\uff0c\u5355\u72ec\u6d4b\u8bd5\u6bcf\u4e2a\u670d\u52a1<\/span><\/section>\n<\/li>\n<li style=\"margin-bottom: 5px;\"><strong><span leaf=\"\">\u9636\u6bb53\uff1a\u96c6\u6210\u6d4b\u8bd5<\/span><\/strong><br \/>\n<section><span leaf=\"\">&nbsp;&#8211; \u90e8\u7f72\u5230\u6d4b\u8bd5\u73af\u5883\uff0c\u9a8c\u8bc1\u771f\u5b9e\u670d\u52a1\u95f4\u8c03\u7528<\/span><\/section>\n<\/li>\n<li style=\"margin-bottom: 5px;\"><strong><span leaf=\"\">\u9636\u6bb54\uff1a\u5168\u94fe\u8defE2E\u6d4b\u8bd5<\/span><\/strong><br \/>\n<section><span leaf=\"\">&nbsp;&#8211; \u4ece\u7528\u6237\u4e0b\u5355\u5230\u652f\u4ed8\u5b8c\u6210\uff0c\u7aef\u5230\u7aef\u9a8c\u8bc1<\/span><\/section>\n<\/li>\n<li style=\"margin-bottom: 5px;\"><strong><span leaf=\"\">\u9636\u6bb55\uff1a\u6df7\u6c8c\u6d4b\u8bd5<\/span><\/strong><br \/>\n<section><span leaf=\"\">&nbsp;&#8211; \u4f7f\u7528Chaos Mesh\u6ce8\u5165\u6545\u969c\uff0c\u9a8c\u8bc1\u7cfb\u7edf\u5bb9\u9519\u80fd\u529b<\/span><\/section>\n<\/li>\n<\/ul>\n<h3 style=\"color: rgb(51, 51, 51);font-family: -apple-system, BlinkMacSystemFont, &quot;Segoe UI&quot;, &quot;PingFang SC&quot;, &quot;Hiragino Sans GB&quot;, &quot;Microsoft YaHei&quot;, sans-serif;font-style: normal;font-variant-ligatures: normal;font-variant-caps: normal;letter-spacing: normal;orphans: 2;text-align: start;text-indent: 0px;text-transform: none;widows: 2;word-spacing: 0px;-webkit-text-stroke-width: 0px;white-space: normal;text-decoration-thickness: initial;text-decoration-style: initial;text-decoration-color: initial;font-size: 20px;font-weight: 600;margin-top: 30px;margin-bottom: 15px;\"><span leaf=\"\">7.3 \u6838\u5fc3\u6d4b\u8bd5\u4ee3\u7801\u793a\u4f8b<\/span><\/h3>\n<section class=\"code-snippet__fix code-snippet__js\">\n<ul class=\"code-snippet__line-index code-snippet__js\">\n<li><\/li>\n<li><\/li>\n<li><\/li>\n<li><\/li>\n<li><\/li>\n<li><\/li>\n<li><\/li>\n<li><\/li>\n<li><\/li>\n<li><\/li>\n<li><\/li>\n<li><\/li>\n<li><\/li>\n<li><\/li>\n<li><\/li>\n<li><\/li>\n<li><\/li>\n<li><\/li>\n<li><\/li>\n<li><\/li>\n<li><\/li>\n<li><\/li>\n<li><\/li>\n<li><\/li>\n<li><\/li>\n<li><\/li>\n<li><\/li>\n<li><\/li>\n<li><\/li>\n<li><\/li>\n<li><\/li>\n<li><\/li>\n<li><\/li>\n<li><\/li>\n<li><\/li>\n<li><\/li>\n<li><\/li>\n<li><\/li>\n<li><\/li>\n<li><\/li>\n<li><\/li>\n<li><\/li>\n<li><\/li>\n<li><\/li>\n<li><\/li>\n<li><\/li>\n<li><\/li>\n<li><\/li>\n<li><\/li>\n<li><\/li>\n<li><\/li>\n<li><\/li>\n<li><\/li>\n<li><\/li>\n<li><\/li>\n<li><\/li>\n<li><\/li>\n<li><\/li>\n<li><\/li>\n<li><\/li>\n<li><\/li>\n<li><\/li>\n<li><\/li>\n<li><\/li>\n<li><\/li>\n<li><\/li>\n<li><\/li>\n<li><\/li>\n<li><\/li>\n<li><\/li>\n<li><\/li>\n<li><\/li>\n<li><\/li>\n<li><\/li>\n<li><\/li>\n<\/ul>\n<pre class=\"code-snippet__js\" data-lang=\"python\"><code><span leaf=\"\"><span class=\"code-snippet__comment\"># tests\/test_order_e2e.py<\/span><\/span><\/code><code><span leaf=\"\"><span class=\"code-snippet__keyword\">import<\/span>&nbsp;pytest<\/span><\/code><code><span leaf=\"\"><span class=\"code-snippet__keyword\">import<\/span>&nbsp;requests<\/span><\/code><code><span leaf=\"\"><span class=\"code-snippet__keyword\">import<\/span>&nbsp;time<\/span><\/code><code><span leaf=\"\"><span class=\"code-snippet__keyword\">from<\/span>&nbsp;utils.api_client&nbsp;<span class=\"code-snippet__keyword\">import<\/span>&nbsp;APIClient<\/span><\/code><code><span leaf=\"\"><span class=\"code-snippet__keyword\">from<\/span>&nbsp;utils.data_factory&nbsp;<span class=\"code-snippet__keyword\">import<\/span>&nbsp;create_test_product, cleanup_test_data<\/span><\/code><code><span leaf=\"\"><span class=\"code-snippet__keyword\">class<\/span>&nbsp;<span class=\"code-snippet__title\">TestOrderE2EFlow<\/span>:<\/span><\/code><code><span leaf=\"\">&nbsp; &nbsp;&nbsp;<span class=\"code-snippet__string\">\"\"\"\u8ba2\u5355\u5168\u94fe\u8defE2E\u6d4b\u8bd5\"\"\"<\/span><\/span><\/code><code><span leaf=\"\">&nbsp; &nbsp;&nbsp;<span class=\"code-snippet__keyword\">def<\/span>&nbsp;<span class=\"code-snippet__title\">setup_class<\/span>(<span class=\"code-snippet__params\">self<\/span>):<\/span><\/code><code><span leaf=\"\">&nbsp; &nbsp; &nbsp; &nbsp;&nbsp;<span class=\"code-snippet__variable\">self<\/span>.api = APIClient()<\/span><\/code><code><span leaf=\"\">&nbsp; &nbsp; &nbsp; &nbsp;&nbsp;<span class=\"code-snippet__variable\">self<\/span>.test_user =&nbsp;<span class=\"code-snippet__variable\">self<\/span>.api.create_user({<span class=\"code-snippet__string\">\"username\"<\/span>:&nbsp;<span class=\"code-snippet__string\">\"e2e_test_user\"<\/span>})<\/span><\/code><code><span leaf=\"\">&nbsp; &nbsp; &nbsp; &nbsp;&nbsp;<span class=\"code-snippet__variable\">self<\/span>.test_product = create_test_product({<span class=\"code-snippet__string\">\"name\"<\/span>:&nbsp;<span class=\"code-snippet__string\">\"\u6d4b\u8bd5\u5546\u54c1\"<\/span>,&nbsp;<span class=\"code-snippet__string\">\"price\"<\/span>:&nbsp;<span class=\"code-snippet__number\">100<\/span>,&nbsp;<span class=\"code-snippet__string\">\"stock\"<\/span>:&nbsp;<span class=\"code-snippet__number\">50<\/span>})<\/span><\/code><code><span leaf=\"\">&nbsp; &nbsp;&nbsp;<span class=\"code-snippet__keyword\">def<\/span>&nbsp;<span class=\"code-snippet__title\">teardown_class<\/span>(<span class=\"code-snippet__params\">self<\/span>):<\/span><\/code><code><span leaf=\"\">&nbsp; &nbsp; &nbsp; &nbsp; cleanup_test_data(<span class=\"code-snippet__variable\">self<\/span>.test_user,&nbsp;<span class=\"code-snippet__variable\">self<\/span>.test_product)<\/span><\/code><code><span leaf=\"\">&nbsp; &nbsp;&nbsp;<span class=\"code-snippet__keyword\">def<\/span>&nbsp;<span class=\"code-snippet__title\">test_complete_order_flow<\/span>(<span class=\"code-snippet__params\">self<\/span>):<\/span><\/code><code><span leaf=\"\">&nbsp; &nbsp; &nbsp; &nbsp;&nbsp;<span class=\"code-snippet__string\">\"\"\"\u6d4b\u8bd5\u5b8c\u6574\u4e0b\u5355\u6d41\u7a0b\"\"\"<\/span><\/span><\/code><code><span leaf=\"\">&nbsp; &nbsp; &nbsp; &nbsp; api =&nbsp;<span class=\"code-snippet__variable\">self<\/span>.api<\/span><\/code><code><span leaf=\"\">&nbsp; &nbsp; &nbsp; &nbsp;&nbsp;<span class=\"code-snippet__comment\"># 1. \u7528\u6237\u767b\u5f55<\/span><\/span><\/code><code><span leaf=\"\">&nbsp; &nbsp; &nbsp; &nbsp; login_resp = api.post(<span class=\"code-snippet__string\">\"\/auth\/login\"<\/span>, json={<\/span><\/code><code><span leaf=\"\">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp;<span class=\"code-snippet__string\">\"username\"<\/span>:&nbsp;<span class=\"code-snippet__variable\">self<\/span>.test_user[<span class=\"code-snippet__string\">\"username\"<\/span>],<\/span><\/code><code><span leaf=\"\">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp;<span class=\"code-snippet__string\">\"password\"<\/span>:&nbsp;<span class=\"code-snippet__variable\">self<\/span>.test_user[<span class=\"code-snippet__string\">\"password\"<\/span>]<\/span><\/code><code><span leaf=\"\">&nbsp; &nbsp; &nbsp; &nbsp; })<\/span><\/code><code><span leaf=\"\">&nbsp; &nbsp; &nbsp; &nbsp;&nbsp;<span class=\"code-snippet__keyword\">assert<\/span>&nbsp;login_resp.status_code ==&nbsp;<span class=\"code-snippet__number\">200<\/span><\/span><\/code><code><span leaf=\"\">&nbsp; &nbsp; &nbsp; &nbsp; token = login_resp.json()[<span class=\"code-snippet__string\">\"token\"<\/span>]<\/span><\/code><code><span leaf=\"\">&nbsp; &nbsp; &nbsp; &nbsp; api.set_token(token)<\/span><\/code><code><span leaf=\"\">&nbsp; &nbsp; &nbsp; &nbsp;&nbsp;<span class=\"code-snippet__comment\"># 2. \u6dfb\u52a0\u5546\u54c1\u5230\u8d2d\u7269\u8f66<\/span><\/span><\/code><code><span leaf=\"\">&nbsp; &nbsp; &nbsp; &nbsp; cart_resp = api.post(<span class=\"code-snippet__string\">\"\/cart\/add\"<\/span>, json={<\/span><\/code><code><span leaf=\"\">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp;<span class=\"code-snippet__string\">\"productId\"<\/span>:&nbsp;<span class=\"code-snippet__variable\">self<\/span>.test_product[<span class=\"code-snippet__string\">\"id\"<\/span>],<\/span><\/code><code><span leaf=\"\">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp;<span class=\"code-snippet__string\">\"quantity\"<\/span>:&nbsp;<span class=\"code-snippet__number\">2<\/span><\/span><\/code><code><span leaf=\"\">&nbsp; &nbsp; &nbsp; &nbsp; })<\/span><\/code><code><span leaf=\"\">&nbsp; &nbsp; &nbsp; &nbsp;&nbsp;<span class=\"code-snippet__keyword\">assert<\/span>&nbsp;cart_resp.status_code ==&nbsp;<span class=\"code-snippet__number\">200<\/span><\/span><\/code><code><span leaf=\"\">&nbsp; &nbsp; &nbsp; &nbsp; cart_id = cart_resp.json()[<span class=\"code-snippet__string\">\"cartId\"<\/span>]<\/span><\/code><code><span leaf=\"\">&nbsp; &nbsp; &nbsp; &nbsp;&nbsp;<span class=\"code-snippet__comment\"># 3. \u63d0\u4ea4\u8ba2\u5355<\/span><\/span><\/code><code><span leaf=\"\">&nbsp; &nbsp; &nbsp; &nbsp; order_resp = api.post(<span class=\"code-snippet__string\">\"\/orders\/create\"<\/span>, json={<\/span><\/code><code><span leaf=\"\">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp;<span class=\"code-snippet__string\">\"cartId\"<\/span>: cart_id,<\/span><\/code><code><span leaf=\"\">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp;<span class=\"code-snippet__string\">\"shippingAddress\"<\/span>: {<\/span><\/code><code><span leaf=\"\">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp;<span class=\"code-snippet__string\">\"province\"<\/span>:&nbsp;<span class=\"code-snippet__string\">\"\u5e7f\u4e1c\"<\/span>,<\/span><\/code><code><span leaf=\"\">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp;<span class=\"code-snippet__string\">\"city\"<\/span>:&nbsp;<span class=\"code-snippet__string\">\"\u6df1\u5733\"<\/span>,<\/span><\/code><code><span leaf=\"\">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp;<span class=\"code-snippet__string\">\"detail\"<\/span>:&nbsp;<span class=\"code-snippet__string\">\"\u5357\u5c71\u533a\u79d1\u6280\u56ed\"<\/span><\/span><\/code><code><span leaf=\"\">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; }<\/span><\/code><code><span leaf=\"\">&nbsp; &nbsp; &nbsp; &nbsp; })<\/span><\/code><code><span leaf=\"\">&nbsp; &nbsp; &nbsp; &nbsp;&nbsp;<span class=\"code-snippet__keyword\">assert<\/span>&nbsp;order_resp.status_code ==&nbsp;<span class=\"code-snippet__number\">201<\/span><\/span><\/code><code><span leaf=\"\">&nbsp; &nbsp; &nbsp; &nbsp; order_id = order_resp.json()[<span class=\"code-snippet__string\">\"orderId\"<\/span>]<\/span><\/code><code><span leaf=\"\">&nbsp; &nbsp; &nbsp; &nbsp;&nbsp;<span class=\"code-snippet__keyword\">assert<\/span>&nbsp;order_resp.json()[<span class=\"code-snippet__string\">\"status\"<\/span>] ==&nbsp;<span class=\"code-snippet__string\">\"CREATED\"<\/span><\/span><\/code><code><span leaf=\"\">&nbsp; &nbsp; &nbsp; &nbsp;&nbsp;<span class=\"code-snippet__comment\"># 4. \u83b7\u53d6\u652f\u4ed8\u4fe1\u606f<\/span><\/span><\/code><code><span leaf=\"\">&nbsp; &nbsp; &nbsp; &nbsp; payment_resp = api.post(<span class=\"code-snippet__string\">\"\/payments\/create\"<\/span>, json={<\/span><\/code><code><span leaf=\"\">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp;<span class=\"code-snippet__string\">\"orderId\"<\/span>: order_id,<\/span><\/code><code><span leaf=\"\">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp;<span class=\"code-snippet__string\">\"paymentMethod\"<\/span>:&nbsp;<span class=\"code-snippet__string\">\"ALIPAY\"<\/span><\/span><\/code><code><span leaf=\"\">&nbsp; &nbsp; &nbsp; &nbsp; })<\/span><\/code><code><span leaf=\"\">&nbsp; &nbsp; &nbsp; &nbsp;&nbsp;<span class=\"code-snippet__keyword\">assert<\/span>&nbsp;payment_resp.status_code ==&nbsp;<span class=\"code-snippet__number\">201<\/span><\/span><\/code><code><span leaf=\"\">&nbsp; &nbsp; &nbsp; &nbsp; payment_id = payment_resp.json()[<span class=\"code-snippet__string\">\"paymentId\"<\/span>]<\/span><\/code><code><span leaf=\"\">&nbsp; &nbsp; &nbsp; &nbsp; pay_url = payment_resp.json()[<span class=\"code-snippet__string\">\"payUrl\"<\/span>]<\/span><\/code><code><span leaf=\"\">&nbsp; &nbsp; &nbsp; &nbsp;&nbsp;<span class=\"code-snippet__comment\"># 5. \u6a21\u62df\u652f\u4ed8\u56de\u8c03\uff08Mock\u652f\u4ed8\u7f51\u5173\uff09<\/span><\/span><\/code><code><span leaf=\"\">&nbsp; &nbsp; &nbsp; &nbsp; callback_resp = api.post(<span class=\"code-snippet__string\">\"\/payments\/callback\"<\/span>, json={<\/span><\/code><code><span leaf=\"\">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp;<span class=\"code-snippet__string\">\"paymentId\"<\/span>: payment_id,<\/span><\/code><code><span leaf=\"\">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp;<span class=\"code-snippet__string\">\"status\"<\/span>:&nbsp;<span class=\"code-snippet__string\">\"SUCCESS\"<\/span>,<\/span><\/code><code><span leaf=\"\">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp;<span class=\"code-snippet__string\">\"transactionId\"<\/span>:&nbsp;<span class=\"code-snippet__string\">\"MOCK_TXN_001\"<\/span><\/span><\/code><code><span leaf=\"\">&nbsp; &nbsp; &nbsp; &nbsp; })<\/span><\/code><code><span leaf=\"\">&nbsp; &nbsp; &nbsp; &nbsp;&nbsp;<span class=\"code-snippet__keyword\">assert<\/span>&nbsp;callback_resp.status_code ==&nbsp;<span class=\"code-snippet__number\">200<\/span><\/span><\/code><code><span leaf=\"\">&nbsp; &nbsp; &nbsp; &nbsp;&nbsp;<span class=\"code-snippet__comment\"># 6. \u9a8c\u8bc1\u8ba2\u5355\u72b6\u6001\u66f4\u65b0\u4e3a\u5df2\u652f\u4ed8<\/span><\/span><\/code><code><span leaf=\"\">&nbsp; &nbsp; &nbsp; &nbsp; time.sleep(<span class=\"code-snippet__number\">1<\/span>) &nbsp;<span class=\"code-snippet__comment\"># \u7b49\u5f85\u5f02\u6b65\u5904\u7406<\/span><\/span><\/code><code><span leaf=\"\">&nbsp; &nbsp; &nbsp; &nbsp; order_detail_resp = api.get(<span class=\"code-snippet__string\">f\"\/orders\/<\/span><span class=\"code-snippet__string\"><span class=\"code-snippet__subst\">{order_id}<\/span><\/span><span class=\"code-snippet__string\">\"<\/span>)<\/span><\/code><code><span leaf=\"\">&nbsp; &nbsp; &nbsp; &nbsp;&nbsp;<span class=\"code-snippet__keyword\">assert<\/span>&nbsp;order_detail_resp.status_code ==&nbsp;<span class=\"code-snippet__number\">200<\/span><\/span><\/code><code><span leaf=\"\">&nbsp; &nbsp; &nbsp; &nbsp;&nbsp;<span class=\"code-snippet__keyword\">assert<\/span>&nbsp;order_detail_resp.json()[<span class=\"code-snippet__string\">\"status\"<\/span>] ==&nbsp;<span class=\"code-snippet__string\">\"PAID\"<\/span><\/span><\/code><code><span leaf=\"\">&nbsp; &nbsp; &nbsp; &nbsp;&nbsp;<span class=\"code-snippet__comment\"># 7. \u9a8c\u8bc1\u5e93\u5b58\u6263\u51cf<\/span><\/span><\/code><code><span leaf=\"\">&nbsp; &nbsp; &nbsp; &nbsp; product_resp = api.get(<span class=\"code-snippet__string\">f\"\/products\/<\/span><span class=\"code-snippet__string\"><span class=\"code-snippet__subst\">{self.test_product[<\/span><\/span><span class=\"code-snippet__string\"><span class=\"code-snippet__subst\"><span class=\"code-snippet__string\">'id'<\/span><\/span><\/span><span class=\"code-snippet__string\"><span class=\"code-snippet__subst\">]}<\/span><\/span><span class=\"code-snippet__string\">\"<\/span>)<\/span><\/code><code><span leaf=\"\">&nbsp; &nbsp; &nbsp; &nbsp;&nbsp;<span class=\"code-snippet__keyword\">assert<\/span>&nbsp;product_resp.json()[<span class=\"code-snippet__string\">\"stock\"<\/span>] ==&nbsp;<span class=\"code-snippet__number\">48<\/span>&nbsp;&nbsp;<span class=\"code-snippet__comment\"># 50 - 2<\/span><\/span><\/code><code><span leaf=\"\">&nbsp; &nbsp; &nbsp; &nbsp;&nbsp;<span class=\"code-snippet__built_in\">print<\/span>(<span class=\"code-snippet__string\">f\"\u8ba2\u5355\u5168\u94fe\u8def\u6d4b\u8bd5\u901a\u8fc7\uff01Order ID:&nbsp;<\/span><span class=\"code-snippet__string\"><span class=\"code-snippet__subst\">{order_id}<\/span><\/span><span class=\"code-snippet__string\">\"<\/span>)<\/span><\/code><code><span leaf=\"\">&nbsp; &nbsp; @pytest.mark.chaos<\/span><\/code><code><span leaf=\"\">&nbsp; &nbsp;&nbsp;<span class=\"code-snippet__keyword\">def<\/span>&nbsp;<span class=\"code-snippet__title\">test_order_flow_with_payment_timeout<\/span>(<span class=\"code-snippet__params\">self<\/span>):<\/span><\/code><code><span leaf=\"\">&nbsp; &nbsp; &nbsp; &nbsp;&nbsp;<span class=\"code-snippet__string\">\"\"\"\u6df7\u6c8c\u6d4b\u8bd5\uff1a\u652f\u4ed8\u670d\u52a1\u8d85\u65f6\u573a\u666f\"\"\"<\/span><\/span><\/code><code><span leaf=\"\">&nbsp; &nbsp; &nbsp; &nbsp;&nbsp;<span class=\"code-snippet__comment\"># \u4f7f\u7528Chaos Mesh\u6ce8\u5165\u7f51\u7edc\u5ef6\u8fdf<\/span><\/span><\/code><code><span leaf=\"\">&nbsp; &nbsp; &nbsp; &nbsp;&nbsp;<span class=\"code-snippet__comment\"># \u9884\u671f\uff1a\u8ba2\u5355\u72b6\u6001\u5e94\u4e3a\"PAYMENT_PENDING\"\uff0c\u5e76\u6709\u91cd\u8bd5\u673a\u5236<\/span><\/span><\/code><code><span leaf=\"\">&nbsp; &nbsp; &nbsp; &nbsp;&nbsp;<span class=\"code-snippet__comment\"># ...\uff08\u7701\u7565\u5177\u4f53\u5b9e\u73b0\uff09<\/span><\/span><\/code><code><span leaf=\"\">&nbsp; &nbsp; &nbsp; &nbsp;&nbsp;<span class=\"code-snippet__keyword\">pass<\/span><\/span><\/code><\/pre>\n<\/section>\n<section><strong style=\"color: rgb(51, 51, 51);font-family: -apple-system, BlinkMacSystemFont, &quot;Segoe UI&quot;, &quot;PingFang SC&quot;, &quot;Hiragino Sans GB&quot;, &quot;Microsoft YaHei&quot;, sans-serif;font-size: 15px;font-style: normal;font-variant-ligatures: normal;font-variant-caps: normal;letter-spacing: normal;orphans: 2;text-align: start;text-indent: 0px;text-transform: none;widows: 2;word-spacing: 0px;-webkit-text-stroke-width: 0px;white-space: normal;background-color: rgb(255, 255, 255);text-decoration-thickness: initial;text-decoration-style: initial;text-decoration-color: initial;\" data-pm-slice=\"0 0 []\"><span leaf=\"\"><br  \/><\/span><\/strong><\/section>\n<hr style=\"border-style: solid;border-width: 1px 0 0;border-color: rgba(0,0,0,0.1);-webkit-transform-origin: 0 0;-webkit-transform: scale(1, 0.5);transform-origin: 0 0;transform: scale(1, 0.5);\"  \/>\n<section><strong style=\"color: rgb(51, 51, 51);font-family: -apple-system, BlinkMacSystemFont, &quot;Segoe UI&quot;, &quot;PingFang SC&quot;, &quot;Hiragino Sans GB&quot;, &quot;Microsoft YaHei&quot;, sans-serif;font-size: 15px;font-style: normal;font-variant-ligatures: normal;font-variant-caps: normal;letter-spacing: normal;orphans: 2;text-align: start;text-indent: 0px;text-transform: none;widows: 2;word-spacing: 0px;-webkit-text-stroke-width: 0px;white-space: normal;background-color: rgb(255, 255, 255);text-decoration-thickness: initial;text-decoration-style: initial;text-decoration-color: initial;\" data-pm-slice=\"0 0 []\"><span leaf=\"\"><br  \/><\/span><\/strong><\/section>\n<h2 style=\"font-family: -apple-system, BlinkMacSystemFont, &quot;Segoe UI&quot;, &quot;PingFang SC&quot;, &quot;Hiragino Sans GB&quot;, &quot;Microsoft YaHei&quot;, sans-serif;font-style: normal;font-variant-ligatures: normal;font-variant-caps: normal;letter-spacing: normal;orphans: 2;text-align: start;text-indent: 0px;text-transform: none;widows: 2;word-spacing: 0px;-webkit-text-stroke-width: 0px;white-space: normal;text-decoration-thickness: initial;text-decoration-style: initial;text-decoration-color: initial;font-size: 24px;font-weight: bold;color: rgb(25, 118, 210);margin-top: 40px;margin-bottom: 20px;padding-bottom: 10px;border-bottom: 3px solid rgb(25, 118, 210);\" data-pm-slice=\"0 0 []\"><span leaf=\"\">\u516b\u3001\u5fae\u670d\u52a1\u6d4b\u8bd5\u5e38\u89c1\u5751\u70b9\u4e0e\u5e94\u5bf9<\/span><\/h2>\n<p style=\"color: rgb(51, 51, 51);font-family: -apple-system, BlinkMacSystemFont, &quot;Segoe UI&quot;, &quot;PingFang SC&quot;, &quot;Hiragino Sans GB&quot;, &quot;Microsoft YaHei&quot;, sans-serif;font-size: 16px;font-style: normal;font-variant-ligatures: normal;font-variant-caps: normal;font-weight: 400;letter-spacing: normal;orphans: 2;text-align: start;text-indent: 0px;text-transform: none;widows: 2;word-spacing: 0px;-webkit-text-stroke-width: 0px;white-space: normal;text-decoration-thickness: initial;text-decoration-style: initial;text-decoration-color: initial;margin-bottom: 20px;\"><span leaf=\"\">\u5728\u5fae\u670d\u52a1\u6d4b\u8bd5\u5b9e\u8df5\u4e2d\uff0c\u6709\u4e00\u4e9b\u5e38\u89c1\u7684&#8221;\u5751&#8221;\u3002\u63d0\u524d\u4e86\u89e3\uff0c\u53ef\u4ee5\u5c11\u8d70\u5f2f\u8def\uff1a<\/span><\/p>\n<table style=\"width: 800px;border-collapse: collapse;border: 1px solid rgb(222, 226, 230);font-size: 14px;\">\n<thead>\n<tr style=\"background: linear-gradient(135deg, rgb(52, 152, 219), rgb(41, 128, 185));color: rgb(255, 255, 255);\">\n<th style=\"padding: 14px 16px;text-align: left;font-weight: 600;border: 1px solid rgb(41, 128, 185);\">\n<section style=\"text-align: center;\"><span leaf=\"\"><span textstyle=\"\" style=\"color: #ffa900;\">\u5e38\u89c1\u5751\u70b9<\/span><\/span><\/section>\n<\/th>\n<th style=\"padding: 14px 16px;text-align: left;font-weight: 600;border: 1px solid rgb(41, 128, 185);\">\n<section style=\"text-align: center;\"><span leaf=\"\"><span textstyle=\"\" style=\"color: #ffa900;\">\u95ee\u9898\u63cf\u8ff0<\/span><\/span><\/section>\n<\/th>\n<th style=\"padding: 14px 16px;text-align: left;font-weight: 600;border: 1px solid rgb(41, 128, 185);\">\n<section style=\"text-align: center;\"><span leaf=\"\"><span textstyle=\"\" style=\"color: #ffa900;\">\u5e94\u5bf9\u7b56\u7565<\/span><\/span><\/section>\n<\/th>\n<\/tr>\n<\/thead>\n<tbody>\n<tr style=\"background-color: rgb(248, 249, 250);\">\n<td style=\"padding: 12px 16px;border: 1px solid rgb(222, 226, 230);font-weight: 500;\">\n<section><span leaf=\"\">\u73af\u5883\u4e0d\u7a33\u5b9a<\/span><\/section>\n<\/td>\n<td style=\"padding: 12px 16px;border: 1px solid rgb(222, 226, 230);\">\n<section><span leaf=\"\">\u6d4b\u8bd5\u73af\u5883\u9891\u7e41\u91cd\u542f\uff0c\u5bfc\u81f4\u6d4b\u8bd5\u968f\u673a\u5931\u8d25<\/span><\/section>\n<\/td>\n<td style=\"padding: 12px 16px;border: 1px solid rgb(222, 226, 230);\">\n<section><span leaf=\"\">\u4f7f\u7528Docker Compose\u6216K8s\u642d\u5efa\u7a33\u5b9a\u6d4b\u8bd5\u73af\u5883\uff1b\u5f15\u5165\u91cd\u8bd5\u673a\u5236<\/span><\/section>\n<\/td>\n<\/tr>\n<tr style=\"background-color: rgb(255, 255, 255);\">\n<td style=\"padding: 12px 16px;border: 1px solid rgb(222, 226, 230);font-weight: 500;\">\n<section><span leaf=\"\">\u6d4b\u8bd5\u6570\u636e\u6c61\u67d3<\/span><\/section>\n<\/td>\n<td style=\"padding: 12px 16px;border: 1px solid rgb(222, 226, 230);\">\n<section><span leaf=\"\">\u591a\u4e2a\u6d4b\u8bd5\u7528\u4f8b\u64cd\u4f5c\u540c\u4e00\u4efd\u6570\u636e\uff0c\u76f8\u4e92\u5e72\u6270<\/span><\/section>\n<\/td>\n<td style=\"padding: 12px 16px;border: 1px solid rgb(222, 226, 230);\">\n<section><span leaf=\"\">\u6bcf\u4e2a\u7528\u4f8b\u72ec\u7acb\u521b\u5efa\/\u6e05\u7406\u6570\u636e\uff1b\u4f7f\u7528\u4e8b\u52a1\u56de\u6eda<\/span><\/section>\n<\/td>\n<\/tr>\n<tr style=\"background-color: rgb(248, 249, 250);\">\n<td style=\"padding: 12px 16px;border: 1px solid rgb(222, 226, 230);font-weight: 500;\">\n<section><span leaf=\"\">\u5951\u7ea6\u4e0d\u540c\u6b65<\/span><\/section>\n<\/td>\n<td style=\"padding: 12px 16px;border: 1px solid rgb(222, 226, 230);\">\n<section><span leaf=\"\">\u6d88\u8d39\u8005\u548c\u63d0\u4f9b\u8005\u7684\u5951\u7ea6\u5b9a\u4e49\u4e0d\u4e00\u81f4<\/span><\/section>\n<\/td>\n<td style=\"padding: 12px 16px;border: 1px solid rgb(222, 226, 230);\">\n<section><span leaf=\"\">\u4f7f\u7528Pact Broker\u96c6\u4e2d\u7ba1\u7406\u5951\u7ea6\uff1b\u5728CI\u4e2d\u5f3a\u5236\u5951\u7ea6\u9a8c\u8bc1<\/span><\/section>\n<\/td>\n<\/tr>\n<tr style=\"background-color: rgb(255, 255, 255);\">\n<td style=\"padding: 12px 16px;border: 1px solid rgb(222, 226, 230);font-weight: 500;\">\n<section><span leaf=\"\">Mock\u8fc7\u5ea6\u4f7f\u7528<\/span><\/section>\n<\/td>\n<td style=\"padding: 12px 16px;border: 1px solid rgb(222, 226, 230);\">\n<section><span leaf=\"\">\u8fc7\u5ea6\u4f9d\u8d56Mock\uff0c\u5bfc\u81f4\u6d4b\u8bd5\u901a\u8fc7\u4f46\u751f\u4ea7\u73af\u5883\u51fa\u9519<\/span><\/section>\n<\/td>\n<td style=\"padding: 12px 16px;border: 1px solid rgb(222, 226, 230);\">\n<section><span leaf=\"\">Mock\u53ea\u7528\u4e8e\u7ec4\u4ef6\u6d4b\u8bd5\uff1b\u96c6\u6210\u6d4b\u8bd5\u5fc5\u987b\u4f7f\u7528\u771f\u5b9e\u4f9d\u8d56<\/span><\/section>\n<\/td>\n<\/tr>\n<tr style=\"background-color: rgb(248, 249, 250);\">\n<td style=\"padding: 12px 16px;border: 1px solid rgb(222, 226, 230);font-weight: 500;\">\n<section><span leaf=\"\">\u94fe\u8def\u8ffd\u8e2a\u7f3a\u5931<\/span><\/section>\n<\/td>\n<td style=\"padding: 12px 16px;border: 1px solid rgb(222, 226, 230);\">\n<section><span leaf=\"\">\u51fa\u95ee\u9898\u65f6\u65e0\u6cd5\u5b9a\u4f4d\u662f\u54ea\u4e2a\u670d\u52a1\u7684\u95ee\u9898<\/span><\/section>\n<\/td>\n<td style=\"padding: 12px 16px;border: 1px solid rgb(222, 226, 230);\">\n<section><span leaf=\"\">\u5f3a\u5236\u6bcf\u4e2a\u670d\u52a1\u63a5\u5165Jaeger\/Zipkin\uff1b\u5728\u6d4b\u8bd5\u4e2d\u9a8c\u8bc1Trace\u5b8c\u6574\u6027<\/span><\/section>\n<\/td>\n<\/tr>\n<tr style=\"background-color: rgb(255, 255, 255);\">\n<td style=\"padding: 12px 16px;border: 1px solid rgb(222, 226, 230);font-weight: 500;\">\n<section><span leaf=\"\">\u6d4b\u8bd5\u6267\u884c\u65f6\u95f4\u8fc7\u957f<\/span><\/section>\n<\/td>\n<td style=\"padding: 12px 16px;border: 1px solid rgb(222, 226, 230);\">\n<section><span leaf=\"\">\u5168\u94fe\u8defE2E\u6d4b\u8bd5\u9700\u8981\u51e0\u5c0f\u65f6\uff0c\u62d6\u7d2fCI\/CD<\/span><\/section>\n<\/td>\n<td style=\"padding: 12px 16px;border: 1px solid rgb(222, 226, 230);\">\n<section><span leaf=\"\">\u5e76\u884c\u6267\u884c\u6d4b\u8bd5\uff1b\u4f7f\u7528\u6d4b\u8bd5\u5206\u5c42\u7b56\u7565\uff0c\u51cf\u5c11E2E\u6570\u91cf<\/span><\/section>\n<\/td>\n<\/tr>\n<tr style=\"background-color: rgb(248, 249, 250);\">\n<td style=\"padding: 12px 16px;border: 1px solid rgb(222, 226, 230);font-weight: 500;\">\n<section><span leaf=\"\">\u7248\u672c\u517c\u5bb9\u6027\u95ee\u9898<\/span><\/section>\n<\/td>\n<td style=\"padding: 12px 16px;border: 1px solid rgb(222, 226, 230);\">\n<section><span leaf=\"\">\u670d\u52a1A\u5347\u7ea7\u540e\uff0c\u670d\u52a1B\u56e0\u4e3a\u63a5\u53e3\u53d8\u66f4\u800c\u5d29\u6e83<\/span><\/section>\n<\/td>\n<td style=\"padding: 12px 16px;border: 1px solid rgb(222, 226, 230);\">\n<section><span leaf=\"\">\u5b9e\u65bd\u5951\u7ea6\u6d4b\u8bd5\uff1b\u4f7f\u7528\u7070\u5ea6\u53d1\u5e03\u548c\u91d1\u4e1d\u96c0\u53d1\u5e03\u7b56\u7565<\/span><\/section>\n<\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<section><strong style=\"color: rgb(51, 51, 51);font-family: -apple-system, BlinkMacSystemFont, &quot;Segoe UI&quot;, &quot;PingFang SC&quot;, &quot;Hiragino Sans GB&quot;, &quot;Microsoft YaHei&quot;, sans-serif;font-size: 15px;font-style: normal;font-variant-ligatures: normal;font-variant-caps: normal;letter-spacing: normal;orphans: 2;text-align: start;text-indent: 0px;text-transform: none;widows: 2;word-spacing: 0px;-webkit-text-stroke-width: 0px;white-space: normal;background-color: rgb(255, 255, 255);text-decoration-thickness: initial;text-decoration-style: initial;text-decoration-color: initial;\" data-pm-slice=\"0 0 []\"><span leaf=\"\"><br  \/><\/span><\/strong><\/section>\n<hr style=\"border-style: solid;border-width: 1px 0 0;border-color: rgba(0,0,0,0.1);-webkit-transform-origin: 0 0;-webkit-transform: scale(1, 0.5);transform-origin: 0 0;transform: scale(1, 0.5);\"  \/>\n<section><strong style=\"color: rgb(51, 51, 51);font-family: -apple-system, BlinkMacSystemFont, &quot;Segoe UI&quot;, &quot;PingFang SC&quot;, &quot;Hiragino Sans GB&quot;, &quot;Microsoft YaHei&quot;, sans-serif;font-size: 15px;font-style: normal;font-variant-ligatures: normal;font-variant-caps: normal;letter-spacing: normal;orphans: 2;text-align: start;text-indent: 0px;text-transform: none;widows: 2;word-spacing: 0px;-webkit-text-stroke-width: 0px;white-space: normal;background-color: rgb(255, 255, 255);text-decoration-thickness: initial;text-decoration-style: initial;text-decoration-color: initial;\" data-pm-slice=\"0 0 []\"><span leaf=\"\"><br  \/><\/span><\/strong><\/section>\n<h2 style=\"font-family: -apple-system, BlinkMacSystemFont, &quot;Segoe UI&quot;, &quot;PingFang SC&quot;, &quot;Hiragino Sans GB&quot;, &quot;Microsoft YaHei&quot;, sans-serif;font-style: normal;font-variant-ligatures: normal;font-variant-caps: normal;letter-spacing: normal;orphans: 2;text-align: center;text-indent: 0px;text-transform: none;widows: 2;word-spacing: 0px;-webkit-text-stroke-width: 0px;white-space: normal;text-decoration-thickness: initial;text-decoration-style: initial;text-decoration-color: initial;font-size: 24px;font-weight: bold;color: rgb(25, 118, 210);margin-top: 40px;margin-bottom: 20px;padding-bottom: 10px;border-bottom: 3px solid rgb(25, 118, 210);\" data-pm-slice=\"0 0 []\"><span leaf=\"\">\u7ed3\u8bed<\/span><\/h2>\n<p style=\"color: rgb(51, 51, 51);font-family: -apple-system, BlinkMacSystemFont, &quot;Segoe UI&quot;, &quot;PingFang SC&quot;, &quot;Hiragino Sans GB&quot;, &quot;Microsoft YaHei&quot;, sans-serif;font-size: 16px;font-style: normal;font-variant-ligatures: normal;font-variant-caps: normal;font-weight: 400;letter-spacing: normal;orphans: 2;text-align: start;text-indent: 0px;text-transform: none;widows: 2;word-spacing: 0px;-webkit-text-stroke-width: 0px;white-space: normal;text-decoration-thickness: initial;text-decoration-style: initial;text-decoration-color: initial;margin-bottom: 20px;\"><span leaf=\"\">\u5fae\u670d\u52a1\u67b6\u6784\u4e0b\u7684\u6d4b\u8bd5\uff0c\u662f\u4e00\u573a\u6ca1\u6709\u7ec8\u70b9\u7684\u9a6c\u62c9\u677e\u3002<\/span><\/p>\n<p style=\"color: rgb(51, 51, 51);font-family: -apple-system, BlinkMacSystemFont, &quot;Segoe UI&quot;, &quot;PingFang SC&quot;, &quot;Hiragino Sans GB&quot;, &quot;Microsoft YaHei&quot;, sans-serif;font-size: 16px;font-style: normal;font-variant-ligatures: normal;font-variant-caps: normal;font-weight: 400;letter-spacing: normal;orphans: 2;text-align: start;text-indent: 0px;text-transform: none;widows: 2;word-spacing: 0px;-webkit-text-stroke-width: 0px;white-space: normal;text-decoration-thickness: initial;text-decoration-style: initial;text-decoration-color: initial;margin-bottom: 20px;\"><span leaf=\"\">\u4ece<\/span><strong><span leaf=\"\">\u5951\u7ea6\u6d4b\u8bd5<\/span><\/strong><span leaf=\"\">\u4fdd\u969c\u63a5\u53e3\u517c\u5bb9\uff0c\u5230<\/span><strong><span leaf=\"\">\u5168\u94fe\u8def\u6d4b\u8bd5<\/span><\/strong><span leaf=\"\">\u9a8c\u8bc1\u7cfb\u7edf\u6574\u4f53\u884c\u4e3a\uff1b\u4ece<\/span><strong><span leaf=\"\">Mock\u7b56\u7565<\/span><\/strong><span leaf=\"\">\u9694\u79bb\u4f9d\u8d56\uff0c\u5230<\/span><strong><span leaf=\"\">\u6df7\u6c8c\u5de5\u7a0b<\/span><\/strong><span leaf=\"\">\u63d0\u5347\u7cfb\u7edf\u97e7\u6027\u2014\u2014\u6bcf\u4e00\u4e2a\u73af\u8282\u90fd\u9700\u8981\u7cbe\u5fc3\u8bbe\u8ba1\u548c\u6301\u7eed\u6295\u5165\u3002<\/span><\/p>\n<p style=\"color: rgb(51, 51, 51);font-family: -apple-system, BlinkMacSystemFont, &quot;Segoe UI&quot;, &quot;PingFang SC&quot;, &quot;Hiragino Sans GB&quot;, &quot;Microsoft YaHei&quot;, sans-serif;font-size: 16px;font-style: normal;font-variant-ligatures: normal;font-variant-caps: normal;font-weight: 400;letter-spacing: normal;orphans: 2;text-align: start;text-indent: 0px;text-transform: none;widows: 2;word-spacing: 0px;-webkit-text-stroke-width: 0px;white-space: normal;text-decoration-thickness: initial;text-decoration-style: initial;text-decoration-color: initial;margin-bottom: 20px;\"><span leaf=\"\">\u4f46\u8bf7\u8bb0\u4f4f\uff1a<\/span><strong><span leaf=\"\">\u6d4b\u8bd5\u7684\u6700\u7ec8\u76ee\u6807\u4e0d\u662f&#8221;\u53d1\u73b0\u66f4\u591aBug&#8221;\uff0c\u800c\u662f&#8221;\u5efa\u7acb\u5bf9\u7cfb\u7edf\u7684\u4fe1\u5fc3&#8221;<\/span><\/strong><span leaf=\"\">\u3002<\/span><\/p>\n<p style=\"font-size: 16px;margin: 0px;color: rgb(21, 101, 192);font-weight: 500;line-height: 1.8;\"><span leaf=\"\">\ud83d\ude80&nbsp;<\/span><strong><span leaf=\"\">\u884c\u52a8\u5efa\u8bae\uff1a<\/span><\/strong><br  \/><span leaf=\"\">1. \u4ece\u5c0f\u5904\u7740\u624b\uff1a\u5148\u4e3a\u4e00\u4e2a\u6838\u5fc3\u670d\u52a1\u5f15\u5165\u5951\u7ea6\u6d4b\u8bd5<\/span><br  \/><span leaf=\"\">2. \u81ea\u52a8\u5316\u4f18\u5148\uff1a\u628a\u80fd\u81ea\u52a8\u5316\u7684\u6d4b\u8bd5\u5168\u90e8\u81ea\u52a8\u5316<\/span><br  \/><span leaf=\"\">3. \u6301\u7eed\u96c6\u6210\uff1a\u8ba9\u6bcf\u4e00\u6b21\u4ee3\u7801\u63d0\u4ea4\u90fd\u89e6\u53d1\u6d4b\u8bd5<\/span><br  \/><span leaf=\"\">4. \u76d1\u63a7\u95ed\u73af\uff1a\u6d4b\u8bd5\u4e0d\u662f\u7ec8\u70b9\uff0c\u7ebf\u4e0a\u76d1\u63a7\u624d\u662f\u771f\u6b63\u7684\u9a8c\u8bc1<\/span><br  \/><span leaf=\"\">5. \u56e2\u961f\u534f\u4f5c\uff1a\u6d4b\u8bd5\u4e0d\u662f\u6d4b\u8bd5\u56e2\u961f\u7684\u4e8b\uff0c\u800c\u662f\u6574\u4e2a\u56e2\u961f\u7684\u4e8b<\/span><\/p>\n<section><strong style=\"color: rgb(51, 51, 51);font-family: -apple-system, BlinkMacSystemFont, &quot;Segoe UI&quot;, &quot;PingFang SC&quot;, &quot;Hiragino Sans GB&quot;, &quot;Microsoft YaHei&quot;, sans-serif;font-size: 15px;font-style: normal;font-variant-ligatures: normal;font-variant-caps: normal;letter-spacing: normal;orphans: 2;text-align: start;text-indent: 0px;text-transform: none;widows: 2;word-spacing: 0px;-webkit-text-stroke-width: 0px;white-space: normal;background-color: rgb(255, 255, 255);text-decoration-thickness: initial;text-decoration-style: initial;text-decoration-color: initial;\" data-pm-slice=\"0 0 []\"><span leaf=\"\"><br  \/><\/span><\/strong><\/section>\n<section><strong style=\"color: rgb(51, 51, 51);font-family: -apple-system, BlinkMacSystemFont, &quot;Segoe UI&quot;, &quot;PingFang SC&quot;, &quot;Hiragino Sans GB&quot;, &quot;Microsoft YaHei&quot;, sans-serif;font-size: 15px;font-style: normal;font-variant-ligatures: normal;font-variant-caps: normal;letter-spacing: normal;orphans: 2;text-align: start;text-indent: 0px;text-transform: none;widows: 2;word-spacing: 0px;-webkit-text-stroke-width: 0px;white-space: normal;background-color: rgb(255, 255, 255);text-decoration-thickness: initial;text-decoration-style: initial;text-decoration-color: initial;\" data-pm-slice=\"0 0 []\"><span leaf=\"\"><br  \/><\/span><\/strong><\/section>\n<p style=\"display: none;\"><mp-style-type data-value=\"3\"><\/mp-style-type><\/p>\n","protected":false},"excerpt":{"rendered":"<p>\ud83d\udca1 \u5bfc\u8bfb\uff1a\u4ece\u5355\u4f53\u5e94\u7528\u5230\u5fae\u670d\u52a1\u67b6\u6784\uff0c\u4e0d\u4ec5\u662f\u6280\u672f\u6808\u7684\u53d8\u9769\uff0c\u66f4\u662f\u6d4b\u8bd5\u601d\u7ef4\u7684\u98a0\u8986\u3002\u5f53\u670d\u52a1\u6570\u91cf\u4ece1\u53d8\u6210N\uff0c\u6d4b\u8bd5\u7684\u96be\u5ea6\u4e0d\u662f [&hellip;]<\/p>\n","protected":false},"author":3,"featured_media":146,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[5],"tags":[],"class_list":["post-147","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-auto-tools"],"_links":{"self":[{"href":"https:\/\/www.deartester.com\/index.php\/wp-json\/wp\/v2\/posts\/147","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.deartester.com\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.deartester.com\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.deartester.com\/index.php\/wp-json\/wp\/v2\/users\/3"}],"replies":[{"embeddable":true,"href":"https:\/\/www.deartester.com\/index.php\/wp-json\/wp\/v2\/comments?post=147"}],"version-history":[{"count":1,"href":"https:\/\/www.deartester.com\/index.php\/wp-json\/wp\/v2\/posts\/147\/revisions"}],"predecessor-version":[{"id":222,"href":"https:\/\/www.deartester.com\/index.php\/wp-json\/wp\/v2\/posts\/147\/revisions\/222"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.deartester.com\/index.php\/wp-json\/wp\/v2\/media\/146"}],"wp:attachment":[{"href":"https:\/\/www.deartester.com\/index.php\/wp-json\/wp\/v2\/media?parent=147"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.deartester.com\/index.php\/wp-json\/wp\/v2\/categories?post=147"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.deartester.com\/index.php\/wp-json\/wp\/v2\/tags?post=147"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}