<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:cc="http://cyber.law.harvard.edu/rss/creativeCommonsRssModule.html">
    <channel>
        <title><![CDATA[Stories by Muhamed Shamsheer on Medium]]></title>
        <description><![CDATA[Stories by Muhamed Shamsheer on Medium]]></description>
        <link>https://medium.com/@muhamed.shamsheer?source=rss-54a6970a575e------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*dmbNkD5D-u45r44go_cf0g.png</url>
            <title>Stories by Muhamed Shamsheer on Medium</title>
            <link>https://medium.com/@muhamed.shamsheer?source=rss-54a6970a575e------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Sat, 05 Dec 2026 16:09:49 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@muhamed.shamsheer/feed" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[From “Test Failed” to “Show Me What Happened”: Adding GStreamer Video Recording to Eclipse SWT…]]></title>
            <link>https://medium.com/@muhamed.shamsheer/from-test-failed-to-show-me-what-happened-adding-gstreamer-video-recording-to-eclipse-swt-5fa576f51482?source=rss-54a6970a575e------2</link>
            <guid isPermaLink="false">https://medium.com/p/5fa576f51482</guid>
            <dc:creator><![CDATA[Muhamed Shamsheer]]></dc:creator>
            <pubDate>Tue, 15 Sep 2026 08:33:34 GMT</pubDate>
            <atom:updated>2026-09-15T08:40:46.037Z</atom:updated>
            <content:encoded><![CDATA[<h3>From “Test Failed” to “Show Me What Happened”: Adding GStreamer Video Recording to Eclipse SWT Browser Tests in CI/CD</h3><p>Automated UI testing gives us confidence that an application works — but when a UI test fails in CI/CD, one question often remains:</p><blockquote><strong><em>What actually happened on the screen?</em></strong></blockquote><p>A stack trace can tell us <em>where</em> a test failed. Logs can tell us <em>what the application reported</em>. A screenshot can show us <em>one moment</em>.</p><p>But for UI-heavy applications, sometimes we need something more:</p><p><strong>A replay of the test execution.</strong></p><p>That was the motivation behind adding <strong>GStreamer-based video recording to Eclipse SWT Browser tests running in CI/CD</strong>.</p><p>The result was a relatively lightweight addition to the test infrastructure that provides a visual record of the test execution, making failures significantly easier to understand and debug.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1021/0*NqqfuYOB-jSBMwP1" /></figure><h3>The Challenge</h3><p>Our SWTBot tests run Eclipse in a CI environment and exercise SWT Browser-based UI functionality.</p><p>A typical flow looks like:</p><pre>Jenkins<br>   ↓<br>Eclipse<br>   ↓<br>SWTBot<br>   ↓<br>SWT Browser<br>   ↓<br>Web Application<br>   ↓<br>UI Validation</pre><p>When everything works, the test result is sufficient.</p><p>However, when a test fails intermittently, reproducing the exact CI state locally can be difficult.</p><p>For example, the failure could be related to:</p><ul><li>UI loading</li><li>Browser initialization</li><li>asynchronous web application rendering</li><li>unexpected dialogs</li><li>timing issues</li><li>an incorrect UI state</li><li>environment-specific behaviour</li></ul><p>Logs may provide clues, but they don’t always provide the complete picture.</p><p>We therefore wanted to add <strong>visual evidence of the test execution</strong>.</p><h4>Recording the CI Display</h4><p>The CI environment runs the Eclipse UI using a virtual display.</p><p>For Linux-based CI execution, we use <strong>Xvfb</strong> to provide the virtual X display required by Eclipse/SWT.</p><p>This gives us an environment similar to:</p><pre>                CI Agent<br>                    │<br>                    ▼<br>                  Xvfb<br>                    │<br>                    ▼<br>             Virtual Display<br>                    │<br>                    ▼<br>              Eclipse + SWT<br>                    │<br>                    ▼<br>               SWT Browser</pre><p>Once the UI is rendered on the virtual display, that display can be captured by GStreamer.</p><p>The architecture therefore becomes:</p><pre>                  Jenkins<br>                     │<br>                     ▼<br>                   Xvfb<br>                     │<br>                     ▼<br>            Virtual X Display<br>                     │<br>             ┌───────┴────────┐<br>             │                │<br>             ▼                ▼<br>       Eclipse/SWT        GStreamer<br>             │                │<br>             ▼                │<br>        SWT Browser           │<br>             │                │<br>             └───────► Screen Capture<br>                              │<br>                              ▼<br>                         Video File</pre><h4>GStreamer in the CI Pipeline</h4><p>GStreamer provides the video pipeline used to capture and encode the display.</p><p>At a high level:</p><pre>Virtual Display<br>       ↓<br>Screen Capture<br>       ↓<br>Video Conversion<br>       ↓<br>Video Encoding<br>       ↓<br>Container<br>       ↓<br>MKV Video</pre><p>For example, the CI environment can construct a pipeline conceptually similar to:</p><pre>ximagesrc ! videoconvert ! vp8enc ! matroskamux ! filesink location=test.mkv</pre><p>The exact pipeline configuration depends on the CI environment and the GStreamer plugins available on the build agent.</p><p>The important part is that <strong>the CI script controls the recording lifecycle</strong>.</p><h4>No Changes to the SWTBot Test Code</h4><p>One of the useful aspects of this implementation is that the recording is handled outside the test implementation.</p><p>The SWTBot tests continue to execute normally.</p><p>The CI script is responsible for:</p><pre>Prepare environment<br>        ↓<br>Start virtual display<br>        ↓<br>Start recording<br>        ↓<br>Run SWTBot tests<br>        ↓<br>Stop recording<br>        ↓<br>Finalize video<br>        ↓<br>Publish artifact</pre><p>So the test itself doesn’t need to know whether recording is enabled.</p><p>This keeps the recording capability separate from the test logic.</p><h4>Publishing the Video as a CI Artifact</h4><p>After the test execution completes, the CI script finalizes the video and publishes it directly as a build artifact.</p><p>For example:</p><pre>CI Build<br>│<br>├── Test Results<br>├── Logs<br>├── Screenshots<br>└── Video<br>     └── SWTBrowserTest.mkv</pre><p>This means that when investigating a failed build, developers can access the recorded test execution along with the existing CI artifacts.</p><p>The video becomes another source of debugging information.</p><h4>What the Recording Shows</h4><p>Consider a test that opens an SWT Browser and interacts with a web application.</p><p>The recording can show the complete sequence:</p><pre>Eclipse starts<br>      ↓<br>SWT Browser opens<br>      ↓<br>Web application loads<br>      ↓<br>Loading state<br>      ↓<br>UI renders<br>      ↓<br>User interaction simulated by SWTBot<br>      ↓<br>Application changes<br>      ↓<br>Unexpected state<br>      ↓<br>Test fails</pre><p>Instead of trying to reconstruct this sequence from multiple log messages, we can simply watch the recording.</p><p>This is especially useful when the failure is intermittent.</p><h4>Why This Is Useful for SWT Browser Testing</h4><p>SWT Browser testing can involve several layers:</p><pre>┌───────────────────────────────┐<br>│          SWTBot               │<br>├───────────────────────────────┤<br>│          Eclipse SWT          │<br>├───────────────────────────────┤<br>│        SWT Browser            │<br>├───────────────────────────────┤<br>│     Browser Engine            │<br>├───────────────────────────────┤<br>│ HTML / JavaScript / React     │<br>└───────────────────────────────┘</pre><p>A problem in one layer can result in a test failure somewhere else.</p><p>The video gives us a visual view of the complete Eclipse UI during that execution.</p><p>It doesn’t replace logs or proper synchronization, but it provides another valuable debugging signal.</p><h4>Recording Lifecycle</h4><p>The CI script can manage the recording independently from the application and tests.</p><pre>┌──────────────────────┐<br>│ Prepare CI Env       │<br>└──────────┬───────────┘<br>           ↓<br>┌──────────────────────┐<br>│ Start Xvfb           │<br>└──────────┬───────────┘<br>           ↓<br>┌──────────────────────┐<br>│ Start GStreamer      │<br>└──────────┬───────────┘<br>           ↓<br>┌──────────────────────┐<br>│ Run SWTBot Tests     │<br>└──────────┬───────────┘<br>           ↓<br>┌──────────────────────┐<br>│ Stop GStreamer       │<br>└──────────┬───────────┘<br>           ↓<br>┌──────────────────────┐<br>│ Publish MKV Artifact │<br>└──────────────────────┘</pre><p>The existing test execution remains unchanged.</p><p>The CI pipeline simply provides an additional recording layer around it.</p><h4>Advantages</h4><h4>Visual debugging</h4><p>Developers can see what happened during the actual CI test execution instead of relying only on logs.</p><h4>Easier investigation of intermittent failures</h4><p>The recording preserves the state of the UI at the time of the test, which can be particularly useful for failures that are difficult to reproduce locally.</p><h4>Captures the Eclipse UI</h4><p>Because the virtual display is recorded, the video can include Eclipse views, SWT controls, dialogs, and the embedded SWT Browser.</p><h4>No application changes</h4><p>The recording is implemented at the CI environment level, so the application and SWTBot test logic don’t need recording-specific changes.</p><h4>Simple CI integration</h4><p>The recording can be started and stopped directly from the CI script and published as part of the build artifacts.</p><h4>Better test observability</h4><p>Logs tell us what the software reported. Test results tell us what failed. Video provides another dimension: <strong>what was happening visually</strong>.</p><h4>Important Things to Consider</h4><h4>1. GStreamer dependencies</h4><p>The CI agent needs the GStreamer components required by the selected pipeline.</p><p>It’s useful to verify the available elements before integrating the pipeline into the build.</p><pre>gst-inspect-1.0</pre><h4>2. Xvfb configuration</h4><p>The virtual display resolution affects what appears in the recording.</p><p>For example:</p><pre>1600 × 1200</pre><p>A suitable resolution should be selected based on the Eclipse UI used by the tests.</p><h4>3. Video size</h4><p>Video artifacts consume more storage than traditional test reports.</p><p>Consider:</p><ul><li>resolution</li><li>frame rate</li><li>encoder settings</li><li>test duration</li><li>artifact retention</li></ul><p>For CI debugging, the objective is usually <strong>clear visibility rather than maximum video quality</strong>.</p><h4>4. Cleanly stop the recording</h4><p>The CI script should ensure that GStreamer is stopped even when the test execution fails.</p><p>Otherwise, the generated video may not be finalized correctly.</p><p>The recording lifecycle should therefore be handled carefully in the CI script.</p><h4>5. Artifact retention</h4><p>Not every test run necessarily needs to keep videos forever.</p><p>Depending on the project, recordings can be retained according to CI artifact policies.</p><p>For example:</p><pre>Successful build<br>      ↓<br>Normal artifacts</pre><pre>Failed build<br>      ↓<br>Test results + Logs + Video evidence</pre><p>This can help control storage while keeping useful debugging information.</p><h4>From Test Failure to Visual Evidence</h4><p>Before video recording:</p><pre>             Test Failure<br>                  │<br>                  ▼<br>                Logs<br>                  │<br>                  ▼<br>             Stack Trace<br>                  │<br>                  ▼<br>          Try to reproduce</pre><p>After adding recording:</p><pre>             Test Failure<br>                  │<br>          ┌───────┴────────┐<br>          ▼                ▼<br>        Logs             Video<br>          │                │<br>          │                ▼<br>          │        Watch execution<br>          │                │<br>          └───────┬────────┘<br>                  ▼<br>            Understand Issue</pre><p>This is the main reason the addition is valuable.</p><h4>Conclusion</h4><p>Adding GStreamer video recording to Eclipse SWT Browser tests was a relatively small CI/CD enhancement, but it adds an important capability to UI test infrastructure.</p><p>The architecture is simple:</p><pre>Jenkins<br>   ↓<br>Xvfb<br>   ↓<br>Eclipse + SWTBot<br>   ↓<br>SWT Browser<br>   ↓<br>GStreamer<br>   ↓<br>MKV Video<br>   ↓<br>CI Artifact</pre><p>Most importantly, <strong>the recording is handled entirely by the CI script</strong>, keeping the application and SWTBot test implementation unchanged.</p><p>When a UI test fails, we now have more than a test result and a stack trace.</p><p>We have a visual record of the execution.</p><blockquote><strong><em>Logs tell us what was reported.<br>Test results tell us what failed.<br>Video helps us see what happened.</em></strong></blockquote><p>That extra visibility can make debugging CI-based Eclipse UI tests considerably easier.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=5fa576f51482" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>