{"id":146,"date":"2024-07-30T06:50:30","date_gmt":"2024-07-30T06:50:30","guid":{"rendered":"https:\/\/libraryresources.nse.org.ng\/computersciencetwo\/chapter\/chapter-1-principles-of-testing\/"},"modified":"2026-03-16T14:30:18","modified_gmt":"2026-03-16T14:30:18","slug":"chapter-1-principles-of-testing","status":"publish","type":"chapter","link":"https:\/\/libraryresources.nse.org.ng\/computersciencetwo\/chapter\/chapter-1-principles-of-testing\/","title":{"raw":"Chapter 1: Principles of Testing","rendered":"Chapter 1: Principles of Testing"},"content":{"raw":"<div class=\"chapter-1:-principles-of-testing\">\n<div class=\"textbox textbox--learning-objectives\"><header class=\"textbox__header\">\n<p class=\"textbox__title\">Learning Objectives<\/p>\n\n<\/header>\n<div class=\"textbox__content\">\n\nBy the end of this chapter, you should be able to\n<ul>\n \t<li>Understand when you need to write tests and when you don't\nIdentify methods that have side effects and how that impacts testability<\/li>\n \t<li>Understand how to write a testable method.<\/li>\n \t<li>Establish the practice\/habit of understanding expectations\/requirements of all units of code BEFORE writing that code.<\/li>\n \t<li>Recognize value of regular periodic testing to avoid accumulating bug debt.<\/li>\n \t<li>Apply test driven development and debugging in development of data structures<\/li>\n<\/ul>\n<\/div>\n<\/div>\n<\/div>","rendered":"<div class=\"chapter-1:-principles-of-testing\">\n<div class=\"textbox textbox--learning-objectives\">\n<header class=\"textbox__header\">\n<p class=\"textbox__title\">Learning Objectives<\/p>\n<\/header>\n<div class=\"textbox__content\">\n<p>By the end of this chapter, you should be able to<\/p>\n<ul>\n<li>Understand when you need to write tests and when you don&#8217;t<br \/>\nIdentify methods that have side effects and how that impacts testability<\/li>\n<li>Understand how to write a testable method.<\/li>\n<li>Establish the practice\/habit of understanding expectations\/requirements of all units of code BEFORE writing that code.<\/li>\n<li>Recognize value of regular periodic testing to avoid accumulating bug debt.<\/li>\n<li>Apply test driven development and debugging in development of data structures<\/li>\n<\/ul>\n<\/div>\n<\/div>\n<\/div>\n","protected":false},"author":1,"menu_order":1,"template":"","meta":{"pb_show_title":"","pb_short_title":"","pb_subtitle":"","pb_authors":[],"pb_section_license":""},"chapter-type":[49],"contributor":[],"license":[],"class_list":["post-146","chapter","type-chapter","status-publish","hentry","chapter-type-numberless"],"part":145,"_links":{"self":[{"href":"https:\/\/libraryresources.nse.org.ng\/computersciencetwo\/wp-json\/pressbooks\/v2\/chapters\/146","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/libraryresources.nse.org.ng\/computersciencetwo\/wp-json\/pressbooks\/v2\/chapters"}],"about":[{"href":"https:\/\/libraryresources.nse.org.ng\/computersciencetwo\/wp-json\/wp\/v2\/types\/chapter"}],"author":[{"embeddable":true,"href":"https:\/\/libraryresources.nse.org.ng\/computersciencetwo\/wp-json\/wp\/v2\/users\/1"}],"version-history":[{"count":1,"href":"https:\/\/libraryresources.nse.org.ng\/computersciencetwo\/wp-json\/pressbooks\/v2\/chapters\/146\/revisions"}],"predecessor-version":[{"id":147,"href":"https:\/\/libraryresources.nse.org.ng\/computersciencetwo\/wp-json\/pressbooks\/v2\/chapters\/146\/revisions\/147"}],"part":[{"href":"https:\/\/libraryresources.nse.org.ng\/computersciencetwo\/wp-json\/pressbooks\/v2\/parts\/145"}],"metadata":[{"href":"https:\/\/libraryresources.nse.org.ng\/computersciencetwo\/wp-json\/pressbooks\/v2\/chapters\/146\/metadata\/"}],"wp:attachment":[{"href":"https:\/\/libraryresources.nse.org.ng\/computersciencetwo\/wp-json\/wp\/v2\/media?parent=146"}],"wp:term":[{"taxonomy":"chapter-type","embeddable":true,"href":"https:\/\/libraryresources.nse.org.ng\/computersciencetwo\/wp-json\/pressbooks\/v2\/chapter-type?post=146"},{"taxonomy":"contributor","embeddable":true,"href":"https:\/\/libraryresources.nse.org.ng\/computersciencetwo\/wp-json\/wp\/v2\/contributor?post=146"},{"taxonomy":"license","embeddable":true,"href":"https:\/\/libraryresources.nse.org.ng\/computersciencetwo\/wp-json\/wp\/v2\/license?post=146"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}