{"id":60091,"date":"2023-10-29T19:27:48","date_gmt":"2023-10-29T11:27:48","guid":{"rendered":"https:\/\/www.techphant.cn\/?p=60091"},"modified":"2023-10-29T19:27:48","modified_gmt":"2023-10-29T11:27:48","slug":"tdzyx","status":"publish","type":"post","link":"https:\/\/www.techphant.cn\/blog\/60091.html","title":{"rendered":"TDD\u7684\u91cd\u8981\u6027"},"content":{"rendered":"

  TDD\uff08\u6d4b\u8bd5\u9a71\u52a8\u5f00\u53d1\uff09\u662f\u4e00\u79cd\u8f6f\u4ef6\u5f00\u53d1\u65b9\u6cd5\uff0c\u5b83\u662f\u4e00\u79cd\u4ee5\u6d4b\u8bd5\u4e3a\u9a71\u52a8\u7684\u8f6f\u4ef6\u5f00\u53d1\u8fc7\u7a0b\u3002\u5b83\u7684\u6838\u5fc3\u601d\u60f3\u662f\u5148\u5199\u6d4b\u8bd5\u7528\u4f8b\uff0c\u7136\u540e\u518d\u7f16\u5199\u4ee3\u7801\uff0c\u6700\u540e\u8fd0\u884c\u6d4b\u8bd5\u7528\u4f8b\uff0c\u4ee5\u786e\u4fdd\u4ee3\u7801\u7684\u6b63\u786e\u6027\u3002TDD\u662f\u4e00\u79cd\u81ea\u52a8\u6d4b\u8bd5\u6280\u672f\uff0c\u53ef\u4ee5\u5e2e\u52a9\u5f00\u53d1\u8005\u66f4\u597d\u5730\u4e86\u89e3\u8f6f\u4ef6\u7684\u529f\u80fd\uff0c\u51cf\u5c11\u8c03\u8bd5\u65f6\u95f4\uff0c\u63d0\u9ad8\u7a0b\u5e8f\u8d28\u91cf\uff0c\u5e76\u51cf\u5c11\u7f3a\u9677\u7684\u53d1\u73b0\u548c\u4fee\u590d\u65f6\u95f4\u3002<\/p>\n

TDD\u7684\u4f18\u70b9<\/h2>\n

  1.\u63d0\u9ad8\u4ee3\u7801\u8d28\u91cf<\/h3>\n

  TDD\u53ef\u4ee5\u5e2e\u52a9\u5f00\u53d1\u8005\u53ca\u65f6\u53d1\u73b0\u7a0b\u5e8f\u7684\u95ee\u9898\uff0c\u4f7f\u4ee3\u7801\u66f4\u52a0\u5065\u58ee\uff0c\u66f4\u6613\u4e8e\u7ef4\u62a4\u548c\u7ba1\u7406\uff0c\u4ece\u800c\u63d0\u9ad8\u4ee3\u7801\u8d28\u91cf\u3002<\/p>\n

  2.\u51cf\u5c11\u7f3a\u9677<\/h3>\n

  TDD\u53ef\u4ee5\u5728\u8f6f\u4ef6\u5f00\u53d1\u8fc7\u7a0b\u4e2d\u53ca\u65f6\u53d1\u73b0\u7a0b\u5e8f\u7684\u7f3a\u9677\uff0c\u4ece\u800c\u66f4\u6709\u6548\u5730\u7ba1\u7406\u7f3a\u9677\uff0c\u964d\u4f4e\u7f3a\u9677\u7684\u53d1\u751f\u7387\u3002<\/p>\n

  3.\u6539\u8fdb\u4ee3\u7801\u8bbe\u8ba1<\/h3>\n

  TDD\u53ef\u4ee5\u5e2e\u52a9\u5f00\u53d1\u8005\u53ca\u65f6\u53d1\u73b0\u4ee3\u7801\u8bbe\u8ba1\u7684\u95ee\u9898\uff0c\u4ece\u800c\u66f4\u6709\u6548\u5730\u6539\u8fdb\u4ee3\u7801\u8bbe\u8ba1\uff0c\u63d0\u9ad8\u5f00\u53d1\u6548\u7387\u3002<\/p>\n

  4.\u63d0\u9ad8\u56e2\u961f\u534f\u4f5c\u6548\u7387<\/h3>\n

  TDD\u53ef\u4ee5\u5e2e\u52a9\u5f00\u53d1\u8005\u53ca\u65f6\u53d1\u73b0\u7a0b\u5e8f\u7684\u95ee\u9898\uff0c\u4ece\u800c\u66f4\u6709\u6548\u5730\u6539\u8fdb\u4ee3\u7801\u8bbe\u8ba1\uff0c\u63d0\u9ad8\u56e2\u961f\u534f\u4f5c\u6548\u7387\u3002<\/p>\n

TDD\u7684\u7f3a\u70b9<\/h2>\n

  1.\u589e\u52a0\u5f00\u53d1\u65f6\u95f4<\/h3>\n

  TDD\u9700\u8981\u5f00\u53d1\u8005\u5728\u7f16\u5199\u5b8c\u4ee3\u7801\u524d\u5148\u7f16\u5199\u6d4b\u8bd5\u7528\u4f8b\uff0c\u8fd9\u4f1a\u589e\u52a0\u5f00\u53d1\u65f6\u95f4\u3002<\/p>\n

  2.\u589e\u52a0\u5f00\u53d1\u6210\u672c<\/h3>\n

  TDD\u9700\u8981\u5f00\u53d1\u8005\u5148\u7f16\u5199\u6d4b\u8bd5\u7528\u4f8b\uff0c\u8fd9\u4f1a\u589e\u52a0\u5f00\u53d1\u6210\u672c\u3002<\/p>\n

  3.\u9700\u8981\u989d\u5916\u7684\u719f\u7ec3\u6280\u80fd<\/h3>\n

  TDD\u9700\u8981\u5f00\u53d1\u8005\u638c\u63e1\u989d\u5916\u7684\u719f\u7ec3\u6280\u80fd\uff0c\u624d\u80fd\u66f4\u597d\u5730\u5b9e\u65bdTDD\u3002<\/p>\n

\u603b\u7ed3<\/h2>\n

  TDD\u662f\u4e00\u79cd\u8f6f\u4ef6\u5f00\u53d1\u65b9\u6cd5\uff0c\u5b83\u7684\u6838\u5fc3\u601d\u60f3\u662f\u5148\u5199\u6d4b\u8bd5\u7528\u4f8b\uff0c\u7136\u540e\u518d\u7f16\u5199\u4ee3\u7801\uff0c\u6700\u540e\u8fd0\u884c\u6d4b\u8bd5\u7528\u4f8b\uff0c\u4ee5\u786e\u4fdd\u4ee3\u7801\u7684\u6b63\u786e\u6027\u3002<\/strong>TDD\u53ef\u4ee5\u63d0\u9ad8\u4ee3\u7801\u8d28\u91cf\uff0c\u51cf\u5c11\u7f3a\u9677\u7684\u53d1\u73b0\u548c\u4fee\u590d\u65f6\u95f4\uff0c\u6539\u8fdb\u4ee3\u7801\u8bbe\u8ba1\uff0c\u63d0\u9ad8\u56e2\u961f\u534f\u4f5c\u6548\u7387\uff0c\u4f46\u662f\u5b83\u4e5f\u6709\u4e00\u5b9a\u7684\u7f3a\u70b9\uff0c\u6bd4\u5982\u589e\u52a0\u5f00\u53d1\u65f6\u95f4\u548c\u6210\u672c\uff0c\u9700\u8981\u989d\u5916\u7684\u719f\u7ec3\u6280\u80fd\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"

TDD\uff08\u6d4b\u8bd5\u9a71\u52a8\u5f00\u53d1\uff09\u662f\u4e00\u79cd\u8f6f\u4ef6\u5f00\u53d1\u65b9\u6cd5\uff0c\u5b83\u662f\u4e00\u79cd\u4ee5\u6d4b\u8bd5\u4e3a\u9a71\u52a8\u7684\u8f6f\u4ef6\u5f00\u53d1\u8fc7\u7a0b\u3002\u5b83\u7684\u6838\u5fc3\u601d\u60f3\u662f\u5148\u5199\u6d4b\u8bd5\u7528\u4f8b\uff0c\u7136\u540e\u518d\u7f16\u5199\u4ee3\u7801\uff0c\u6700\u540e\u8fd0\u884c\u6d4b\u8bd5\u7528\u4f8b\uff0c\u4ee5\u786e\u4fdd\u4ee3\u7801\u7684\u6b63\u786e\u6027\u3002TDD\u662f\u4e00<\/p>\n","protected":false},"author":1,"featured_media":1839,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"site-sidebar-layout":"default","site-content-layout":"default","ast-global-header-display":"","ast-main-header-display":"","ast-hfb-above-header-display":"","ast-hfb-below-header-display":"","ast-hfb-mobile-header-display":"","site-post-title":"","ast-breadcrumbs-content":"","ast-featured-img":"","footer-sml-layout":"","theme-transparent-header-meta":"","adv-header-id-meta":"","stick-header-meta":"","header-above-stick-meta":"","header-main-stick-meta":"","header-below-stick-meta":"","footnotes":""},"categories":[36],"tags":[305],"class_list":["post-60091","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-blog","tag-dzjs"],"_links":{"self":[{"href":"https:\/\/www.techphant.cn\/wp-json\/wp\/v2\/posts\/60091","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.techphant.cn\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.techphant.cn\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.techphant.cn\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.techphant.cn\/wp-json\/wp\/v2\/comments?post=60091"}],"version-history":[{"count":0,"href":"https:\/\/www.techphant.cn\/wp-json\/wp\/v2\/posts\/60091\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.techphant.cn\/wp-json\/wp\/v2\/media\/1839"}],"wp:attachment":[{"href":"https:\/\/www.techphant.cn\/wp-json\/wp\/v2\/media?parent=60091"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.techphant.cn\/wp-json\/wp\/v2\/categories?post=60091"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.techphant.cn\/wp-json\/wp\/v2\/tags?post=60091"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}