<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: Matthew Smith</title>
    <description>The latest articles on DEV Community by Matthew Smith (@m42smith).</description>
    <link>https://dev.to/m42smith</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F838574%2Fffb953e5-6d2f-4abc-b3fb-9e46bbc93528.jpeg</url>
      <title>DEV Community: Matthew Smith</title>
      <link>https://dev.to/m42smith</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/m42smith"/>
    <language>en</language>
    <item>
      <title>Open-source tool enables fuzz testing in JUnit</title>
      <dc:creator>Matthew Smith</dc:creator>
      <pubDate>Fri, 02 Dec 2022 09:39:33 +0000</pubDate>
      <link>https://dev.to/m42smith/open-source-tool-enables-fuzz-testing-in-junit-nm8</link>
      <guid>https://dev.to/m42smith/open-source-tool-enables-fuzz-testing-in-junit-nm8</guid>
      <description>&lt;p&gt;This week, Code Intelligence released CI Fuzz CLI, an open-source tool for Java that enables automated fuzz testing within JUnit. In this walkthrough, I want to demonstrate how you can use it to fuzz Java code using literally three commands.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fv0ntey1dospxi9g6so4v.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fv0ntey1dospxi9g6so4v.png" alt="JUnit partnership"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;The three commands:&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;

# Initialize fuzzing
$ cifuzz init

# Create your first fuzz test
$ cifuzz create my_fuzz_test

# Run fuzz test and find bugs
$ cifuzz run my_fuzz_test


&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;p&gt;&lt;a href="https://www.code-intelligence.com/cli-tool" rel="noopener noreferrer"&gt;CI Fuzz CLI&lt;/a&gt; is an easy-to-use fuzzing tool that enables you to integrate and run fuzz tests directly from your command line. Fuzz testing is a great add-on to classic unit testing, as it adds an element of &lt;a href="https://www.code-intelligence.com/blog/negative-testing-in-software-testing" rel="noopener noreferrer"&gt;negative testing&lt;/a&gt;, by feeding software with millions of unexpected or invalid inputs. &lt;/p&gt;

&lt;p&gt;CI Fuzz CLI runs on Linux, macOS, and Windows and supports integrations with common build systems and IDEs. If you want to test a Java application with CI Fuzz CLI, the only prerequisites are Java JDK (e.g., OpenDesk or Zulu) and a build system of your choice. &lt;/p&gt;

&lt;p&gt;You can download CI Fuzz CLI &lt;a href="https://github.com/CodeIntelligenceTesting/cifuzz" rel="noopener noreferrer"&gt;here&lt;/a&gt; or by running the installation script in GitHub.&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;

sh -c "$(curl -fsSL https://raw.githubusercontent.com/CodeIntelligenceTesting/cifuzz/main/install.sh)"


&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;p&gt;In the README, you will find detailed instructions on how to install the tool.&lt;/p&gt;

&lt;h2&gt;
  
  
  Fuzzing Use Case: How to Find Bugs in a Java Library
&lt;/h2&gt;

&lt;p&gt;&lt;a href="https://github.com/CodeIntelligenceTesting/cifuzz/blob/main/examples/maven/src/main/java/com/example/ExploreMe.java" rel="noopener noreferrer"&gt;This example library&lt;/a&gt; has multiple branches that are reached under different conditions. It contains a potential remote code execution, where an attacker could inject a string and overwrite the settings.&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;

ExploreMe.java
package com.example;
public class ExploreMe {
  // Function with multiple paths that can be discovered by a fuzzer.
  public static void exploreMe(int a, int b, String c) {
      if (a &amp;gt;= 20000) {
          if (b &amp;gt;= 2000000) {
              if (b - a &amp;lt; 100000) {
                  // Create reflective call
                  if (c.startsWith("@")) {
                      String className = c.substring(1);
                      try {
                        Class.forName(className);
                      } catch (ClassNotFoundException ignored) {
                      }
                  }
              }
          }
       }
   }
}


