<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
  <channel>
    <title>Testing on Living Systems_</title>
    <link>https://livesys.se/tags/testing/</link>
    <description>Recent content in Testing on Living Systems_</description>
    <generator>Hugo</generator>
    <language>en-us</language>
    <lastBuildDate>Thu, 20 Aug 2020 23:47:00 +0200</lastBuildDate>
    <atom:link href="https://livesys.se/tags/testing/index.xml" rel="self" type="application/rss+xml" />
    <item>
      <title>Viewing Go test coverage in the browser with one command</title>
      <link>https://livesys.se/posts/go-test-coverage-in-browser/</link>
      <pubDate>Thu, 20 Aug 2020 23:47:00 +0200</pubDate>
      <guid>https://livesys.se/posts/go-test-coverage-in-browser/</guid>
      <description>&lt;p&gt;Go has some really nice tools for running tests and analyzing code. One&#xA;of these functionalities is that you can generate coverage information&#xA;when running tests, that can later be viewed in a browser using the&#xA;&lt;code&gt;go tool cover&lt;/code&gt; command. It turns out though, since doing it requires&#xA;executing multiple commands after each other, it might be hard to&#xA;remember the exact commands.&lt;/p&gt;&#xA;&lt;p&gt;To this end, I created a bash alias that does everything in one command,&#xA;&lt;code&gt;gocov&lt;/code&gt;. It looks like this (to be placed in your &lt;code&gt;~/.bash_aliases&lt;/code&gt; file&#xA;or similar:&lt;/p&gt;</description>
    </item>
    <item>
      <title>Table-driven tests in C#</title>
      <link>https://livesys.se/posts/table-driven-tests-in-csharp/</link>
      <pubDate>Sat, 02 Nov 2019 21:24:00 +0100</pubDate>
      <guid>https://livesys.se/posts/table-driven-tests-in-csharp/</guid>
      <description>&lt;p&gt;Folks in the Go community have championed so called table-driven tests&#xA;(see e.g. &lt;a href=&#34;https://dave.cheney.net/2019/05/07/prefer-table-driven-tests&#34; target=&#34;_blank&#34; rel=&#34;noopener&#34;&gt;this post by Dave&#xA;Cheney&lt;/a&gt;&#xA;&#xA;and the &lt;a href=&#34;https://github.com/golang/go/wiki/TableDrivenTests&#34; target=&#34;_blank&#34; rel=&#34;noopener&#34;&gt;Go wiki&lt;/a&gt;&#xA;)&#xA;as a way to quickly and easily writing up a bunch of complete test cases&#xA;with inputs and corresponding expected outputs, and looping over them to&#xA;execute the function being tested. In short, the idea is to suggest a&#xA;maximally short and convenient syntax to do this.&lt;/p&gt;&#xA;&lt;p&gt;For example, given that we have a function like this in mylibrary.go:&lt;/p&gt;</description>
    </item>
    <item>
      <title>The role of simplicity in testing and automation</title>
      <link>https://livesys.se/posts/the-role-of-simplicity-in-testing-and-automation/</link>
      <pubDate>Mon, 23 Mar 2015 20:46:00 +0100</pubDate>
      <guid>https://livesys.se/posts/the-role-of-simplicity-in-testing-and-automation/</guid>
      <description>&lt;p&gt;Disclaimer: Don&amp;rsquo;t take this too seriously &amp;hellip; this is&#xA;&amp;ldquo;thinking-in-progress&amp;rdquo; :)&lt;/p&gt;&#xA;&lt;p&gt;It just struck me the other minute, how simplicity is the key theme&#xA;behind two very important areas in software development, that I&amp;rsquo;ve been&#xA;dabbling with quite a bit recently: Testing, and automation.&lt;/p&gt;&#xA;&lt;p&gt;Have you thought about how testing, in its essence, is: &lt;em&gt;Wrapping&#xA;&lt;strong&gt;complex&lt;/strong&gt; code, which you can&amp;rsquo;t mentally comprehend completely, in&#xA;&lt;strong&gt;simple&lt;/strong&gt; code, that you can mentally comprehend, at least one test at&#xA;a time.&lt;/em&gt; Because, after all, if you can&amp;rsquo;t easily comprehend your test&#xA;code, as to make sure it is correct, by simply looking at it, you will&#xA;have to &lt;em&gt;create even simpler tests that test your tests&lt;/em&gt;!&lt;/p&gt;</description>
    </item>
  </channel>
</rss>
