<?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>Forem: yuliadrogunova</title>
    <description>The latest articles on Forem by yuliadrogunova (@yuliadrogunova).</description>
    <link>https://forem.com/yuliadrogunova</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%2F3489313%2F2b02ed31-e534-4cce-b251-0250a667c195.jpeg</url>
      <title>Forem: yuliadrogunova</title>
      <link>https://forem.com/yuliadrogunova</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://forem.com/feed/yuliadrogunova"/>
    <language>en</language>
    <item>
      <title>Building CodeMapRT: Rethinking Regression Testing with Change-Mapping</title>
      <dc:creator>yuliadrogunova</dc:creator>
      <pubDate>Thu, 11 Sep 2025 13:05:26 +0000</pubDate>
      <link>https://forem.com/yuliadrogunova/building-codemaprt-rethinking-regression-testing-with-change-mapping-2hbb</link>
      <guid>https://forem.com/yuliadrogunova/building-codemaprt-rethinking-regression-testing-with-change-mapping-2hbb</guid>
      <description>&lt;blockquote&gt;
&lt;p&gt;How I turned endless full regressions into fast, targeted runs driven by code changes.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;h2&gt;
  
  
  Where It Started
&lt;/h2&gt;

&lt;p&gt;On large enterprise projects, regression testing always felt like a bottleneck. Every pull request meant running the entire suite — hundreds of tests, even for a one-line fix. Developers were frustrated. Pipelines got slower. CI bills grew.&lt;/p&gt;

&lt;p&gt;At some point, I asked myself: &lt;br&gt;
&lt;strong&gt;“Why are we testing everything, when only part of the code has changed?”&lt;/strong&gt;&lt;/p&gt;
&lt;h2&gt;
  
  
  Looking at the Problem
&lt;/h2&gt;

&lt;p&gt;Digging deeper, I noticed a few things:  &lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Most commits only touched a handful of modules.
&lt;/li&gt;
&lt;li&gt;Yet, the same giant regression pack kept running over and over.
&lt;/li&gt;
&lt;li&gt;Feedback to developers was delayed, which slowed down releases.
&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;The waste was obvious — we were validating a lot of code that never changed.  &lt;/p&gt;
&lt;h2&gt;
  
  
  The Turning Point
&lt;/h2&gt;

&lt;p&gt;The idea clicked: Instead of running all tests, map &lt;strong&gt;what changed in the codebase&lt;/strong&gt; to the &lt;strong&gt;tests that actually matter&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;That became the core principle behind &lt;strong&gt;CodeMapRT&lt;/strong&gt; — a framework that aligns code diffs with relevant test cases.  &lt;/p&gt;
&lt;h2&gt;
  
  
  How I Approached It
&lt;/h2&gt;
&lt;h3&gt;
  
  
  Step 1. Detecting What Changed
&lt;/h3&gt;

