<?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 Artur Rios Lab</title><link>https://lab.artur-rios.tech/tags/testing/</link><description>Recent content in Testing on Artur Rios Lab</description><generator>Hugo</generator><language>en-us</language><lastBuildDate>Wed, 21 Oct 2026 19:30:00 +0000</lastBuildDate><atom:link href="https://lab.artur-rios.tech/tags/testing/index.xml" rel="self" type="application/rss+xml"/><item><title>How I Develop APIs</title><link>https://lab.artur-rios.tech/dotnet/how-i-develop-apis/</link><pubDate>Wed, 21 Oct 2026 19:30:00 +0000</pubDate><guid>https://lab.artur-rios.tech/dotnet/how-i-develop-apis/</guid><description>&lt;p&gt;Every backend I build is an ASP.NET Core API, and they all look alike on&#10;purpose. When the structure is the same everywhere, I never have to remember&#10;where a thing lives, a new feature is a list of files to add rather than a&#10;design decision, and a test that fails points at one small piece of code.&lt;/p&gt;&#10;&lt;p&gt;This page describes that shape, using&#10;&lt;a href="https://docs.artur-rios.tech/heimdall-api/"&gt;Heimdall&lt;/a&gt; as the example&#10;throughout. Heimdall is my identity management API: people, applications,&#10;logins, two-factor authentication and permissions, for several client systems&#10;at once, each in its own scope. It is the largest API I have, so every pattern&#10;here has been tested against a real use case rather than a toy one. All code&#10;on this page is taken from it, trimmed only where noted.&lt;/p&gt;</description></item><item><title>How I Start a Project From Scratch</title><link>https://lab.artur-rios.tech/engineering/starting-a-project-from-scratch/</link><pubDate>Wed, 21 Oct 2026 17:30:00 +0000</pubDate><guid>https://lab.artur-rios.tech/engineering/starting-a-project-from-scratch/</guid><description>&lt;p&gt;Every project on this site starts the same way. Not with code, but with a&#10;document, because the cheapest place to find a mistake is in a sentence, before&#10;anything has been built on top of it. This is the roadmap I follow, from the&#10;first idea to a system that is ready to use:&lt;/p&gt;&#10;&lt;ol&gt;&#10;&lt;li&gt;Create a brainstorm document for the project, with ideas about its nature,&#10;its implementation and the technologies to use.&lt;/li&gt;&#10;&lt;li&gt;Refine the brainstorm into four initial documents: Project Overview,&#10;Technology Stack, Workflow and Business Rules.&lt;/li&gt;&#10;&lt;li&gt;Formalise them into a Vision Document, a System Requirements Document and a&#10;Use Case Specification Document.&lt;/li&gt;&#10;&lt;li&gt;Review the documents, improve them, and review them again until they match&#10;what the project is meant to be.&lt;/li&gt;&#10;&lt;li&gt;Create GitHub issues for the initial scaffold and infrastructure.&lt;/li&gt;&#10;&lt;li&gt;Create a GitHub issue for each use case, linked to a GitHub Project and to an&#10;MVP milestone.&lt;/li&gt;&#10;&lt;li&gt;Implement the initial scaffold and infrastructure.&lt;/li&gt;&#10;&lt;li&gt;Implement one use case after another, including unit and functional tests.&lt;/li&gt;&#10;&lt;li&gt;For each use case, run the tests and fix until all of them pass, and only&#10;then move on to the next one.&lt;/li&gt;&#10;&lt;li&gt;Run a final test of the full functionality and fix any issue found,&#10;repeating until the system is ready.&lt;/li&gt;&#10;&lt;/ol&gt;&#10;&lt;p&gt;The ten steps fall into four phases:&lt;/p&gt;</description></item><item><title>The .NET Libraries I Reach For</title><link>https://lab.artur-rios.tech/dotnet/library-recommendations/</link><pubDate>Wed, 21 Oct 2026 13:20:00 +0000</pubDate><guid>https://lab.artur-rios.tech/dotnet/library-recommendations/</guid><description>&lt;p&gt;Every new .NET project starts with the same handful of decisions. How will I&#10;test it? Where does fake data come from? How do I validate input, survive a&#10;flaky dependency, export a spreadsheet, run something every night? The base&#10;class library answers some of these. For the rest, I have settled on a short&#10;list of NuGet packages that I add almost without thinking.&lt;/p&gt;&#10;&lt;p&gt;This page is that list, with the reasoning written down. For each library I&#10;explain what it is for, why I use it, show a small example and say when I&#10;would pick something else. A recommendation is only as good as what it&#10;leaves out, so I also flag what I would want to know before adding a&#10;dependency: licence, maintenance, breaking changes, and in two cases events&#10;that every user of the library should know about.&lt;/p&gt;</description></item><item><title>Test Coverage in .NET: What It Measures and How to Collect It</title><link>https://lab.artur-rios.tech/dotnet/test-coverage/</link><pubDate>Wed, 21 Oct 2026 13:10:00 +0000</pubDate><guid>https://lab.artur-rios.tech/dotnet/test-coverage/</guid><description>&lt;p&gt;A pull request comes back with a comment: &amp;ldquo;coverage dropped from 84% to 81%&amp;rdquo;.&#10;What does the number mean? Which 3% went missing, and does it matter? Coverage&#10;is one of the few test metrics that every .NET tool can produce for free, and&#10;one of the easiest to misread. It is very good at answering &lt;em&gt;which code did no&#10;test run?&lt;/em&gt; and close to useless at answering &lt;em&gt;are the tests any good?&lt;/em&gt;&lt;/p&gt;</description></item><item><title>What Is a Unit Test? Where Unit Testing Came From and How to Write Good Ones</title><link>https://lab.artur-rios.tech/fundamentals/unit-tests/</link><pubDate>Tue, 20 Oct 2026 22:30:00 +0000</pubDate><guid>https://lab.artur-rios.tech/fundamentals/unit-tests/</guid><description>&lt;p&gt;You change one line in a pricing function and want to know whether anything&#10;broke. You could start the whole application, log in, fill a cart and look at&#10;the total, for every kind of cart you can think of. Or you could run a few&#10;hundred small programs that each call the pricing function with one input and&#10;check the answer, and know in under a second. Those small programs are &lt;strong&gt;unit&#10;tests&lt;/strong&gt;, and the second way of working is one of the biggest changes in how&#10;software has been written in the last thirty years: from testing as a phase at&#10;the end of a project, done by someone else, to testing as something every&#10;programmer does every few minutes.&lt;/p&gt;</description></item></channel></rss>