<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:cc="http://cyber.law.harvard.edu/rss/creativeCommonsRssModule.html">
    <channel>
        <title><![CDATA[Stories by Adam Mackay on Medium]]></title>
        <description><![CDATA[Stories by Adam Mackay on Medium]]></description>
        <link>https://medium.com/@mckyadm?source=rss-c1fd365262e7------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*cWwj0mXIMivw_4l6pUNgdg.png</url>
            <title>Stories by Adam Mackay on Medium</title>
            <link>https://medium.com/@mckyadm?source=rss-c1fd365262e7------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Wed, 02 Dec 2026 12:50:40 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@mckyadm/feed" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[Have you covered *this* when testing C and C++ Software?]]></title>
            <link>https://medium.com/software-quality-qa-systems/have-you-covered-this-when-testing-c-and-c-software-b85f1baf6c9b?source=rss-c1fd365262e7------2</link>
            <guid isPermaLink="false">https://medium.com/p/b85f1baf6c9b</guid>
            <dc:creator><![CDATA[Adam Mackay]]></dc:creator>
            <pubDate>Mon, 23 Nov 2020 12:56:06 GMT</pubDate>
            <atom:updated>2020-11-23T12:59:55.258Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/940/0*OKjXBKAOhhuIpr_o.png" /></figure><p>The ability to produce reliable technologies that rapidly follow market trends creates a <strong>competitive advantage</strong> in the digital world.</p><p>Part of being a technology company is about producing <strong>reliable technology at a rapid pace.</strong> At the same time, we cannot sacrifice code quality just to deliver slightly faster. One of the primary tools for ensuring code quality while maintaining a rapid release schedule is writing good tests. Like any other skill, test writing is best developed through practice and experience. Monitoring development performance and knowing when you have tested enough are very valuable things to consider in any software development project.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/503/0*WYRQpu_I50nZffBy.jpeg" /><figcaption>Software developers showing surprise</figcaption></figure><p>Many software developers are surprised when the customer reports an error. We spend countless hours defining requirements, testing code and reviewing the final product. Despite this time investment how is it that mistakes find their way into the deliverable unnoticed?</p><p>Assuming that the customer is reporting valid concerns, we can answer the question with one of the following statements:</p><p><strong>&gt;</strong> The customer has executed part of the application that has <strong>never been tested</strong>. Incomplete testing could be deliberate due to time or cost constraints.</p><p><strong>&gt;</strong> The order or process in which a customer has used the software is <strong>different from the use anticipated</strong> by the development team or, more likely, the testing team. This actual usage was not built into the test suite.</p><p><strong>&gt;</strong> A combination of inputs were received by the application that were never tested. Software is rarely tested with every possible input value. It is the job of the tester to select a reduced set of typical input conditions that reproduce real-world usage. If <strong>the assumptions of the tester are wrong</strong>, errors slip through.</p><p><strong>&gt;</strong> The <strong>environment</strong> in which the software is being used <strong>differs</strong> between the develop/test teams and the customer. Typical discrepancies can be a different operating system version or hardware. Perhaps the real-world environment was not available to the test team at all, and it had to be simulated or assumed.</p><h3>‘Just Test It’</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/503/0*nUASA_hO_QTDFuWH.jpeg" /><figcaption>Embedded software runs our modern world</figcaption></figure><p>Software is almost never 100% tested. Unfortunately, this even applies to the more rigorously tested safety-critical embedded applications.</p><p>Consider a piece of control software which processes up to 30 different input variables. If we wanted to test all possible input combinations and prove that there were no unwanted interrelations between the inputs, we would have to test for 20 years, even if we could create and run 100 test cases per second.</p><p>Various measurements of <strong>coverage</strong> can be used to set and monitor testing progress and performance to help minimise the occurrence of errors in the field.</p><h3>Coverage Concepts</h3><p>Throughout the software industry, many commonly used terms have no concrete definition. The meaning of technical terms fluctuates depending on who you are talking to. Software testing is an essential activity in the software development and maintenance life cycles. It is a practice often used to decide and improve software quality. When it comes to measuring software testing performance and progress, it is therefore essential that everyone has the same understanding of the measurement terms (metrics) used.</p><p><strong>‘Coverage’</strong> is a broad umbrella term that encompasses a number of useful numerical measures for developers of robust software systems. These measures, when used effectively, can be used both to define quality goals for your end product and track your progress towards achieving them.</p><p>In software testing, there are 3 basic types of items to which coverage measurements can be applied:</p><p><strong>&gt; Requirements </strong>— various levels of detail defining e.g. functional, safety or non-functional (such as performance or usability) what the software should do, and sometimes what it should not do.<br><strong>&gt; Code </strong>— implementation in software (and sometimes hardware or firmware) to meet the requirements.<br><strong>&gt; Tests</strong> — a means to verify that the software does what it should do (and sometimes what it should not do — often called robustness tests).</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/636/0*Vc9I5LVMDZh_eu8q.png" /><figcaption>Three main categories of coverage</figcaption></figure><p>The 3 different uses of the term ‘coverage’ should not be confused. Requirements coverage measures the proportion of requirements which have been verified by requirements-based tests. Structural Code coverage measures the proportion of the code which has been executed by tests. Test coverage measures the proportion of tests which have been run and passed.</p><h3>Working to standards</h3><p>If you are working in a safety-critical industry, it is likely that you will be working toward achieving certification in the relevant international software standard. The standard and integrity level within it that you are working towards, will determine the coverage metrics and target coverage values that you should achieve in your project.</p><p>Safety-critical software standards, such as <strong>DO-178C</strong> and <strong>ISO26262</strong>, recommend the use of requirements coverage, structural code coverage and test coverage. Correct use of these concepts can also help developers outside of the safety-critical arena. Appreciation of the terms and their use will help deliver a more reliable and robust application.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1000/0*m_gBfG2RFTmbTMD-.png" /><figcaption>Linking requirements at every stage of development</figcaption></figure><p><strong>Link to Requirements</strong></p><p>Well-defined requirements at the start of the project, or at the start of an agile sprint, will make the technical teams’ jobs easier and more measurable. It is unlikely that requirements supplied by the customer will be complete enough to ensure project success. Usually, there will be some degree of interpretation, and an upfront process of adding detail to initial high-level requirements, to help shape the architectural design and implementation of the requirements in code. Situations where requirements are not documented, or where initial requirements are not final, will mandate additional study phases with the team and agreement with the customer.</p><p><strong>Monitor Code Coverage</strong></p><p>Measurement of structural coverage of code is an objective means of assessing the thoroughness of testing. There are various industry-standard metrics available for measuring structural coverage, these can be gathered easily with support from software tools. Such metrics do not constitute testing techniques, but a measure of the effectiveness of testing techniques.</p><p>Different code coverage metrics measure the execution of different syntax constructs within the code. The most common code coverage metrics are:</p><p><strong>&gt;Function / Method Entry Points<br>&gt;Function / Method Calls</strong> (and their Returns)<br><strong>&gt;Lines</strong> (of executable code)<br><strong>&gt;Statements<br>&gt;Basic Blocks</strong> (of sequential Statements)<br><strong>&gt;Decisions<br>&gt;Conditions</strong> (Boolean operands)<br><strong>&gt;Relational Operators<br>&gt;Loops<br>&gt;MC/DC</strong> (Modified Condition / Decision Coverage), both Masking &amp; Unique Cause forms</p><p>The fundamental strategic question of how much testing you should do is generally driven by available resources, both time and budget.</p><p><strong>Dynamic Test Results</strong></p><p>Test coverage measures the proportion of your tests have run successfully (i.e. been executed and pass) on the code. While having tests which verify the requirements can be measured using requirements coverage, and the amount of the code executed by the test can be measured using structural code coverage, whether or not these tests are actually run and pass is the third critical thing to measure for software testing. Requirements coverage and code coverage only have meaning when the status of the tests which those metrics measure is itself measured.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/527/0*-rQLfkXTGDaiUe9N.jpeg" /><figcaption>Automotive software needs to be tested to ISO26262</figcaption></figure><h3>Set some Goals</h3><p>Setting project goals around defined metrics, such as coverage, has several benefits to project success.</p><p><strong>&gt;Optimise the use of resources</strong></p><p>There are never enough resources to do everything, so setting coverage goals can help you to prioritise. By allocating most time and budget to test what is most important you can help focus testing efforts. If you want to better manage your time on testing, a simple solution is to stop doing what doesn’t need to be done.</p><p><strong>&gt;Add clarity to project meetings</strong></p><p>Knowing what you are trying to achieve means that you can tackle the question: “does this activity get me closer to my goal?” Setting goals enables you to clarify with other developers and testers what you are trying to do, and therefore what they need to do to contribute or support.</p><p><strong>&gt;Easier measurement of project status</strong></p><p>Setting coverage goals allows you to measure how effectively you are moving towards completion.</p><p>An important consideration is knowing when to stop testing. For those working towards standards, the coverage goals will be mandated. For others, an important first step is defining the targets of coverage to aim for.</p><p>If you reach the end of your project and have missed or not properly completed one of the three critical components of your coverage criteria, you risk delivering code that:</p><p><strong>&gt;</strong> Has not been verified to meet the requirements<br><strong>&gt;</strong> Has not passed all its tests<br><strong>&gt;</strong> Has not been exercised by any tests</p><p><strong>What is Cantata?</strong></p><p>Cantata is the safety-certified unit and integration testing tool from QA Systems, enabling developers to verify standard-compliant or business-critical code on host native and embedded target platforms. It is therefore much more than just a tool for measuring requirements coverage, code coverage and test coverage (which it does), Cantata helps you achieve the desired levels of coverage.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/782/0*3v2bo5DaR6N7Rzb4.png" /><figcaption>Cantata — Certified Unit &amp; Integration Testing</figcaption></figure><p>Cantata offers a comprehensive software testing tool which supports measuring and achieving requirements coverage, structural code coverage and test coverage. Cantata is available from QA Systems and its international network of authorised resellers. Further information on the Cantata product can be found at the QA Systems website: <a href="https://www.qa-systems.com/tools/Cantata"><strong>https://www.qa-systems.com/tools/Cantata</strong></a></p><p>There you can request a demonstration, contact our software quality experts and request a free trial of Cantata &amp; Cantata Team Reporting. If you want to be covered for your software testing, we look forward to hearing from you.</p><h3>Take away</h3><p>Obtaining coverage metrics is not a final task, but rather a <strong>constant effort towards a reliable system</strong>. The easier coverage is to monitor and report, the more useful it is to development teams. Use of coverage can guide the creation of tests cases, help optimise a set of tests and provide an empirical measure of testing sufficiency. Without measuring how much of the code is tested, verification activity always risks shipping untested code. While there are some hurdles to overcome by using coverage software in an embedded or continuous integration environment, the <strong>use of suitable tools and testing framework</strong> can solve the problems in almost all instances.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=b85f1baf6c9b" width="1" height="1" alt=""><hr><p><a href="https://medium.com/software-quality-qa-systems/have-you-covered-this-when-testing-c-and-c-software-b85f1baf6c9b">Have you covered *this* when testing C and C++ Software?</a> was originally published in <a href="https://medium.com/software-quality-qa-systems">Software Quality - QA Systems</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[What is meant by Structural (Code) Coverage?]]></title>
            <link>https://medium.com/software-quality-qa-systems/what-is-meant-by-structural-code-coverage-16c792f1b6ab?source=rss-c1fd365262e7------2</link>
            <guid isPermaLink="false">https://medium.com/p/16c792f1b6ab</guid>
            <dc:creator><![CDATA[Adam Mackay]]></dc:creator>
            <pubDate>Mon, 23 Nov 2020 12:45:42 GMT</pubDate>
            <atom:updated>2020-11-23T12:53:27.060Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*ucbBS9Dv8oe4axPT" /><figcaption>Photo by <a href="https://unsplash.com/@johnschno?utm_source=medium&amp;utm_medium=referral">John Schnobrich</a> on <a href="https://unsplash.com/?utm_source=medium&amp;utm_medium=referral">Unsplash</a></figcaption></figure><p>Put simply structural, or code, coverage is the amount of code that is covered in execution by a single test or collection of tests.</p><p>For a procedural language like C, you can identify a function of interest, run some test cases on this function, and then measure what proportion (expressed as a percentage) of the code has been executed. The general rule is that the higher the coverage achieved, then the higher the confidence that it has been thoroughly tested.</p><p>Measurement of structural coverage of code is an objective means of assessing the thoroughness of testing. There are various industry-standard metrics available for measuring structural coverage, these can be gathered easily with support from software tools. Such metrics do not constitute testing techniques, but a measure of the effectiveness of testing techniques.</p><p>A coverage metric is expressed in terms of a ratio of the code construct items executed or evaluated at least once, to the total number of code construct items. This is usually expressed as a percentage.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/708/0*Yh7eP9OXsHJiRutb.png" /></figure><p>There is significant overlap between the benefits of many of the structural code coverage metrics.</p><p>Structural code coverage is a measure of the completeness of software testing showing which areas of the source code are exercised in the application during the test. This provides a convenient way to ensure that software is not released with untested code.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/929/0*Wrbz2WYk17sAmTYa.png" /><figcaption>Where ‘Code coverage’ sits in the Project Lifecycle</figcaption></figure><p>The list below identifies reasons why some code has been found to be untested using structural code coverage and the resulting actions which may be taken.</p><p><em>Reason for unexecuted code:</em><strong><br>Code is ‘Dead’<br>(i.e. dynamically unreachable)</strong></p><p><em>Resulting Action:</em><strong><br></strong>Code can be removed to reduce:<br>&gt; possibility of it becoming inadvertently executable after future code changes<br>&gt; future maintainability costs with clearer code<br>Code can be left but commented out to make it non-executable.</p><p><em>Reason for unexecuted code:<br></em><strong>Code is ‘de-activated’ or ‘infeasible’<br>(i.e. not supposed to be executed in a particular context, e.g. certain states, threads or system configurations)</strong></p><p><em>Resulting Action:<br></em>An explanation of why the code is de-activated or infeasible to execute in a particular context can be documented (either internally using comments or externally)</p><p><em>Reason for unexecuted code:</em><strong><br>Code is ‘Untested’ and is unnecessary<br>(e.g. code from previous versions/variants of the SUT has been carried into the code base unnecessarily)</strong></p><p><em>Resulting Action:<br></em>Code can be removed to reduce:<br>&gt; possibility of it being used in un-tested scenarios.<br>&gt; future maintainability costs with clearer code<br>Code can be left but commented out to make it un-executable.</p><p><em>Reason for unexecuted code:<br></em><strong>Code is ‘Untested’ but is necessary<br>(e.g. code is indirectly related to or ‘derived’ from a requirement such as code is added for defensive programming, may not have been explicit enough for requirements-driven test cases to be created)</strong></p><p><em>Resulting Action:<br></em>Additional test cases can be added to exercise the ‘untested’ code.<br>Requirements can also be refined to make them more explicit for ‘derived’ requirements, depending on the need for and granularity of requirements traceability.</p><h3>Code Coverage Metric Definitions</h3><p>Different code coverage metrics measure the execution of different syntax constructs within the code. The most common code coverage metrics are:</p><p>1. Function / Method Entry Points<br>2. Function / Method Calls (and their Returns)<br>3. Lines (of executable code)<br>4. Statements<br>5. Basic Blocks (of sequential Statements)<br>6. Decisions<br>7. Conditions (Boolean operands)<br>8. Relational Operators<br>9. Loops<br>10. MC/DC (Modified Condition / Decision Coverage), both Masking &amp; Unique Cause forms</p><p>The fundamental strategic question of how much testing you should do is generally driven by available resources, both time and budget. If you are not required to measure tests against a specific set of structural code coverage metrics by a software safety standard, then the choice of which metrics and which thresholds to set as acceptable can be determined by your own software quality policy. For more information on the advantages and disadvantages of different code coverage metrics see the QA Systems white paper “ <a href="https://www.qa-systems.com/resources/detail/which-code-coverage-metrics-to-use/">Which Code Coverage Metrics to Use</a> “.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/965/0*sHOX3oHg3DtZaoE4.png" /><figcaption>Code coverage results shown in Cantata</figcaption></figure><p>For all the main software safety standards the required code coverage metrics (depending on integrity level) are Entry-point, Function Call, Statement, Decision and MC/DC coverage. These are explained in more detail below.</p><h3>Entry-Point Coverage</h3><p>Entry-Point coverage measures the proportion of functions in the source code that have been executed at least once. It is the easiest metric to achieve 100% coverage in tests.</p><h3>Call-Return Coverage</h3><p>Call-Return coverage measures the proportion of function or method calls in the source code made and completed at least once. It is the most commonly used metric to measure integration level testing.</p><h3>Statement Coverage</h3><p>Statement Coverage measures the proportion of executable statements in the source code which have been executed at least once. It can sometimes be referred to by these alternate names: C1, TER1, TER-S coverage. Statements include all executable (logic rather than declarations) lines of code within a function. Statement coverage does not take into account loops or conditional statements, only statements within an executable line.</p><p>It could be considered that statement coverage is a slightly more useful form of Line coverage, in some cases, a single statement can span multiple lines of code or multiple statements can be present on a single line. Line coverage provides a basic measure of code coverage and is often used as a crude coverage measure in some dashboarding software.</p><h3>Decision Coverage</h3><p>Decision Coverage measures the proportion of decision outcomes in the source code which have been evaluated at least once. It can sometimes be referred to by these alternate names: C2, Branch Coverage, TER2, TER-B coverage. Decisions include constructs such as ‘if… else…’, ‘switch… case…’ and loops such as ‘while’ and ‘for’. Decision coverage contains Statement coverage but ignores the complexities of conditions within decisions.</p><h3>MC/DC — Modified Condition / Decision Coverage</h3><p>Modified Condition Decision Coverage measures the proportion of operand conditions which could independently affect the true/false outcome of the decision expression that have been effective in doing so at least once. It can sometimes be referred to as a combination of Decision coverage and Boolean Operand Effectiveness coverage. MC/DC coverage demonstrates that every sub-condition can affect the outcome of the decision, independent of the other sub-condition values.</p><p>There are two methods for measuring MC/DC coverage: Unique Cause and Masking. The latter was created by Boeing to accommodate the short-circuiting evaluation of true/false expressions in C/C++.</p><p>MC/DC is the hardest metric to achieve 100% coverage in tests requiring the most test cases.What is Cantata?</p><p>Cantata is the safety-certified unit and integration testing tool from QA Systems, enabling developers to verify standard-compliant or business-critical code on host native and embedded target platforms. It is therefore much more than just a tool for measuring requirements coverage, code coverage and test coverage (which it does), Cantata helps you achieve the desired levels of coverage.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/782/0*j9bNpPFinEKldrCu.png" /></figure><p>Cantata offers a comprehensive software testing tool which supports measuring and achieving requirements coverage, structural code coverage and test coverage. Cantata is available from QA Systems and its international network of authorized resellers. Further information on the Cantata product can be found at the QA Systems website: <a href="https://www.qa-systems.com/tools/Cantata"><strong>https://www.qa-systems.com/tools/Cantata</strong></a></p><p>There you can request a demonstration, contact our software quality experts and request a free trial of Cantata &amp; Cantata Team Reporting. If you want to be covered for your software testing, we look forward to hearing from you.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=16c792f1b6ab" width="1" height="1" alt=""><hr><p><a href="https://medium.com/software-quality-qa-systems/what-is-meant-by-structural-code-coverage-16c792f1b6ab">What is meant by Structural (Code) Coverage?</a> was originally published in <a href="https://medium.com/software-quality-qa-systems">Software Quality - QA Systems</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[What you Don’t Know About Software Quality.]]></title>
            <link>https://medium.com/software-quality-qa-systems/what-you-dont-know-about-software-quality-b723f60a2268?source=rss-c1fd365262e7------2</link>
            <guid isPermaLink="false">https://medium.com/p/b723f60a2268</guid>
            <dc:creator><![CDATA[Adam Mackay]]></dc:creator>
            <pubDate>Mon, 23 Nov 2020 11:56:46 GMT</pubDate>
            <atom:updated>2020-11-23T12:01:42.563Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/500/1*vCt_5zxnU02xxe2QQJsQKA.jpeg" /></figure><p>We all want the software in the devices we use to be top quality. However, have you considered what is meant by Software Quality? It is very difficult to articulate a set of criteria that summarises a comprehensive quality metric. As such, it is necessary to break the term down and look at various aspects, such as reliability, correctness, completeness, consistency, usability and performance. Bear in mind that there may be one quality attribute that is more applicable for a class of device than another quality attribute; software quality is a multidimensional quantity which can be measured in many ways. In this introductory article, I will explore what determines software quality.</p><h3>Quality Attributes.</h3><p>There are several indicators we can look at to determine the quality of software. We can divide these into one of two classes, static and dynamic. Static properties refer to the specific code and documentation associated with it and a dynamic quality attributes look at the application’s behaviour while in service.</p><p>Structured, maintainable, testable code (and having accurate and full documentation) are static quality metrics. You may have come across complaints like “Your product is fantastic, I like the features it provides, but its user manual doesn’t help!” In this case, the user manual brings down the overall <em>quality </em>of the product.</p><p>If you are a software engineer working on corrective maintenance of an application, you will most likely need to understand parts of the code before changing it.</p><p>This is where metrics concerning things such as code documentation, code comprehensibility and software structure come into play. An under documented application will be difficult to understand and therefore difficult to change likewise, unstructured code will be harder to maintain and difficult to test.</p><h3>Dynamic Testing.</h3><p>Attributes of dynamic quality include the reliability of the program, correctness, completeness, usability, consistency and performance. <strong>Reliability </strong>refers to the likelihood of failure-free operation, <strong>correctness </strong>refers to an application’s expected operation and should always be tied to defined requirements. For a tester, the operation should be correct according to the specifications; for a customer, they expect the operation to match the user manual.</p><p><strong>Completeness </strong>refers to the availability of all the features specified in the user manual or the requirements. An incomplete program is one that does not execute all the necessary functions in full. Of course, with each recent version of an application, you can expect additional functionality, but this doesn’t mean that a version is incomplete, because there are few extra features in its next edition. We define completeness in the context of a set of features that could themselves be a subset of a larger set of features to be implemented in some future application version.</p><p><strong>Consistency </strong>means adherence to a common set of conventions and common sense. For example, all buttons in the user interface should follow a common convention on colour coding. An example of inconsistency may occur when a database application shows a person’s date of birth in the database, the date of birth may be shown in various formats, regardless of the preferences of the user.</p><h3>Non-functional Testing</h3><p><strong>Usability </strong>testing should include a product being tested by its potential users. The software organisation invites selected potential users to test the product and report back. Customers in turn check for ease of use, expected functionality, consistency, safety and security. Customers act as an important source of feedback, which may not have been considered by developers or testers within the organisation. Usability testing is also known as user-centric testing.</p><p><strong>Performance </strong>refers to the amount of time it takes the application to perform a requested function. We refer to performance as a non-functional requirement and it is defined in terms such as “This task must be completed in one second”.</p><h3>Reliability</h3><p>People want software that works perfectly every time it’s used. That, however, rarely happens, if at all. Often software used today contains faults which cause it to fail on some input combination. The idea that software can be 100% fault free is false.</p><p>Because we know most software applications are flawed, the aim is to determine how regularly a piece of software will malfunction. This is known as ‘reliability’ and can be defined in one of two ways.</p><blockquote><em>Software reliability is the probability of failure-tree operation of software over a given time interval and under given conditions.</em></blockquote><p>Or</p><blockquote><em>Software reliability is the probability of failure-free operation of software in its intended environment.</em></blockquote><p>These two definitions have both benefits and disadvantages. The first of the two definitions above requires knowledge of its users’ expectations, which may be difficult or impossible to accurately determine. Nevertheless, if we can calculate an operational profile for a given class of users, then for this class of users we can find a reasonable estimation of reliability. The second definition is appealing in that one only requires a single number to signify the functionality of a software application that extends to all its users. These figures are hard to calculate, however.</p><h3>Requirements and Test Criteria.</h3><p>Products, especially software, are designed to meet requirements. Requirements describe the functions you expect a product to perform. Once the product is ready, it is the requirements which determine the test criteria though of course, the requirements may have changed during product development from what was originally defined.</p><p>The product’s expected behaviour is determined by the tester’s interpretation of the specifications, regardless of whether they have been kept up to date. A program is considered tested if it behaves correctly on all inputs. However, even with the most trivial piece of software, the collection of all potential inputs is typically too large to test each one. Exhaustive testing is not often used in practice.</p><p>It is usually left to the tester to determine what makes up all possible inputs. The first step is to analyse the requirements. If the requirements are complete and unambiguous, the collection of all possible inputs can be defined.</p><p>A software component is considered functionally correct if it responds to each input as planned. Identifying the collection of invalid inputs and checking the software against those inputs are important components of testing. When the program behaviour on invalid inputs is not specified by the specifications, the programmer should build in functionality handle or reject these.</p><p>There are many aspects to juggle when building out a suite of tests to help improve your software quality. To improve the situation, automation and tools can assist with planning, constructing, building, running and reporting on tests against your code.</p><h3>Tools to help you test.</h3><p>Cantata is the safety-certified unit and integration testing tool from QA Systems, enabling developers to verify standard-compliant or business-critical code on host native and embedded target platforms. It is a complete tool for constructing, running and reporting on your software tests at unit and integration level.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/60/0*ZbZxaFZv4jelH7Qt" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/782/0*6k7GOZP2WebmQ5F2.png" /><figcaption>Cantata — Certified Unit &amp; Integration Testing.</figcaption></figure><p>Cantata offers a comprehensive software testing tool which supports test construction, linking to requirements and sophisticated reporting. Cantata is available from QA Systems and its international network of authorised resellers. Further information on the Cantata product can be found at the QA Systems website: <a href="https://www.qa-systems.com/tools/Cantata">https://www.qa-systems.com/tools/Cantata</a></p><p>There you can request a demonstration, contact our software quality experts, and request a free trial of Cantata &amp; Cantata Team Reporting. If you want to be covered for your software testing, we look forward to hearing from you.</p><h3>More to consider.</h3><p>Testing against requirements is not an ending task in your development, but rather a <strong>constant effort towards a reliable system</strong>. The easier tests are to construct, execute, monitor and report, the more useful they are to development teams. Use of coverage can guide test case creation, help optimise a set of tests and provide an empirical measure of testing sufficiency. Without measuring how much of the code we tested, verification activity always risks shipping untested code. While there are some hurdles to overcome by using coverage software in an embedded or continuous integration environment, the <strong>use of suitable tools and testing framework</strong> can solve the problems in almost all instances.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=b723f60a2268" width="1" height="1" alt=""><hr><p><a href="https://medium.com/software-quality-qa-systems/what-you-dont-know-about-software-quality-b723f60a2268">What you Don’t Know About Software Quality.</a> was originally published in <a href="https://medium.com/software-quality-qa-systems">Software Quality - QA Systems</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[The Pursuit of Perfection — An Effective Embedded Unit Test Process for Efficient Testing.]]></title>
            <link>https://medium.com/software-quality-qa-systems/the-pursuit-of-perfection-an-effective-embedded-unit-test-process-for-efficient-testing-6c6bfd78639e?source=rss-c1fd365262e7------2</link>
            <guid isPermaLink="false">https://medium.com/p/6c6bfd78639e</guid>
            <dc:creator><![CDATA[Adam Mackay]]></dc:creator>
            <pubDate>Wed, 08 Apr 2020 14:01:21 GMT</pubDate>
            <atom:updated>2020-11-23T11:51:53.564Z</atom:updated>
            <content:encoded><![CDATA[<h3>The Pursuit of Perfection — An Effective Embedded Unit Test Process for Efficient Testing.</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/500/1*GoSHxyXRRLV2W2ahTeio5w.jpeg" /></figure><p>The methods, techniques and tools to achieve robust embedded testing.</p><blockquote>“It’ll never happen in the field”<br>“Optimise later”<br>“Perfection is the enemy of good”<br>“It’s good enough”</blockquote><p>Every developer has heard at least one of these phrases. I’m sure you have. You may have even used them yourself. They hold some truth for developers of enterprise or front-end software. However, if you have used these in embedded software, you are very wrong.</p><p>Flawless embedded software is important in many industries… Embedded code underpins everything; it’s the fundamental layer of all devices. All other software — middleware logic, databases, web servers, user interfaces — everything depends on a functioning bottom layer of software.</p><p>And in the top layer of software — and with all due respect to those who attempt to get it right — it rarely matters if the pixels are out in the user interface, or it’s the wrong colour. It doesn’t affect the functionality of the software.</p><p>As Embedded software developers, our focus is to accelerate and improve software development in <strong>the pursuit of perfection</strong>. In the forthcoming series of articles, I will look at elements that come together to make a successful, fully tested, embedded application. Important aspects discussed include <strong>requirements traceability, software metrics, testing frameworks, code coverage and automation.</strong></p><h3>Define your Process</h3><p>There’s generally an unspoken truth in the software industry; a lot of code isn’t well checked. Sections of it are performed in a rush without taking into account the rest of the system. Testing is cursory or performed without a full understanding of function. Developers find that testing is boring, or they’re afraid of what they might discover. Quality assurance engineers (those whose task it is to test) often work without complete requirements or the same deep understanding of the codes (a common source of frustration).</p><p>You can address most of these concerns by using a <strong>defined process</strong> in your test and verification activities. It is important that your team supports the process you define, and that you build in iterative feedback loops to refine and improve it. Whether you are using Agile, Waterfall or a DevOps variation, your process should always feature test design as early as possible. The first iteration of your test plan, in which we document the system test design, must be a “living document”. It will undergo regular updates and must, therefore, be under version control.</p><p>Implementation of test cases designed in the early stage of the project can sometimes not be realised as intended. If we don’t adjust the specification, then real tests and documentation get out of sync and you introduce technical debt into your test set. In the worst case, we can leave the tests in an unpredictable state.</p><p>A revision of the requirements specification is the most common reason for updating tests. To appreciate which of the existing system tests have to be rethought during such a revision of the requirements, an up-to-date traceability table is vital. This table keeps track of which requirement is being tested in which test case. Create and maintain these tables manually or use requirements engineering/management tools.</p><h3>Efficient Test Design</h3><p>The same basic engineering concepts that apply to the design of good software are needed when designing tests. Efficient test design comprises a variety of steps in which you increasingly increase the testing depth.</p><p>The specification of the program must drive the nature of the tests. For unit testing, we design the tests to check that the individual unit meets all design decisions taken in the design specification of the unit. A comprehensive unit test specification should include positive testing, that the unit does what it is supposed to do, and negative testing, that the unit does nothing it is not meant to do.</p><p>In the pursuit of perfection, we’re looking for mistakes everywhere, even in cases that will “never” happen.</p><p>Non-trivial software can process a large (infinite?) number of different input data. This is exasperated in situations where the order and timings of data entry order is important. Testers have the difficult task to develop a few discreet cases to test a system that can accommodate an infinite number of scenarios. The results of testing activities need to be fed back to the development team, <strong><em>tests do not improve quality: developers do.</em></strong></p><h3>First Test</h3><p>The object of the first test case in any unit test process should be to execute the test unit in the simplest way possible. Not only does this perform a useful check of the unit under test, but it also verifies the functionality of the build and test toolchain. The confidence gained from knowing that you can execute a simple unit test isolated from the complete system is valuable. It not only provides the tester with a foundation upon which to build but also a route to debug any failures.</p><h3>Positive vs Negative Testing</h3><p>Initial testing should show that the software unit under test does what it needs to do. The test model should obey the specifications; each test case will test one or more specification statements. If multiple requirements are involved, it is best to ensure that the sequence of test cases corresponds to the sequence of statements in the unit’s primary specification.</p><p>You should first look to improve existing test cases and then add further test cases to show that the program does nothing that is not specified. This depends on error guessing and the expertise of the tester to predict problem areas.</p><p>We should also design functional tests to address issues such as performance, safety and security requirements.</p><h3>Estimate and Measure the Test Progress (Coverage and Metrics)</h3><p>Plan the testing aspects as precisely as you would the entire project. Part of this plan is defining the project goal, for example how many undetected errors, of which category, the software under test may still have at delivery. The type and extent of testing will depend on these figures.</p><p>Code Metrics are measures taken automatically from source code. For example, the number of linearly independent paths. If we know from previous experience how long it takes to test, on average, per path, then you can estimate the time to test the complete application.</p><p>Analysis of code coverage information, extracted from running the test suite as we build it up, it is possible to refine the initial estimates and monitor the progress of the testing process. However, beware that as you approach high levels of code coverage, 90+%, the testing effort can increase exponentially. Difficult to test and complex parts of the application are often hiding in the final 10%.</p><h3>Run the Tests</h3><p>After we have selected/designed suitable test cases, we can execute them. This can be manual, semi-automatic or fully automatic. The choice of automation depends on two factors: the liability for software errors and the repetition rate of the tests. For security-related applications, the preference should always be automated testing. Well-designed test scripts allow exact repeatability of tests.</p><p>In DevOps environments, the gold standard is to execute a complete suite of automated tests on each code modification. This allows for rapid feedback to developers and the confidence that the code is always in a tested and ‘ready-to-release’ state.</p><p>Outside of DevOps test automation allows for easy regression testing. This allows developers to ensure that added functionality does not compromise the previous testing effort. We should make an investment in a suitable test automation framework upfront to save effort throughout the duration of the project.</p><p>Despite the determinism and repeatability, fully automated tests do not mitigate the need for complete documentation and tuning of the test design with changing versions of the requirement specification. Without documentation, the test suite becomes a box of mysteries; no one dares to delete a test, because we do not understand its function. Nobody knows what the tests do, except that to pass them is essential. In this scenario, new requirements force us to add new tests, and so the test collection becomes increasingly impenetrable.</p><h3>Takeaways</h3><ul><li>Experience has shown that a conscientious approach to unit testing will detect many bugs at a stage of software development where we can correct them economically.</li><li>Be humble about what your unit tests can achieve, unless you have extensive requirements documentation for the unit under test the testing phase will be iterative and exploratory.</li><li>Fix your embedded software; take the time. It doesn’t have to be perfect — but it helps to be close.</li></ul><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=6c6bfd78639e" width="1" height="1" alt=""><hr><p><a href="https://medium.com/software-quality-qa-systems/the-pursuit-of-perfection-an-effective-embedded-unit-test-process-for-efficient-testing-6c6bfd78639e">The Pursuit of Perfection — An Effective Embedded Unit Test Process for Efficient Testing.</a> was originally published in <a href="https://medium.com/software-quality-qa-systems">Software Quality - QA Systems</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
    </channel>
</rss>