&lt;p&gt;I started simple — just grabbing modified files from Git:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="c"&gt;# Detect changed files in the last commit&lt;/span&gt;
git diff &lt;span class="nt"&gt;--name-only&lt;/span&gt; HEAD~1 | &lt;span class="nb"&gt;grep&lt;/span&gt; &lt;span class="s2"&gt;".java"&lt;/span&gt; &lt;span class="o"&gt;&amp;gt;&lt;/span&gt; changed-files.txt
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Then I introduced lightweight annotations in tests to specify which modules they cover:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight java"&gt;&lt;code&gt;&lt;span class="nd"&gt;@Test&lt;/span&gt;
&lt;span class="nd"&gt;@CoversModule&lt;/span&gt;&lt;span class="o"&gt;({&lt;/span&gt;&lt;span class="s"&gt;"auth"&lt;/span&gt;&lt;span class="o"&gt;,&lt;/span&gt; &lt;span class="s"&gt;"login"&lt;/span&gt;&lt;span class="o"&gt;})&lt;/span&gt;
&lt;span class="kd"&gt;public&lt;/span&gt; &lt;span class="kt"&gt;void&lt;/span&gt; &lt;span class="nf"&gt;loginTest&lt;/span&gt;&lt;span class="o"&gt;()&lt;/span&gt; &lt;span class="o"&gt;{&lt;/span&gt;
    &lt;span class="c1"&gt;// ...&lt;/span&gt;
&lt;span class="o"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Tests that didn’t match the changed files? Skipped.&lt;br&gt;
Mapping can be configured via annotations or other metadata sources,&lt;br&gt;
including coverage reports.&lt;/p&gt;
&lt;h2&gt;
  
  
  Step 2. Keeping It Safe
&lt;/h2&gt;

&lt;p&gt;Selective regression always carries a risk of missing hidden dependencies. &lt;br&gt;
To address this, CodeMapRT provides two safety layers:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;strong&gt;Fallback full run&lt;/strong&gt; — can be triggered for major releases or whenever coverage data looks incomplete.
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Safety tests&lt;/strong&gt; — a configurable set of additional checks added on top of the selected tests.
This way, even if only part of the suite is executed, critical scenarios remain validated.&lt;/li&gt;
&lt;/ol&gt;
&lt;h2&gt;
  
  
  Step 3. CI/CD Integration
&lt;/h2&gt;

&lt;p&gt;For real adoption, I built a CLI tool that detects changes, maps them to relevant tests, and outputs a filtered test list. &lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Example with GitHub Actions:&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight yaml"&gt;&lt;code&gt;&lt;span class="na"&gt;jobs&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
  &lt;span class="na"&gt;codemaprt&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
    &lt;span class="na"&gt;runs-on&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;ubuntu-latest&lt;/span&gt;
    &lt;span class="na"&gt;steps&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt;
      &lt;span class="pi"&gt;-&lt;/span&gt; &lt;span class="na"&gt;uses&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;actions/checkout@v3&lt;/span&gt;
      &lt;span class="pi"&gt;-&lt;/span&gt; &lt;span class="na"&gt;name&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="s"&gt;Run CodeMapRT&lt;/span&gt;
        &lt;span class="na"&gt;run&lt;/span&gt;&lt;span class="pi"&gt;:&lt;/span&gt; &lt;span class="pi"&gt;|&lt;/span&gt;
          &lt;span class="s"&gt;./codemaprt detect&lt;/span&gt;
          &lt;span class="s"&gt;./codemaprt select&lt;/span&gt;
          &lt;span class="s"&gt;./gradlew test --tests $(cat selected-tests.txt)&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;CodeMapRT can be integrated with any CI/CD system — GitHub Actions, Jenkins, GitLab CI, TeamCity — making it scalable for enterprise workflows.&lt;/p&gt;

&lt;h2&gt;
  
  
  Example Use Case
&lt;/h2&gt;

&lt;p&gt;Imagine a mobile banking app:  &lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;A developer modifies the login module.
&lt;/li&gt;
&lt;li&gt;Instead of re-running the entire regression suite, CodeMapRT analyzes the code changes and selects only the most relevant automated tests for that module. &lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Result&lt;/strong&gt;: targeted test execution, faster pipelines, quicker releases, and reduced infrastructure load.
&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  What Changed in Practice
&lt;/h2&gt;

&lt;p&gt;With CodeMapRT, regression testing no longer requires executing the full suite for every commit. Instead: &lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Small commits&lt;/strong&gt; trigger only the tests linked to the changed modules.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Medium features&lt;/strong&gt; run a focused subset instead of hundreds of unrelated tests.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Full regression runs&lt;/strong&gt; remain possible for major releases, but they no longer block day-to-day development.
&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;This approach shortens the feedback loop, optimizes CI/CD resources, and gives developers faster confidence in their changes. &lt;/p&gt;

&lt;h2&gt;
  
  
  Benefits of CodeMapRT
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Accelerates release cycles&lt;/strong&gt; — less time spent running unnecessary tests.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Maintains coverage&lt;/strong&gt; — critical paths are still validated.
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Reduces expenses&lt;/strong&gt; — fewer resources consumed in regression runs.
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Scales for enterprise projects&lt;/strong&gt; — adaptable to large and complex systems.
&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  The Results: Smarter Regression
&lt;/h2&gt;

&lt;p&gt;After building a demo project with 50 automated tests and integrating CodeMapRT:  &lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Without CodeMapRT:&lt;/strong&gt; all 50 tests ran on every commit.
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;With CodeMapRT:&lt;/strong&gt; the framework selected 28 tests directly linked to the changed module,
plus 5 additional safety tests (as described in Step 2) → 33 tests in total.
&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Result:&lt;/strong&gt; ~34% fewer test executions, reducing CI load while ensuring that critical scenarios remain validated.
&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;This demo shows a one-third reduction, but the approach scales: in enterprise projects with thousands of tests, CodeMapRT can deliver even greater efficiency, since typically only a small fraction of the suite is relevant to a given commit. &lt;/p&gt;

&lt;p&gt;You can find &lt;a href="https://github.com/yuliadrogunova/codemaprt/actions" rel="noopener noreferrer"&gt;demo results in the GitHub Actions&lt;/a&gt; of &lt;a href="https://github.com/yuliadrogunova/codemaprt" rel="noopener noreferrer"&gt;the CodeMapRT repository&lt;/a&gt;&lt;/p&gt;

</description>
      <category>testautomation</category>
      <category>softwaretesting</category>
      <category>qa</category>
      <category>cicd</category>
    </item>
  </channel>
</rss>
