<?xml version="1.0" encoding="UTF-8"?>
<!-- generator="FeedCreator 1.8" -->
<?xml-stylesheet href="https://www.baszerr.eu/lib/exe/css.php?s=feed" type="text/css"?>
<rss version="2.0">
    <channel xmlns:g="http://base.google.com/ns/1.0">
        <title>BaSzErr - blog:2022:07:10</title>
        <description></description>
        <link>https://www.baszerr.eu/</link>
        <lastBuildDate>Wed, 06 May 2026 09:38:16 +0000</lastBuildDate>
        <generator>FeedCreator 1.8</generator>
        <image>
            <url>https://www.baszerr.eu/lib/exe/fetch.php?media=wiki:dokuwiki.svg</url>
            <title>BaSzErr</title>
            <link>https://www.baszerr.eu/</link>
        </image>
        <item>
            <title>2022-07-10_-_automatic_test_groups</title>
            <link>https://www.baszerr.eu/doku.php?id=blog:2022:07:10:2022-07-10_-_automatic_test_groups</link>
            <description>
&lt;h1 class=&quot;sectionedit1&quot; id=&quot;automatic_test_groups&quot;&gt;2022-07-10 - automatic test groups&lt;/h1&gt;
&lt;div class=&quot;level1&quot;&gt;

&lt;p&gt;
we all do automated tests. there are however a lot of differences in how test binaries are organized in the project. some of the patterns i&amp;#039;ve seen in the past are:
&lt;/p&gt;
&lt;ul&gt;
&lt;li class=&quot;level1&quot;&gt;&lt;div class=&quot;li&quot;&gt; unit tests, module tests and integration tests are kept in 3 separate binaries.&lt;/div&gt;
&lt;/li&gt;
&lt;li class=&quot;level1&quot;&gt;&lt;div class=&quot;li&quot;&gt; there is a “automated tests” binary per module.&lt;/div&gt;
&lt;/li&gt;
&lt;li class=&quot;level1&quot;&gt;&lt;div class=&quot;li&quot;&gt; there are separate UTs, MTs and ITs binaries for each module.&lt;/div&gt;
&lt;/li&gt;
&lt;li class=&quot;level1&quot;&gt;&lt;div class=&quot;li&quot;&gt; there are multiple separate binaries with tests of each element of module(s).&lt;/div&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;
split into UTs, MTs and ITs is very common. after all this is how we split tests in &lt;a href=&quot;https://en.wikipedia.org/wiki/v-model&quot; class=&quot;interwiki iw_wp&quot; title=&quot;https://en.wikipedia.org/wiki/v-model&quot;&gt;v-model&lt;/a&gt;. making this split also per-module is common to make builds faster (UTs build cycles are short). this is however not the best pattern out there, as it misses the key UX requirement from devs – test execution time! truly – when i work on functionality X, i do not really care if the test is UT, MT or IT, as long as i can execute it fast! slow-running tests i can run later, once i&amp;#039;m sure i&amp;#039;ve polished out everything on with fast tests. so the natural split is:
&lt;/p&gt;
&lt;ul&gt;
&lt;li class=&quot;level1&quot;&gt;&lt;div class=&quot;li&quot;&gt; fast (running) tests&lt;/div&gt;
&lt;/li&gt;
&lt;li class=&quot;level1&quot;&gt;&lt;div class=&quot;li&quot;&gt; slow (running) tests&lt;/div&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;
to make things elastic and well encapsulated, binaries shall also be created on a per-module basis.
&lt;/p&gt;

&lt;p&gt;
this leaves us with final test group – manual test binaries. these are binaries, that cannot be easily automated. eg. tests that need special HW components connected (like physical port I/O, to talk to 3rd party module), or output processing is not easy to automate, yet easy to verify visually (eg. edge detection on a real-life image). i&amp;#039;ve talked a bit more about these during my &lt;a href=&quot;https://www.youtube.com/watch?v=NGLid96ceEo&quot; class=&quot;urlextern&quot; title=&quot;https://www.youtube.com/watch?v=NGLid96ceEo&quot; rel=&quot;ugc nofollow&quot;&gt;the taming of the Software: C++, embedded... and more&lt;/a&gt; tech talk – please watch it, if you&amp;#039;re interested in some more details here. for the sake of discussion here we&amp;#039;ll just create a 3rd group of tests: manual tests.
&lt;/p&gt;

&lt;p&gt;
to put it a bit more into &lt;a href=&quot;https://en.wikipedia.org/wiki/c++&quot; class=&quot;interwiki iw_wp&quot; title=&quot;https://en.wikipedia.org/wiki/c++&quot;&gt;c++&lt;/a&gt; context, i&amp;#039;m now shifting towards following naming standard:
&lt;/p&gt;
&lt;ul&gt;
&lt;li class=&quot;level1&quot;&gt;&lt;div class=&quot;li&quot;&gt; fast (running) tests – &lt;code&gt;*.ft.cpp&lt;/code&gt;&lt;/div&gt;
&lt;/li&gt;
&lt;li class=&quot;level1&quot;&gt;&lt;div class=&quot;li&quot;&gt; slow (running) tests – &lt;code&gt;*.st.cpp&lt;/code&gt;&lt;/div&gt;
&lt;/li&gt;
&lt;li class=&quot;level1&quot;&gt;&lt;div class=&quot;li&quot;&gt; manual tests – &lt;code&gt;*.mt.cpp&lt;/code&gt;&lt;/div&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;
so now for each module i get 1 or more binaries: fast tests, slow tests and some number of manual tests (each binary helps to tests a single feature). for the typical code, we should be done with just “fast tests”. some may include “slow test” (eg. external components setup, or CPU-intensive testing) and some, mostly low-level HW features testing in embedded world (and maybe some visuals), will result in “manual test”.
&lt;/p&gt;

