{"id":63563,"date":"2023-10-28T03:35:30","date_gmt":"2023-10-27T19:35:30","guid":{"rendered":"https:\/\/www.techphant.cn\/?p=63563"},"modified":"2023-10-28T03:35:30","modified_gmt":"2023-10-27T19:35:30","slug":"tsdldhc","status":"publish","type":"post","link":"https:\/\/www.techphant.cn\/blog\/63563.html","title":{"rendered":"TDD\u4e09\u5b9a\u5f8b\u7684\u597d\u5904"},"content":{"rendered":"
Test-driven development\uff08TDD\uff09\u662f\u4e00\u79cd\u7f16\u7a0b\u5b9e\u8df5\uff0c\u5b83\u8981\u6c42\u5728\u7f16\u5199\u5b9e\u9645\u4ee3\u7801\u4e4b\u524d\uff0c\u5148\u7f16\u5199\u6d4b\u8bd5\u7528\u4f8b\uff0c\u4ee5\u786e\u4fdd\u4ee3\u7801\u7684\u6b63\u786e\u6027\u3002TDD\u7684\u4e09\u5b9a\u5f8b\u662f\uff1a\u7f16\u5199\u6d4b\u8bd5\u7528\u4f8b\uff0c\u8fd0\u884c\u6d4b\u8bd5\u7528\u4f8b\uff0c\u7f16\u5199\u6b63\u786e\u7684\u4ee3\u7801\u3002\u672c\u6587\u5c06\u4ecb\u7ecdTDD\u4e09\u5b9a\u5f8b\u7684\u597d\u5904\uff0c\u4ee5\u4fbf\u66f4\u597d\u5730\u7406\u89e3TDD\u7684\u91cd\u8981\u6027\u3002<\/p>\n
TDD\u4e09\u5b9a\u5f8b\u53ef\u4ee5\u5e2e\u52a9\u7a0b\u5e8f\u5458\u66f4\u9ad8\u6548\u5730\u7f16\u5199\u4ee3\u7801\u3002\u4e0e\u4f20\u7edf\u7684\u7f16\u7a0b\u65b9\u6cd5\u76f8\u6bd4\uff0cTDD\u4e09\u5b9a\u5f8b\u53ef\u4ee5\u8282\u7701\u7a0b\u5e8f\u5458\u5927\u91cf\u7684\u65f6\u95f4\u548c\u7cbe\u529b\uff0c\u4ece\u800c\u63d0\u9ad8\u7f16\u7a0b\u6548\u7387\u3002<\/p>\n
TDD\u4e09\u5b9a\u5f8b\u8981\u6c42\u7a0b\u5e8f\u5458\u5148\u7f16\u5199\u6d4b\u8bd5\u7528\u4f8b\uff0c\u7136\u540e\u8fd0\u884c\u6d4b\u8bd5\u7528\u4f8b\uff0c\u6700\u540e\u7f16\u5199\u6b63\u786e\u7684\u4ee3\u7801\u3002\u8fd9\u79cd\u65b9\u5f0f\u53ef\u4ee5\u6709\u6548\u5730\u51cf\u5c11\u7a0b\u5e8f\u5458\u7f16\u5199\u4ee3\u7801\u65f6\u7684\u9519\u8bef\uff0c\u5e76\u4e14\u53ef\u4ee5\u66f4\u5feb\u5730\u53d1\u73b0\u548c\u4fee\u590d\u9519\u8bef\uff0c\u4ece\u800c\u63d0\u9ad8\u7f16\u7a0b\u6548\u7387\u3002<\/p>\n
TDD\u4e09\u5b9a\u5f8b\u53ef\u4ee5\u5e2e\u52a9\u7a0b\u5e8f\u5458\u7f16\u5199\u51fa\u66f4\u9ad8\u8d28\u91cf\u7684\u4ee3\u7801\u3002TDD\u4e09\u5b9a\u5f8b\u8981\u6c42\u7a0b\u5e8f\u5458\u5148\u7f16\u5199\u6d4b\u8bd5\u7528\u4f8b\uff0c\u7136\u540e\u8fd0\u884c\u6d4b\u8bd5\u7528\u4f8b\uff0c\u6700\u540e\u7f16\u5199\u6b63\u786e\u7684\u4ee3\u7801\u3002\u8fd9\u79cd\u65b9\u5f0f\u53ef\u4ee5\u6709\u6548\u5730\u51cf\u5c11\u7a0b\u5e8f\u5458\u7f16\u5199\u4ee3\u7801\u65f6\u7684\u9519\u8bef\uff0c\u5e76\u4e14\u53ef\u4ee5\u66f4\u5feb\u5730\u53d1\u73b0\u548c\u4fee\u590d\u9519\u8bef\uff0c\u4ece\u800c\u63d0\u9ad8\u4ee3\u7801\u8d28\u91cf\u3002<\/p>\n
\u6b64\u5916\uff0cTDD\u4e09\u5b9a\u5f8b\u8fd8\u53ef\u4ee5\u63d0\u9ad8\u4ee3\u7801\u7684\u53ef\u7ef4\u62a4\u6027\u548c\u53ef\u6269\u5c55\u6027\uff0c\u56e0\u4e3aTDD\u4e09\u5b9a\u5f8b\u8981\u6c42\u7a0b\u5e8f\u5458\u5728\u7f16\u5199\u4ee3\u7801\u4e4b\u524d\u5148\u7f16\u5199\u6d4b\u8bd5\u7528\u4f8b\uff0c\u8fd9\u6837\u53ef\u4ee5\u907f\u514d\u7a0b\u5e8f\u5458\u5728\u7f16\u5199\u4ee3\u7801\u65f6\u51fa\u73b0\u95ee\u9898\uff0c\u4ece\u800c\u66f4\u597d\u5730\u4fdd\u8bc1\u4ee3\u7801\u7684\u53ef\u7ef4\u62a4\u6027\u548c\u53ef\u6269\u5c55\u6027\u3002<\/p>\n
TDD\u4e09\u5b9a\u5f8b\u662f\u4e00\u79cd\u7f16\u7a0b\u5b9e\u8df5\uff0c\u5b83\u8981\u6c42\u7a0b\u5e8f\u5458\u5148\u7f16\u5199\u6d4b\u8bd5\u7528\u4f8b\uff0c\u7136\u540e\u8fd0\u884c\u6d4b\u8bd5\u7528\u4f8b\uff0c\u6700\u540e\u7f16\u5199\u6b63\u786e\u7684\u4ee3\u7801\u3002<\/strong>TDD\u4e09\u5b9a\u5f8b\u53ef\u4ee5\u5e2e\u52a9\u7a0b\u5e8f\u5458\u66f4\u9ad8\u6548\u5730\u7f16\u5199\u4ee3\u7801\uff0c\u5e76\u4e14\u53ef\u4ee5\u63d0\u9ad8\u4ee3\u7801\u7684\u8d28\u91cf\u548c\u53ef\u7ef4\u62a4\u6027\u3002\u56e0\u6b64\uff0cTDD\u4e09\u5b9a\u5f8b\u662f\u4e00\u79cd\u975e\u5e38\u6709\u7528\u7684\u7f16\u7a0b\u5b9e\u8df5\uff0c\u503c\u5f97\u7a0b\u5e8f\u5458\u7814\u7a76\u548c\u4f7f\u7528\u3002<\/p>\n","protected":false},"excerpt":{"rendered":" Test-drivendevelopment\uff08TDD\uff09\u662f\u4e00\u79cd\u7f16\u7a0b\u5b9e\u8df5\uff0c\u5b83\u8981\u6c42\u5728\u7f16\u5199\u5b9e\u9645\u4ee3\u7801\u4e4b\u524d\uff0c\u5148\u7f16\u5199\u6d4b\u8bd5\u7528\u4f8b\uff0c\u4ee5\u786e\u4fdd\u4ee3\u7801\u7684\u6b63\u786e\u6027\u3002TDD\u7684\u4e09\u5b9a\u5f8b\u662f\uff1a\u7f16\u5199\u6d4b\u8bd5\u7528\u4f8b\uff0c\u8fd0\u884c<\/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-63563","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\/63563","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=63563"}],"version-history":[{"count":0,"href":"https:\/\/www.techphant.cn\/wp-json\/wp\/v2\/posts\/63563\/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=63563"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.techphant.cn\/wp-json\/wp\/v2\/categories?post=63563"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.techphant.cn\/wp-json\/wp\/v2\/tags?post=63563"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}