{"id":142,"date":"2013-07-21T10:50:38","date_gmt":"2013-07-21T08:50:38","guid":{"rendered":"http:\/\/tech.bpeeters.nl\/?p=142"},"modified":"2013-07-21T10:52:42","modified_gmt":"2013-07-21T08:52:42","slug":"difference-between-unit-testing-and-component-level-testing","status":"publish","type":"post","link":"https:\/\/brunopeeters.com\/blog\/difference-between-unit-testing-and-component-level-testing\/","title":{"rendered":"Difference between unit testing and component level testing"},"content":{"rendered":"<p>There are different levels of testing a programmer can do, the must read <a title=\"Code Complete 2nd edition\" href=\"http:\/\/cc2e.com\/\" target=\"_blank\">Code Complete<\/a> differs the following types of tests: unit testing, component testing, integration testing, regression testing and system testing. The terms unit testing and component testing are quite confusing to most people.<\/p>\n<p>Within <strong>unit testing<\/strong> you use <a title=\"The difference between mocks and stubs\" href=\"http:\/\/tech.bpeeters.nl\/the-difference-between-mocks-and-stubs\/\" target=\"_blank\">stubs and mocks<\/a> to test directly your code. The code is tested in isolation. Typical things you want to stub are hardware, networks or databases.<\/p>\n<p><strong>Component level<\/strong> <strong>testing<\/strong> is situated at a higher level. You remove the stubs and mocks and test your code against the real thing. So you remove the stubbed hardware interface and put a real device to the test.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>There are different levels of testing a programmer can do, the must read Code Complete differs the following types of tests: unit testing, component testing, integration testing, regression testing and system testing. The terms unit testing and component testing are quite confusing to most people. Within unit testing you use stubs and mocks to test [&hellip;]<\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_jetpack_newsletter_access":"","_jetpack_dont_email_post_to_subs":false,"_jetpack_newsletter_tier_id":0,"_jetpack_memberships_contains_paywalled_content":false,"_jetpack_memberships_contains_paid_content":false,"footnotes":"","jetpack_publicize_message":"","jetpack_publicize_feature_enabled":true,"jetpack_social_post_already_shared":true,"jetpack_social_options":{"image_generator_settings":{"template":"highway","default_image_id":0,"font":"","enabled":false},"version":2},"jetpack_post_was_ever_published":false},"categories":[12],"tags":[14,13],"class_list":["post-142","post","type-post","status-publish","format-standard","hentry","category-tdd","tag-component-level-testing","tag-unit-testing-2"],"jetpack_publicize_connections":[],"jetpack_featured_media_url":"","jetpack_sharing_enabled":true,"jetpack_shortlink":"https:\/\/wp.me\/p2VFWh-2i","_links":{"self":[{"href":"https:\/\/brunopeeters.com\/blog\/wp-json\/wp\/v2\/posts\/142","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/brunopeeters.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/brunopeeters.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/brunopeeters.com\/blog\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/brunopeeters.com\/blog\/wp-json\/wp\/v2\/comments?post=142"}],"version-history":[{"count":3,"href":"https:\/\/brunopeeters.com\/blog\/wp-json\/wp\/v2\/posts\/142\/revisions"}],"predecessor-version":[{"id":147,"href":"https:\/\/brunopeeters.com\/blog\/wp-json\/wp\/v2\/posts\/142\/revisions\/147"}],"wp:attachment":[{"href":"https:\/\/brunopeeters.com\/blog\/wp-json\/wp\/v2\/media?parent=142"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/brunopeeters.com\/blog\/wp-json\/wp\/v2\/categories?post=142"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/brunopeeters.com\/blog\/wp-json\/wp\/v2\/tags?post=142"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}