&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;p&gt;Let's take a look at how to write a fuzz test with CI Fuzz CLI that triggers this remote code execution.&lt;/p&gt;

&lt;h2&gt;
  
  
  How to Set Up a Fuzz Test in 3 Easy Steps
&lt;/h2&gt;

&lt;p&gt;To set up CI Fuzz CLI, just follow the instruction in the &lt;a href="https://github.com/CodeIntelligenceTesting/cifuzz" rel="noopener noreferrer"&gt;documentation&lt;/a&gt;. &lt;/p&gt;

&lt;p&gt;&lt;iframe width="710" height="399" src="https://www.youtube.com/embed/jPzi-imKWMg"&gt;
&lt;/iframe&gt;
&lt;/p&gt;

&lt;h2&gt;
  
  
  How to set up CI Fuzz CLI in Maven
&lt;/h2&gt;

&lt;p&gt;CI Fuzz CLI commands will interactively guide you through the needed options and give you instructions on what to do next. You can find a complete list of commands with all options and parameters by calling cifuzz command --help.&lt;/p&gt;

&lt;h3&gt;
  
  
  1. Initialize the Project for CI Fuzz CLI
&lt;/h3&gt;

&lt;p&gt;The first step is to initialize the project you want to test with CI Fuzz CLI. &lt;/p&gt;

&lt;p&gt;This step will vary depending on which build system you are working with, as you will need to modify relevant build files, either pom.xml for Maven projects or build.gradle for Gradle projects. Creating a fuzz test is the same for each build system. &lt;a href="https://docs.code-intelligence.com/creating-a-fuzz-test?_gl=1*117rx23*_ga*MTc3OTAxMzUyMS4xNjU1MTkxODQz*_ga_7V74D7208R*MTY2OTk3MDkyMS4xMy4xLjE2Njk5NzU2MjguMzguMC4w" rel="noopener noreferrer"&gt;Learn more&lt;/a&gt;. &lt;/p&gt;

&lt;p&gt;To initialize a Java Maven project, first run cifuzz init in the root directory of the project. This will create cifuzz.yaml in the root directory of the project, the primary configuration file for CI Fuzz CLI. &lt;/p&gt;

&lt;p&gt;CI Fuzz CLI will also list the dependencies you need to add to your pom.xml for your project:&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;

&amp;lt;dependency&amp;gt;
  &amp;lt;groupId&amp;gt;com.code-intelligence&amp;lt;/groupId&amp;gt;
  &amp;lt;artifactId&amp;gt;jazzer-junit&amp;lt;/artifactId&amp;gt;
  &amp;lt;version&amp;gt;0.13.0&amp;lt;/version&amp;gt;
  &amp;lt;scope&amp;gt;test&amp;lt;/scope&amp;gt;
&amp;lt;/dependency&amp;gt;

&amp;lt;dependency&amp;gt;
  &amp;lt;groupId&amp;gt;org.junit.jupiter&amp;lt;/groupId&amp;gt;
  &amp;lt;artifactId&amp;gt;junit-jupiter-engine&amp;lt;/artifactId&amp;gt;
  &amp;lt;version&amp;gt;5.9.0&amp;lt;/version&amp;gt;
  &amp;lt;scope&amp;gt;test&amp;lt;/scope&amp;gt;
&amp;lt;/dependency&amp;gt;


&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;
&lt;h3&gt;
  
  
  2. Create a Fuzz Test
&lt;/h3&gt;

&lt;p&gt;To create a fuzz test, cifuzz create java. This will create a fuzz test stub in the current directory. You can also use the -o flag to specify a path to create the fuzz test. &lt;/p&gt;

&lt;p&gt;You can put the fuzz test anywhere, but we recommend you keep it close to the tested code as you would a regular unit test. In the example maven project in the cifuzz repository, the fuzz test is created in src/test/java/com/example/FuzzTestCase.java.&lt;/p&gt;

&lt;p&gt;Here is that fuzz test:&lt;/p&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;

