<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
  <channel>
    <title>Code Testing on Handbook</title>
    <link>https://handbook.gradientmetrics.com/product-team/coding/package-development/code-testing/</link>
    <description>Recent content in Code Testing on Handbook</description>
    <generator>Hugo -- gohugo.io</generator><atom:link href="https://handbook.gradientmetrics.com/product-team/coding/package-development/code-testing/index.xml" rel="self" type="application/rss+xml" />
    <item>
      <title>Code Testing Protocol</title>
      <link>https://handbook.gradientmetrics.com/product-team/coding/package-development/code-testing/code-testing-protocol/</link>
      <pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate>
      
      <guid>https://handbook.gradientmetrics.com/product-team/coding/package-development/code-testing/code-testing-protocol/</guid>
      <description>What makes code close to perfect? We test our code to assure it is safe What do we use to test our code? What do we use to verify whether code is properly documented? When is our code tested sufficiently? Overall recommendations     What makes code close to perfect? Any code that we write should fulfill four requirements:
 It should be safe. It should be efficient.</description>
    </item>
    
    <item>
      <title>Testing Strategies</title>
      <link>https://handbook.gradientmetrics.com/product-team/coding/package-development/code-testing/testing-strategies/</link>
      <pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate>
      
      <guid>https://handbook.gradientmetrics.com/product-team/coding/package-development/code-testing/testing-strategies/</guid>
      <description>Why write automated tests? Code testing strategies Example of tests Test inputs and outputs  Errors and warnings Testing structure       Why write automated tests? Testing code can be performed in two different ways: manual and automated. The first approach means that every time we write a new function, or refactor code, or add some new arguments to a function call, we would need to figure out what behaviour we expect.</description>
    </item>
    
    <item>
      <title>Testing Inside a Function</title>
      <link>https://handbook.gradientmetrics.com/product-team/coding/package-development/code-testing/testing-inside-function/</link>
      <pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate>
      
      <guid>https://handbook.gradientmetrics.com/product-team/coding/package-development/code-testing/testing-inside-function/</guid>
      <description>Why test inside a function? It&amp;rsquo;s important to have tests that will serve as a sanity check inside our functions. These tests are usually made to throw an error if something is wrong with the entered parameters, which are passed to a function call. For instance, it can be valuable to check if an parameter is of character type or if all the necessary columns are present in a data.frame.</description>
    </item>
    
    <item>
      <title>Using Mockups</title>
      <link>https://handbook.gradientmetrics.com/product-team/coding/package-development/code-testing/using-mockups/</link>
      <pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate>
      
      <guid>https://handbook.gradientmetrics.com/product-team/coding/package-development/code-testing/using-mockups/</guid>
      <description>Why use mockups? Data as an argument Data needs to be downloaded or processed within function     Why use mockups? In some cases we might be unable to test functionalities. This might be due to long time of computation, or the function needs inputs that are stored on an external server. This also includes functions that deal with data that change in time (for instance data provided by an external API).</description>
    </item>
    
    <item>
      <title>Testing Best Practices</title>
      <link>https://handbook.gradientmetrics.com/product-team/coding/package-development/code-testing/testing-best-practices/</link>
      <pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate>
      
      <guid>https://handbook.gradientmetrics.com/product-team/coding/package-development/code-testing/testing-best-practices/</guid>
      <description>Testing is crucial for developing robust and safe code. Nonetheless, writing automated test is difficult and a time consuming process. Here is short summary of things you may want to consider before you start writing tests.
 Keep functions as small as possible. Functions should deal with one single thing, and they should deal with it good. For instance consider separating data wrangling from plotting or modeling. Make some sanity checks within function (e.</description>
    </item>
    
  </channel>
</rss>
