{"id":247,"date":"2026-03-02T17:12:28","date_gmt":"2026-03-02T17:12:28","guid":{"rendered":"https:\/\/sites.nd.edu\/softwaretesting\/?page_id=247"},"modified":"2026-03-03T21:11:56","modified_gmt":"2026-03-03T21:11:56","slug":"white-box-testing","status":"publish","type":"page","link":"https:\/\/sites.nd.edu\/softwaretesting\/testing-techniques\/white-box-testing\/","title":{"rendered":"White Box Testing"},"content":{"rendered":"\n<figure class=\"wp-block-image size-full\"><img loading=\"lazy\" decoding=\"async\" width=\"834\" height=\"168\" src=\"https:\/\/sites.nd.edu\/softwaretesting\/files\/2026\/03\/White-Box-1.jpg\" alt=\"\" class=\"wp-image-433\" srcset=\"https:\/\/sites.nd.edu\/softwaretesting\/files\/2026\/03\/White-Box-1.jpg 834w, https:\/\/sites.nd.edu\/softwaretesting\/files\/2026\/03\/White-Box-1-300x60.jpg 300w, https:\/\/sites.nd.edu\/softwaretesting\/files\/2026\/03\/White-Box-1-768x155.jpg 768w\" sizes=\"auto, (max-width: 834px) 100vw, 834px\" \/><\/figure>\n\n\n\n<p>These techniques are used to make sure all parts of the code are exercised.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\">Common White Box Techniques<\/h3>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong>Statement Testing<\/strong><br>Ensures every line of code runs at least once.<\/li>\n\n\n\n<li><strong>Branch Testing<\/strong><br>Ensures every \u201cif\/else\u201d decision is tested.<\/li>\n\n\n\n<li><strong>Path Testing<\/strong><br>Ensures all possible paths through the code are tested.<\/li>\n\n\n\n<li><strong>Condition Testing<\/strong><br>Tests how the program behaves when conditions evaluate to true or false.<\/li>\n\n\n\n<li><strong>Expression Testing<\/strong><br>Tests how regular expressions behave with different inputs.<\/li>\n<\/ul>\n\n\n\n<h3 class=\"wp-block-heading\">Error-Based Testing (Finding Known Weak Spots)<\/h3>\n\n\n\n<p>These techniques focus on areas where defects are <strong>most likely to occur<\/strong>.<\/p>\n\n\n\n<p>Examples include:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong>Fault Seeding<\/strong><br>Intentionally adding known defects to confirm tests can detect them.<\/li>\n\n\n\n<li><strong>Mutation Testing<\/strong><br>Making small changes to the code to see if tests catch the errors<br>(Effective but time-consuming and expensive.)<\/li>\n\n\n\n<li><strong>Using Historical Test Data<\/strong><br>Prioritizing tests that failed often in the past.<\/li>\n<\/ul>\n","protected":false},"excerpt":{"rendered":"<p>These techniques are used to make sure all parts of the code are exercised. Common White Box Techniques Error-Based Testing (Finding Known Weak Spots) These techniques focus on areas where defects are most likely to occur. Examples include:<\/p>\n","protected":false},"author":4975,"featured_media":0,"parent":226,"menu_order":0,"comment_status":"closed","ping_status":"closed","template":"","meta":{"footnotes":""},"class_list":["post-247","page","type-page","status-publish","hentry"],"_links":{"self":[{"href":"https:\/\/sites.nd.edu\/softwaretesting\/wp-json\/wp\/v2\/pages\/247","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/sites.nd.edu\/softwaretesting\/wp-json\/wp\/v2\/pages"}],"about":[{"href":"https:\/\/sites.nd.edu\/softwaretesting\/wp-json\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"https:\/\/sites.nd.edu\/softwaretesting\/wp-json\/wp\/v2\/users\/4975"}],"replies":[{"embeddable":true,"href":"https:\/\/sites.nd.edu\/softwaretesting\/wp-json\/wp\/v2\/comments?post=247"}],"version-history":[{"count":6,"href":"https:\/\/sites.nd.edu\/softwaretesting\/wp-json\/wp\/v2\/pages\/247\/revisions"}],"predecessor-version":[{"id":434,"href":"https:\/\/sites.nd.edu\/softwaretesting\/wp-json\/wp\/v2\/pages\/247\/revisions\/434"}],"up":[{"embeddable":true,"href":"https:\/\/sites.nd.edu\/softwaretesting\/wp-json\/wp\/v2\/pages\/226"}],"wp:attachment":[{"href":"https:\/\/sites.nd.edu\/softwaretesting\/wp-json\/wp\/v2\/media?parent=247"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}