Robot Log Enhancer Module

Oct 6, 2024

jssvelterobot

At work, we use robot to automate some tests, and we often have to inspect the resulting log file to see what happened. From there, we have to navigate though it to find how a regression made its way to our application.

There was a few things bugging me about the log file:

  1. Navigating through the log file is a pain. I feel like I need to scroll so much distance to atteign each failing test.
  2. When a test fail on a Wait Until Keyword Succeeds keyword, there is so much repeated and redundant information while only the last iteration is relevant.
  3. There is no easy way to relaunch only the failing tests.

JavaScript injection

I created a JavaScript module using Vite and Svelte that could be injected in any log.html file. The module will inject a footer at the bottom of the page with a solution for every problem I had.

An example of the footer

Features

  • Automatically collapses all children of the “Wait Until Keyword Succeeds” keyword except for the last one, focusing on the final failing example.
  • Adds navigation buttons to move between failing tests (previous/next), with keyboard support (left/right arrow keys).
  • Includes a button to open a modal that allows copying failing tests as command-line arguments, making it easy to rerun only the failed tests.
An example of the modal

The source code

If you are interested in this module or you just want to see the code, you can find it on GitHub - robot-log-enhancer-module.