FuzzTestCase.java
package com.example;
Import com.code_intelligence.jazzer.api.FuzzedDataProvider;
import com.code_intelligence.jazzer.junit.FuzzTest;
public class FuzzTestCase {
    @FuzzTest
    void myFuzzTest(FuzzedDataProvider data) {
        int a = data.consumeInt();
        int b = data.consumeInt();
        String c = data.consumeRemainingAsString();
        ExploreMe.exploreMe(a, b, c);
    }
}


&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;p&gt;If you are familiar with unit tests in Java, this should look mostly familiar. A few things to note about this fuzz test:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;The fuzz test is in the same package as the target class&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;The @FuzzTest annotation identifies this method as a fuzztest method&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;The FuzzedDataProvider is part of the Jazzer API package and makes it easy to split fuzzing input into multiple parts and various data types.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;The name of this fuzz test, as cifuzz recognizes it, is com.example.FuzzTestCase. So when you want to run this fuzz test, then run cifuzz run com.example.FuzzTestCase from the project directory.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  3. Run the fuzz test
&lt;/h3&gt;

&lt;p&gt;Start the fuzzing by executing cifuzz run FuzzTestCase. CI Fuzz CLI now tries to build the fuzz test and starts a fuzzing run.&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;

$ cifuzz run FuzzTestCase 
[...]

Use ‘cifuzz finding &amp;lt;finding name&amp;gt;’ for details on a finding. 

💥[awesome_gnu] Security Issue: Remote Code Execution in exploreMe (com.example.ExploreMe:13)

Note: The crashing input has been copied to the seed corpus at: 
    src/test/resources/com/examples/MyClassFuzzTestInputs/awesome_gnu

It will now be used as a seed input for all runs of the fuzz test, including remote runs with artifacts created via ‘cifuzz bundle’ and regression tests. For more information, see:
    https://github.com/CodeIntelligenceTesting/cifuzz#regression-testing

Execution time: 3s
Average exec/s: 316880
Findings: 1
New seeds: 5 (total: 5)


&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;
&lt;h2&gt;
  
  
  Coverage Reporting and Debugging
&lt;/h2&gt;

&lt;p&gt;What you can do now is take a closer look at the findings. cifuzz findings shows you a list of all findings and cifuzz finding [name] will show you detailed information about a particular finding, which is useful to understand and fix a bug.&lt;/p&gt;

&lt;p&gt;Here we have the stack trace for the remote code execution:&lt;/p&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;

[awesome_gnu] Security Issue: Remote Code Execution in exploreMe (com.example.ExploreMe:13)
Date: 2022-11-10 13:31:07.94532426 +0100 CET

    == Java Exception: com.code_intelligence.jazzer.api.FuzzerSecurityIssueHigh: Remote Code Execution

Unrestricted class loading based on externally controlled data may allow
remote code execution depending on available classes on the classpath.
    at jaz.Zer.&amp;lt;clinit&amp;gt;(Zer.java:54)
      at java.base/java.lang.Class.forName0(Native Method)
      at java.base/java.lang.Class.forName(Class.java:375)
      at com.example.ExploreMe.exploreMe(ExploreMe.java:13)
      at com.example.FuzzTestCase.myFuzzTest(FuzzTestCase.java:13)
    == libFuzzer crashing input ==
    MS: 0 ; base unit: 0000000000000000000000000000000000000000

0x40,0x6a,0x61,0x7a,0x2e,0x5a,0x65,0x72,0x0,0x1,0x0,0x40,0x0,0x0,0x0,0x75,
    @jaz.Zer\000\001\000@\000\000\000u
    artifact_prefix='./'; Test unit written to 
    ./crash-f29a1020fa966baaf8c2326a19a03b73f8e5a3c9
    Base64: QGphei5aZXIAAQBAAAAAdQ==


&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;p&gt;We also get a report of the CLI, how many lines and functions were found, and how many of the branches were covered.&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;

