{"id":194,"date":"2018-07-23T13:26:13","date_gmt":"2018-07-23T13:26:13","guid":{"rendered":"http:\/\/fip.r-a-w.org\/?page_id=194"},"modified":"2019-02-24T19:25:58","modified_gmt":"2019-02-24T19:25:58","slug":"testing-checklist","status":"publish","type":"page","link":"https:\/\/fip.r-a-w.org\/?page_id=194","title":{"rendered":"Testing Checklist"},"content":{"rendered":"<h2>General Guildlines<\/h2>\n<ul>\n<li>Create Class tests preferably using Hamcrest for legibility.<\/li>\n<li>Be through in creating differing tests.<\/li>\n<li>No test for methods to simple to fail (e.g setters and getters)<\/li>\n<li>Test positive and negative results<\/li>\n<li>Tests should run in isolation &#8211; if there are dependencies use mocking.<\/li>\n<li>Test Exceptions<\/li>\n<li>Create parameterisation tests for suitable methods.<\/li>\n<li>Tests should serve as sample code &amp; documentation<\/li>\n<li>Write Test Documentation<\/li>\n<li>Routinely\u00a0 check Architectural boundless<\/li>\n<li>When refactoring keep changes small then retest.<\/li>\n<li>Minimalise\u00a0 comments, instead use descriptive naming.<\/li>\n<\/ul>\n<h2>Use RGR cycle<\/h2>\n<ul>\n<li>Write test using the RGR cycle\n<ul>\n<li>Write a failing test (Red)<\/li>\n<li>Write the code so the test passes.<\/li>\n<li>Re-factor your code, improve, document\n<ul>\n<li>Check Structure, remove complexity<\/li>\n<li>Legibility &#8211; e.g Method Extraction<\/li>\n<li>Check for Anti-patterns<\/li>\n<li>Check for coupling<\/li>\n<li>No local variables<\/li>\n<li>Methods should not be more than 10 lines of code.<\/li>\n<li>Where applicable use dependency injection<\/li>\n<\/ul>\n<\/li>\n<li>Cycles should not be longer than 5 minutes or ten lines of code.<\/li>\n<\/ul>\n<\/li>\n<\/ul>\n<p>Last Update 24\/2\/19<\/p>\n","protected":false},"excerpt":{"rendered":"<p>General Guildlines Create Class tests preferably using Hamcrest for legibility. Be through in creating differing tests. No test for methods to simple to fail (e.g setters and getters) Test positive and negative results Tests should run in isolation &#8211; if there are dependencies use mocking. Test Exceptions Create parameterisation tests for suitable methods. Tests should &hellip; <a href=\"https:\/\/fip.r-a-w.org\/?page_id=194\" class=\"more-link\">Continue reading <span class=\"screen-reader-text\">Testing Checklist<\/span> <span class=\"meta-nav\">&rarr;<\/span><\/a><\/p>\n","protected":false},"author":2,"featured_media":0,"parent":191,"menu_order":0,"comment_status":"closed","ping_status":"closed","template":"","meta":{"footnotes":""},"class_list":["post-194","page","type-page","status-publish","hentry"],"jetpack_sharing_enabled":true,"jetpack_shortlink":"https:\/\/wp.me\/P9NvWe-38","jetpack_likes_enabled":true,"jetpack-related-posts":[],"_links":{"self":[{"href":"https:\/\/fip.r-a-w.org\/index.php?rest_route=\/wp\/v2\/pages\/194","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/fip.r-a-w.org\/index.php?rest_route=\/wp\/v2\/pages"}],"about":[{"href":"https:\/\/fip.r-a-w.org\/index.php?rest_route=\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"https:\/\/fip.r-a-w.org\/index.php?rest_route=\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/fip.r-a-w.org\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=194"}],"version-history":[{"count":4,"href":"https:\/\/fip.r-a-w.org\/index.php?rest_route=\/wp\/v2\/pages\/194\/revisions"}],"predecessor-version":[{"id":326,"href":"https:\/\/fip.r-a-w.org\/index.php?rest_route=\/wp\/v2\/pages\/194\/revisions\/326"}],"up":[{"embeddable":true,"href":"https:\/\/fip.r-a-w.org\/index.php?rest_route=\/wp\/v2\/pages\/191"}],"wp:attachment":[{"href":"https:\/\/fip.r-a-w.org\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=194"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}