{"id":58687,"date":"2023-10-18T06:29:16","date_gmt":"2023-10-17T22:29:16","guid":{"rendered":"https:\/\/www.techphant.cn\/blog\/58687.html"},"modified":"2023-10-18T06:29:16","modified_gmt":"2023-10-17T22:29:16","slug":"tssmwl","status":"publish","type":"post","link":"https:\/\/www.techphant.cn\/blog\/58687.html","title":{"rendered":"TDD\u662f\u4ec0\u4e48\u7f51\u7edc"},"content":{"rendered":"

  TDD\u662fTest Driven Development\u7684\u7f29\u5199\uff0c\u5b83\u662f\u4e00\u79cd\u8f6f\u4ef6\u5f00\u53d1\u6a21\u5f0f\uff0c\u5176\u4e2d\u5f00\u53d1\u8005\u5728\u7f16\u5199\u4ee3\u7801\u4e4b\u524d\uff0c\u5148\u5199\u597d\u6d4b\u8bd5\u7528\u4f8b\uff0c\u7136\u540e\u6839\u636e\u6d4b\u8bd5\u7528\u4f8b\u7f16\u5199\u4ee3\u7801\uff0c\u6700\u540e\u518d\u8fd0\u884c\u6d4b\u8bd5\u7528\u4f8b\uff0c\u4ee5\u786e\u4fdd\u4ee3\u7801\u7684\u6b63\u786e\u6027\u3002TDD\u7684\u76ee\u7684\u662f\u901a\u8fc7\u7f16\u5199\u6d4b\u8bd5\u7528\u4f8b\uff0c\u66f4\u597d\u5730\u6355\u6349\u7a0b\u5e8f\u4e2d\u7684\u9519\u8bef\u548c\u7f3a\u9677\uff0c\u4ece\u800c\u63d0\u9ad8\u8f6f\u4ef6\u8d28\u91cf\u3002<\/p>\n

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

  \u5b9a\u4e49\u529f\u80fd\u7684\u6700\u4f73\u5b9e\u8df5<\/h3>\n

  TDD\u662f\u4e00\u79cd\u6700\u4f73\u5b9e\u8df5\uff0c\u53ef\u4ee5\u5e2e\u52a9\u5f00\u53d1\u8005\u66f4\u597d\u5730\u5b9a\u4e49\u529f\u80fd\uff0c\u66f4\u597d\u5730\u7406\u89e3\u529f\u80fd\u7684\u5b9e\u73b0\uff0c\u4ee5\u53ca\u66f4\u597d\u5730\u7f16\u5199\u4ee3\u7801\u3002TDD\u7684\u6d4b\u8bd5\u7528\u4f8b\u53ef\u4ee5\u4f5c\u4e3a\u6587\u6863\uff0c\u8ba9\u5f00\u53d1\u8005\u66f4\u597d\u5730\u4e86\u89e3\u9700\u6c42\uff0c\u4ece\u800c\u66f4\u597d\u5730\u7f16\u5199\u4ee3\u7801\u3002<\/p>\n

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

  TDD\u53ef\u4ee5\u5e2e\u52a9\u5f00\u53d1\u8005\u66f4\u597d\u5730\u6355\u6349\u7a0b\u5e8f\u4e2d\u7684\u9519\u8bef\u548c\u7f3a\u9677\uff0c\u4ece\u800c\u63d0\u9ad8\u4ee3\u7801\u8d28\u91cf\u3002\u5728TDD\u7684\u5f00\u53d1\u6a21\u5f0f\u4e0b\uff0c\u5f00\u53d1\u8005\u53ef\u4ee5\u5728\u7f16\u5199\u4ee3\u7801\u4e4b\u524d\uff0c\u5148\u5199\u597d\u6d4b\u8bd5\u7528\u4f8b\uff0c\u7136\u540e\u6839\u636e\u6d4b\u8bd5\u7528\u4f8b\u7f16\u5199\u4ee3\u7801\uff0c\u6700\u540e\u518d\u8fd0\u884c\u6d4b\u8bd5\u7528\u4f8b\uff0c\u4ee5\u786e\u4fdd\u4ee3\u7801\u7684\u6b63\u786e\u6027\u3002<\/p>\n

  \u63d0\u9ad8\u5f00\u53d1\u6548\u7387<\/h3>\n

  TDD\u53ef\u4ee5\u63d0\u9ad8\u5f00\u53d1\u8005\u7684\u5f00\u53d1\u6548\u7387\uff0c\u56e0\u4e3a\u5f00\u53d1\u8005\u53ef\u4ee5\u5728\u7f16\u5199\u4ee3\u7801\u4e4b\u524d\uff0c\u5148\u5199\u597d\u6d4b\u8bd5\u7528\u4f8b\uff0c\u7136\u540e\u6839\u636e\u6d4b\u8bd5\u7528\u4f8b\u7f16\u5199\u4ee3\u7801\uff0c\u6700\u540e\u518d\u8fd0\u884c\u6d4b\u8bd5\u7528\u4f8b\uff0c\u4ee5\u786e\u4fdd\u4ee3\u7801\u7684\u6b63\u786e\u6027\u3002\u8fd9\u6837\u53ef\u4ee5\u907f\u514d\u5f00\u53d1\u8005\u7f16\u5199\u9519\u8bef\u7684\u4ee3\u7801\uff0c\u4ece\u800c\u63d0\u9ad8\u5f00\u53d1\u6548\u7387\u3002<\/p>\n

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

  \u6d4b\u8bd5\u7528\u4f8b\u7f16\u5199\u56f0\u96be<\/h3>\n

  TDD\u7684\u6d4b\u8bd5\u7528\u4f8b\u7f16\u5199\u56f0\u96be\uff0c\u56e0\u4e3a\u6d4b\u8bd5\u7528\u4f8b\u9700\u8981\u6db5\u76d6\u6240\u6709\u53ef\u80fd\u7684\u8f93\u5165\u548c\u8f93\u51fa\uff0c\u5982\u679c\u6d4b\u8bd5\u7528\u4f8b\u7f16\u5199\u4e0d\u5f53\uff0c\u53ef\u80fd\u4f1a\u5bfc\u81f4\u7a0b\u5e8f\u51fa\u73b0\u9519\u8bef\u548c\u7f3a\u9677\u3002<\/p>\n

  \u5f00\u53d1\u6210\u672c\u9ad8<\/h3>\n

  TDD\u7684\u5f00\u53d1\u6210\u672c\u9ad8\uff0c\u56e0\u4e3a\u5f00\u53d1\u8005\u9700\u8981\u5148\u7f16\u5199\u6d4b\u8bd5\u7528\u4f8b\uff0c\u7136\u540e\u6839\u636e\u6d4b\u8bd5\u7528\u4f8b\u7f16\u5199\u4ee3\u7801\uff0c\u6700\u540e\u518d\u8fd0\u884c\u6d4b\u8bd5\u7528\u4f8b\uff0c\u4ee5\u786e\u4fdd\u4ee3\u7801\u7684\u6b63\u786e\u6027\uff0c\u8fd9\u9700\u8981\u66f4\u591a\u7684\u65f6\u95f4\u548c\u7cbe\u529b\u3002<\/p>\n

\u603b\u7ed3<\/h2>\n

  TDD\u662f\u4e00\u79cd\u8f6f\u4ef6\u5f00\u53d1\u6a21\u5f0f\uff0c\u5176\u4f18\u70b9\u662f\u53ef\u4ee5\u5e2e\u52a9\u5f00\u53d1\u8005\u66f4\u597d\u5730\u5b9a\u4e49\u529f\u80fd\uff0c\u66f4\u597d\u5730\u7406\u89e3\u529f\u80fd\u7684\u5b9e\u73b0\uff0c\u4ee5\u53ca\u66f4\u597d\u5730\u7f16\u5199\u4ee3\u7801\uff0c\u540c\u65f6\u53ef\u4ee5\u63d0\u9ad8\u4ee3\u7801\u8d28\u91cf\u548c\u5f00\u53d1\u6548\u7387\u3002<\/strong>\u4f46TDD\u4e5f\u6709\u7f3a\u70b9\uff0c\u6d4b\u8bd5\u7528\u4f8b\u7f16\u5199\u56f0\u96be\uff0c\u800c\u4e14\u5f00\u53d1\u6210\u672c\u9ad8\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"

TDD\u662fTestDrivenDevelopment\u7684\u7f29\u5199\uff0c\u5b83\u662f\u4e00\u79cd\u8f6f\u4ef6\u5f00\u53d1\u6a21\u5f0f\uff0c\u5176\u4e2d\u5f00\u53d1\u8005\u5728\u7f16\u5199\u4ee3\u7801\u4e4b\u524d\uff0c\u5148\u5199\u597d\u6d4b\u8bd5\u7528\u4f8b\uff0c\u7136\u540e\u6839\u636e\u6d4b\u8bd5\u7528\u4f8b\u7f16\u5199\u4ee3\u7801\uff0c\u6700\u540e\u518d\u8fd0\u884c\u6d4b\u8bd5\u7528\u4f8b<\/p>\n","protected":false},"author":1,"featured_media":4132,"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-58687","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\/58687","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=58687"}],"version-history":[{"count":0,"href":"https:\/\/www.techphant.cn\/wp-json\/wp\/v2\/posts\/58687\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.techphant.cn\/wp-json\/wp\/v2\/media\/4132"}],"wp:attachment":[{"href":"https:\/\/www.techphant.cn\/wp-json\/wp\/v2\/media?parent=58687"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.techphant.cn\/wp-json\/wp\/v2\/categories?post=58687"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.techphant.cn\/wp-json\/wp\/v2\/tags?post=58687"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}