Coverage Report
               File |  Functions Hit/Found |  Lines Hit/Found | Branches Hit/Found
  FuzzTestCase.java |         2/2 (100.0%) |     9/9 (100.0%) |       0/0 (100.0%)
src/explore_me.java |         1/1 (100.0%) |   23/23 (100.0%) |       8/8 (100.0%)
                    |                      |                  |     
                    |  Functions Hit/Found |  Lines Hit/Found | Branches Hit/Found                                      
              total |                  3/3 |            32    |                8/8


&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;p&gt;If you can, optimize your fuzzer for &lt;a href="https://www.code-intelligence.com/blog/code-coverage-metrics" rel="noopener noreferrer"&gt;code coverage&lt;/a&gt;. The idea behind this recommendation is to enable the fuzzer to explore your application by taking as many different paths through your code as possible. This way, the fuzzer will be able to learn if a specific data structure or inputs are required to execute the code, and the more information the fuzzer gets about the structure of the code, the more effective your fuzz tests will be. &lt;/p&gt;

&lt;h2&gt;
  
  
  Closing Thoughts
&lt;/h2&gt;

&lt;p&gt;Getting started with fuzzing can be challenging, as many open-source fuzzers require a lot of setup and knowledge to get your first fuzz test up and running. But I hope this article and CI Fuzz CLI can make it easier for you to get started with fuzzing, as it’s really one of the most effective (and fun) ways to test Java for integrity, reliability issues, and other vulnerabilities.&lt;/p&gt;

&lt;p&gt;If you have any questions about this article or CI Fuzz CLI, please feel free to reach out to my colleague &lt;a href="https://twitter.com/markuszoppelt" rel="noopener noreferrer"&gt;@markuszoppelt&lt;/a&gt;(Twitter)! &lt;/p&gt;

&lt;p&gt;CI Fuzz CLI on Github: &lt;a href="https://github.com/CodeIntelligenceTesting/cifuzz" rel="noopener noreferrer"&gt;https://github.com/CodeIntelligenceTesting/cifuzz&lt;/a&gt;&lt;/p&gt;




&lt;p&gt;Our test automation whisperer &lt;a href="https://twitter.com/joshin4colours" rel="noopener noreferrer"&gt;Josh&lt;/a&gt; will host a freely accesible live stream to demo some of the CLI's key features and to answer questions. More info at &lt;a href="https://www.code-intelligence.com/webinar" rel="noopener noreferrer"&gt;https://www.code-intelligence.com/webinar&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fdnolywocy8l6ksw4vwwd.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fdnolywocy8l6ksw4vwwd.png" alt="Josh live stream"&gt;&lt;/a&gt;&lt;/p&gt;

</description>
      <category>fuzzing</category>
      <category>java</category>
      <category>security</category>
      <category>testing</category>
    </item>
    <item>
      <title>The Psychology Behind Late-Stage Software Testing</title>
      <dc:creator>Matthew Smith</dc:creator>
      <pubDate>Tue, 29 Mar 2022 15:23:41 +0000</pubDate>
      <link>https://dev.to/m42smith/the-psychology-behind-late-stage-software-testing-2b90</link>
      <guid>https://dev.to/m42smith/the-psychology-behind-late-stage-software-testing-2b90</guid>
      <description>&lt;p&gt;Suppose you had the choice of receiving 100€ today or 110€ in a year. If you are impatient like me, you would probably choose the 100€ today. But how would your decision change if you had to choose between 100€ today and 100 000€ in a year?&lt;/p&gt;

&lt;p&gt;And what if we turned the decision around and gave you the choice of having to &lt;strong&gt;pay&lt;/strong&gt; either 100€ today or 100 000€ in a year? Sounds easy? Interestingly, in software testing, many people choose the more expensive option in the future. &lt;/p&gt;

&lt;p&gt;A bug that would cost 100€ to fix in the early stages of software development can end up costing 100 000€ if it has to be fixed in production (see rule of ten below). Thus, in theory, implementing early testing should be a no-brainer. Yet, we see many development teams that fail to do so.  Behavioral psychology suggests that this tendency can be traced back to the way our brain perceives losses and gains at different points in time.&lt;/p&gt;

