{"id":316,"date":"2022-05-24T19:37:25","date_gmt":"2022-05-24T18:37:25","guid":{"rendered":"https:\/\/blogs.glowscotland.org.uk\/glowblogs\/phshighercomputingscience\/?page_id=316"},"modified":"2024-11-13T12:52:26","modified_gmt":"2024-11-13T12:52:26","slug":"testing","status":"publish","type":"page","link":"https:\/\/blogs.glowscotland.org.uk\/glowblogs\/phshighercomputingscience\/testing\/","title":{"rendered":"Testing"},"content":{"rendered":"<p>Software companies can spend a lot of time and money developing their software.\u00a0 They cannot afford to release poor quality or flawed software. It is therefore critical that software is <strong>tested<\/strong> thoroughly before release.<\/p>\n<p>It seems a little obvious and simplistic to suggest that testing is only necessary to identify errors.\u00a0 \u00a0In particular, it checks that software is <strong>fit for purpose <\/strong>&#8211;\u00a0 this involves evaluating <strong>functionality<\/strong> and <strong>performance<\/strong>:<\/p>\n<ul>\n<li><strong>Functionality &#8211; <\/strong>Does the software include all the features that it&#8217;s supposed to?<\/li>\n<li><strong>Performance &#8211; I<\/strong>s the software fast, reliable, robust and easy to use?<\/li>\n<\/ul>\n<h2 style=\"color: red\">Systematic Testing<\/h2>\n<p><strong>Systematic testing<\/strong> involves the creation of a <strong>test plan<\/strong> which specifies the testing activities to be undertaken throughout different phases of the development cycle.<\/p>\n<h2 style=\"color: red\">Creating a\u00a0 Test Plan<\/h2>\n<p>Shortly after the software specification is produced (early in the design phase) a <strong>test plan<\/strong> is written. It details every aspect of the testing activities to be undertaken during and after the development of the application. It typically includes the following:<\/p>\n<ul>\n<li>Type of test<\/li>\n<li>Input of test<\/li>\n<li>Expected output<\/li>\n<li>Actual output<\/li>\n<\/ul>\n<h2 style=\"color: red\">Comprehensive Testing<\/h2>\n<p><strong>Ensures that all (functional) requirements of the program are tested<\/strong><\/p>\n<p>It is impossible to test a piece of software under every possible condition and input.\u00a0 However, it <strong>is<\/strong> possible to devise an extensive set of <strong>test cases<\/strong> which are <em>representative<\/em> of all conditions.<\/p>\n<h2 style=\"color: red\">Debugging<\/h2>\n<p>No matter how careful you are when you write program code, your programs are likely to have errors, or <strong>bugs<\/strong>, that prevent them from running the way you intended. <strong>Debugging<\/strong> is the process of locating and fixing errors in programs.<\/p>\n<p>Program errors can be classified in the following way:<\/p>\n<ul>\n<li><span style=\"color: #000000\"><strong>Syntax errors<\/strong><\/span><\/li>\n<li><span style=\"color: #000000\"><strong>Execution Errors<\/strong><\/span><\/li>\n<li><span style=\"color: #000000\"><strong>Logic Errors<\/strong><\/span><\/li>\n<\/ul>\n<p>&nbsp;<\/p>\n<h2 style=\"color: red\">Debugging Tools<\/h2>\n<p>There are a variety of techniques used to identify execution and logic errors.\u00a0 Some are <strong>manual methods <\/strong>used to check the design, while others use <strong>debugging tools<\/strong> available within the software development environment.<\/p>\n<h2 style=\"color: red\">Manual Methods: Dry Runs and Trace Tables<\/h2>\n<p><strong>Dry run<\/strong> testing is usually a &#8216;paper and pencil&#8217; exercise carried out to identify logic errors.\u00a0 The process involves manually stepping through an algorithm using purposely chosen sample data to record the values of variables.<\/p>\n<p><strong>Trace tables<\/strong> are frequently used when conducting dry runs on program components. A trace table is used to record the values of variables throughout the flow of\u00a0 the program<span style=\"font-size: 1rem\">. The table record the value of each variable at a certain point in program flow.\u00a0 <span style=\"color: #000000\">Trace tables are particularly useful for seeing how variables change through iterations of a loop.<\/span><\/span><\/p>\n<h2 style=\"color: red\">Environment Debugging Tools: Trace Facility, Breakpoints and Watches<\/h2>\n<p>&nbsp;<\/p>\n<p><strong>Breakpoints<\/strong><\/p>\n<p>A breakpoint will halt execution of the code at a predefined point then the values of variable can be inspected to compare with trace table values\/expected values<\/p>\n<p><strong>Watchpoint<\/strong><\/p>\n<p>Watchpoints are used to stop execution when the value of a specific variable changes\/pre-determined conditions are met This allows the programmer to compare the value with the expected value.<\/p>\n<p>&nbsp;<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Software companies can spend a lot of time and money developing their software.\u00a0 They cannot afford to release poor quality or flawed software. It is therefore critical that software is tested thoroughly before release. It seems a little obvious and simplistic to suggest that testing is only necessary to identify errors.\u00a0 \u00a0In particular, it checks [&hellip;]<\/p>\n","protected":false},"author":79984,"featured_media":0,"parent":0,"menu_order":0,"comment_status":"closed","ping_status":"closed","template":"","meta":{"footnotes":""},"class_list":["post-316","page","type-page","status-publish","hentry"],"_links":{"self":[{"href":"https:\/\/blogs.glowscotland.org.uk\/glowblogs\/phshighercomputingscience\/wp-json\/wp\/v2\/pages\/316","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/blogs.glowscotland.org.uk\/glowblogs\/phshighercomputingscience\/wp-json\/wp\/v2\/pages"}],"about":[{"href":"https:\/\/blogs.glowscotland.org.uk\/glowblogs\/phshighercomputingscience\/wp-json\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"https:\/\/blogs.glowscotland.org.uk\/glowblogs\/phshighercomputingscience\/wp-json\/wp\/v2\/users\/79984"}],"replies":[{"embeddable":true,"href":"https:\/\/blogs.glowscotland.org.uk\/glowblogs\/phshighercomputingscience\/wp-json\/wp\/v2\/comments?post=316"}],"version-history":[{"count":8,"href":"https:\/\/blogs.glowscotland.org.uk\/glowblogs\/phshighercomputingscience\/wp-json\/wp\/v2\/pages\/316\/revisions"}],"predecessor-version":[{"id":356,"href":"https:\/\/blogs.glowscotland.org.uk\/glowblogs\/phshighercomputingscience\/wp-json\/wp\/v2\/pages\/316\/revisions\/356"}],"wp:attachment":[{"href":"https:\/\/blogs.glowscotland.org.uk\/glowblogs\/phshighercomputingscience\/wp-json\/wp\/v2\/media?parent=316"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}