&lt;p&gt;
now running tests is simple and practical. daily, during development, you run “fast tests”. once you think you&amp;#039;re done with coding, you run “slow tests” to confirm if you&amp;#039;re on track. “manual tests” would be typically touched only when you change the exact functionality, that the test address (eg. RS-232 manual I/O test would only be ran, if implementation of RS-232 stack is changed).
&lt;/p&gt;

&lt;/div&gt;
</description>
            <author>anonymous@undisclosed.example.com (Anonymous)</author>
            <pubDate>Sun, 10 Jul 2022 18:40:01 +0000</pubDate>
        </item>
        <item>
            <title>2022-07-10_-_lemur_s_bobik</title>
            <link>https://www.baszerr.eu/doku.php?id=blog:2022:07:10:2022-07-10_-_lemur_s_bobik</link>
            <description>
&lt;h1 class=&quot;sectionedit1&quot; id=&quot;lemur_s_bobik&quot;&gt;2022-07-10 - lemur&amp;#039;s bobik&lt;/h1&gt;
&lt;div class=&quot;level1&quot;&gt;

&lt;p&gt;
a friend of mine sent me a description of a &lt;a href=&quot;https://www.elektroda.pl/rtvforum/topic3904198.html&quot; class=&quot;urlextern&quot; title=&quot;https://www.elektroda.pl/rtvforum/topic3904198.html&quot; rel=&quot;ugc nofollow&quot;&gt;home-made electronic toy for a child&lt;/a&gt;. that in turn reminded me of a &lt;a href=&quot;https://github.com/el-bart/lemurs_bobik&quot; class=&quot;urlextern&quot; title=&quot;https://github.com/el-bart/lemurs_bobik&quot; rel=&quot;ugc nofollow&quot;&gt;Lemur&amp;#039;s bobik&lt;/a&gt; – pandemic-times project for my son, aimed at learning basics of programming.
&lt;/p&gt;

&lt;p&gt;
&lt;a href=&quot;https://www.baszerr.eu/lib/exe/detail.php?id=blog%3A2022%3A07%3A10%3A2022-07-10_-_lemur_s_bobik&amp;amp;media=blog:2022:07:10:inside.jpg&quot; class=&quot;media&quot; title=&quot;blog:2022:07:10:inside.jpg&quot;&gt;&lt;img src=&quot;https://www.baszerr.eu/lib/exe/fetch.php?w=400&amp;amp;tok=d61cd5&amp;amp;media=blog:2022:07:10:inside.jpg&quot; class=&quot;media&quot; loading=&quot;lazy&quot; title=&quot;robot&amp;#039;s interior&quot; alt=&quot;robot&amp;#039;s interior&quot; width=&quot;400&quot; /&gt;&lt;/a&gt;
&lt;/p&gt;

&lt;p&gt;
to control it, you have to insert a program, by providing a predefined set of actions, similar to programming in &lt;a href=&quot;https://en.wikipedia.org/wiki/Logo_(programming_language)&quot; class=&quot;interwiki iw_wp&quot; title=&quot;https://en.wikipedia.org/wiki/Logo_(programming_language)&quot;&gt;logo&lt;/a&gt;. available commands are:
&lt;/p&gt;
&lt;ul&gt;
&lt;li class=&quot;level1&quot;&gt;&lt;div class=&quot;li&quot;&gt; forward&lt;/div&gt;
&lt;/li&gt;
&lt;li class=&quot;level1&quot;&gt;&lt;div class=&quot;li&quot;&gt; backward&lt;/div&gt;
&lt;/li&gt;
&lt;li class=&quot;level1&quot;&gt;&lt;div class=&quot;li&quot;&gt; turn left&lt;/div&gt;
&lt;/li&gt;
&lt;li class=&quot;level1&quot;&gt;&lt;div class=&quot;li&quot;&gt; turn right&lt;/div&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;
5th button is “start”, that begins program execution.
&lt;/p&gt;

&lt;p&gt;
robot was built during 1st COVID-19 lockdown in PL, so i tried to use only parts that i had available (including unipolar stepper motors from an old printer :D). this ended up in a funny mixture of SMD and THT components. there is a TODO list for addressing some of the shortcomings of the current design. my son is now also 2 years older, so i guess it would be even more fun for him now. :)
&lt;/p&gt;

&lt;/div&gt;
</description>
            <author>anonymous@undisclosed.example.com (Anonymous)</author>
            <pubDate>Sun, 10 Jul 2022 18:14:45 +0000</pubDate>
        </item>
    </channel>
</rss>