&lt;h2&gt;
  
  
  The Problem With Late-Stage Software Testing
&lt;/h2&gt;

&lt;p&gt;Software bugs are inevitable. While there is some debate as to which combinations of testing approaches and tools are most effective at reducing them, most people agree that finding bugs earlier is better than finding them late. For this reason, tech leaders, such as Google and Microsoft, have been “shifting left” for years, and many software teams are following their lead.&lt;/p&gt;

&lt;p&gt;According to the &lt;a href="https://www.code-intelligence.com/blog/rule-of-ten-how-to-cut-your-development-costs"&gt;rule of ten&lt;/a&gt;, the costs of eliminating a bug increase by a factor of ten with each phase of the software development process it passes through undetected. These costs also contain the amount of developer time that is required to fix bugs that were committed months or years ago (often by other developers) and to fix consequential errors. &lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--xcyRdFhO--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/s3up4gnphqyrzrnwx0yu.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--xcyRdFhO--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/s3up4gnphqyrzrnwx0yu.png" alt="Rule of Ten" width="880" height="414"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;The reasons that cause some development teams to test late, despite the obvious benefits of doing the opposite, are typically quite rational. For example, when the necessary staffing or tooling for early-stage or continuous software testing isn’t available. But in addition to these rational motives, there are also irrational factors such as biases and cognitive errors that can subconsciously influence decision-makers to opt for late-stage testing.​​&lt;/p&gt;

&lt;h2&gt;
  
  
  Temporal Discounting in Software Engineering
&lt;/h2&gt;

&lt;p&gt;In its essence, &lt;a href="http://www.behaviorlab.org/Papers/Hyperbolic.pdf"&gt;temporal discounting&lt;/a&gt; describes our inclination to discount rewards and losses that are in the future. The further they are away, the stronger we discount their value. Therefore, when presented with two choices of equal value, one in the now and one in the distant future, we are likely to choose the one in the now.&lt;/p&gt;

&lt;p&gt;Temporal discounting is not just limited to monetary gains and losses. In a &lt;a href="https://www.computer.org/csdl/proceedings-article/esem/2019/08870161/1ecCLB8sZOM"&gt;2019 study&lt;/a&gt; by Fagerholm et al., software engineers were split into several groups. The groups were told that they were either working on a hypothetical 1-year, 2-year, 3-year, 4-year, 5-year or 10-year project. Next, all participants were presented with two options:&lt;/p&gt;

&lt;p&gt;&lt;em&gt;1. Implementing a new feature from the product backlog (5 person days)&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;&lt;em&gt;2. Integrating a new library (5 person days), that would speed up the development process by N-days. Over the course of the whole project.&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;Next, participants were asked:&lt;/p&gt;

&lt;p&gt;&lt;em&gt;How many days (N) would the new library have to save you throughout the entire project, for you to prefer option two over option one?&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;The results showed that the longer the overall scope of the project, the more “person-day savings” it took for software engineers to prefer the long-term option. Thus, software engineers valued time-savings less if they were further away in the future. They discounted their value.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--b1qZW3tu--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/k9f8x477r0hxqpa90ofs.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--b1qZW3tu--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/k9f8x477r0hxqpa90ofs.png" alt="Fagerholm et al.,2019" width="400" height="385"&gt;&lt;/a&gt;&lt;br&gt;
&lt;a href="https://www.computer.org/csdl/proceedings-article/esem/2019/08870161/1ecCLB8sZOM"&gt;Source: Fagerholem et al., 2019&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Temporal Discounting in Software Testing
&lt;/h2&gt;

