How-to test Robot Framework with RCC and Visual Studio Code on Windows using a local user

How-to test Robot Framework with RCC and Visual Studio Code on Windows using a local user

This article shows how to test a Robot Framework project on Windows using RCC and VS Code with the RobotCode extension.

LAST TESTED ON CHECKMK 2.4.0P9

Table of Contents

Testing under a local user account is required because some browsers (e.g., Microsoft Edge) will not run correctly under the default Windows system account. 

 

Background

Synthetic Monitoring integrates Robot Framework into Checkmk for monitoring browser-based tests. Before setting up Robotmk in Checkmk, it is important to validate that the robot project runs correctly on its own:

  • Dependencies can be installed successfully with RCC.

  • The robot can be executed manually from Visual Studio Code.

  • log.html is generated and viewable.

This same workflow can also be reused when testing customer-provided robot tests. It helps ensure the robot runs correctly in isolation before troubleshooting issues on the Checkmk agent side.


Step-by-step guide

Step 1: Prepare Windows environment

  1. Set up a Windows test environment (for example, a Windows Server VM created with Vagrant).

  2. Install VSCodium
    VSCodium is a community-driven, freely-licensed binary distribution of Microsoft’s editor VS Code.

  3. Install the RobotCode extension in VSCodium.

    image-20251009-141112.png



  4. In Settings, enable Simple Browser to view log.html.

    image-20251009-141121.png

 

Step 2: Install RCC

  1. Create a bin folder in your user directory, e.g.: C:\Users\myuser\bin

  2. Download the latest RCC binary from Robocorp RCC

    Due to their EULA, these binaries can only be used by individuals and not by companies.

     

  3. Place the binary inside the bin folder.

  4. Add the bin folder to the User PATH environment variable.

image-20251009-141132.png

 

 

Step 3: Create robot project folder

  1. In Documents, create a new folder (e.g., C:\Users\myuser\Documents\checkmk_ui_login)

  2. Inside the folder, add the following files:

    • robot.yaml

    • conda.yaml

    • regular_test.robot (sample test file)

Attachments (sample project files): checkmk_ui_login.7z

Note: In the search.robot sample test file, update the following to match your environment:

  • ${URL}

  • ${USERNAME}

  • ${PASSWORD}

If these values are not updated, the robot test will fail during login.

 

Step 4: Initialize the environment

  1. Open a Command Prompt in the project folder.

  2. Run: rcc task shell

This prepares the Python environment and initializes the browser driver.

image-20251009-141145.png

 

 

Step 5: Open and test with Visual Studio Code

  1. Open a Command Prompt in the project folder and run "codium ."

  2. In VSC:

    • Open the regular_test.robot file.

    • Run the test directly using the RobotCode extension.

image-20251009-141154.png
image-20251009-141203.png

 

Step 6: Validate results

  1. After execution, confirm that:

    • The test runs successfully.

    • log.html is generated.

    • Open log.html using VSC Simple Browser.

image-20251009-141212.png

 

 

Related articles

Robotmk Documentation on GitHub