&lt;p&gt;Software testing is no stranger to cognitive biases, as we know of &lt;a href="https://link.springer.com/article/10.1007/s10664-018-9668-8"&gt;confirmation bias&lt;/a&gt; (also known as positive test bias) and &lt;a href="http://www.scholarpedia.org/article/Inattentional_blindness#:~:text=Inattentional%20blindness%20is%20the%20failure,task%2C%20event%2C%20or%20object."&gt;inattentional blindness&lt;/a&gt;, just to name a few. When it comes to temporal discounting however, software testing has to be treated slightly differently from what we described above, since we are talking about discounted losses, instead of gains. Nonetheless, the principle remains the same: Although we rationally know that the costs (monetary and non-monetary) of unfixed vulnerabilities will increase the longer we delay software testing, it can be hard to grasp the full scope of these consequences, as they are diluted by the factor of time. Thus, from the perspective of today, the higher costs of bugs being discovered late seem a lot smaller than they actually are. Since the effect of temporal discounting depends on the amount of time that passes until we feel the effects of our losses, it is particularly strong in large projects that have a scope of several months or years.&lt;/p&gt;

&lt;p&gt;To be fair, most development teams do not make up their software testing strategy out of thin air. Measures such as security audits and data-driven strategy all serve the purpose of making well-informed, rational decisions. But since &lt;a href="https://www.code-intelligence.com/blog/human-component-in-security"&gt;decision-makers are still human&lt;/a&gt;, biases have to be taken into account and residual risk remains. Especially with constrained resources and tight schedules, decision-makers are sometimes forced to make compromises and to act fast. Even when there is enough time, resources, and staffing available to thoroughly plan software testing measures, temporal discounting should be kept in mind, and measures should be taken to minimize its effect.&lt;/p&gt;

&lt;h2&gt;
  
  
  Preventing Human Error in Software Testing
&lt;/h2&gt;

&lt;p&gt;Although it might sound trivial, being aware of our biases already helps us to make better decisions, as it allows us to take a step back to think about them consciously. This activates the rational part of the brain, which is less susceptible to cognitive errors.&lt;/p&gt;

&lt;p&gt;In software testing specifically, an effective approach to reducing cognitive errors is by implementing commitment devices. A commitment device is no more than a conscious decision that binds oneself to a strategic plan and takes away the option to delay. In software testing, opting for automated testing solutions can be such a commitment device. Once decision makers have decided to implement such a tool, developers can automatically run security tests at each pull request, throughout the entire development process. Automated security testing should come easier to decision-makers than manual early-stage testing methods, as it does not slow down the development process. In fact, automated testing solutions even speed up the whole process by eliminating bugs when they are still easy to fix.&lt;/p&gt;

&lt;h2&gt;
  
  
  Commit to Automated Software Testing
&lt;/h2&gt;

&lt;p&gt;If you are interested in what such a testing approach might look like, you can check out the free demo app of the fully automated application security testing platform CI Fuzz. By directly integrating with any build environment, CI Fuzz empowers developers to run security tests without extensive software security expertise. In the free demo app, you can access real bug findings, code examples, and code coverage reports. You can also contact the dev team to onboard your own projects for continuous security testing. All you need to access the demo app is a working GitHub account.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://app.code-intelligence.com/dashboard/featured-projects"&gt;Sign in with Github&lt;/a&gt;&lt;/p&gt;




&lt;p&gt;&lt;strong&gt;What Do Software Testing and Marshmallows Have in Common?&lt;/strong&gt;&lt;br&gt;
During the famous Stanford marshmallow experiment in 1972, children were placed in a small room with a marshmallow in front of them. The children were then told that if they managed not to eat the marshmallow for 15 minutes, they would be rewarded with an additional marshmallow. Many children preferred to eat the marshmallow in front of them immediately instead of waiting for the second one. Just like the children who preferred the immediate gratification of eating a marshmallow now, over the discounted gratification of eating 2 marshmallows in 15 minutes, software testers can also prefer the gratification of unimpeded software development now, over the benefits of early testing, which only manifest themselves in the distant future.&lt;/p&gt;

</description>
      <category>testing</category>
      <category>security</category>
      <category>psychology</category>
      <category>devops</category>
    </item>
  </channel>
</rss>
