Running Tests in your IDE

Prev Next

This article describes how to run robot tests from your development environment. We’re using VS Code and will show you how to use this IDE, but it’s not a requirement.

1. Python Setup

When you open your project in VS Code for the first time, you’ll be automatically prompted to select a Robot Framework:

Choose your desired Python version:

2. Managing Test Files

On the leftmost menu of your VsCode, select the test-tube icon. Here’s where you’ll find all existing tests:

3. Managing Test Runs

Open one of the test files and you’ll find that each test has a play icon in the margin of the code editor. You can use it to run/rerun individual tests.

4. Debug Mode

Hold CTRL to switch to debug mode. Then breakpoints can also be set in the test itself:

Here’s how you can add/remove breakpoints:

5. Stopping Tests

Finally, if needed, you can stop a running test with the red icon at the top of the editor. Just be aware that if you’ve got any cleanup functions built into your tests, they won’t be run when the test is interrupted:

6. Viewing Test Runs in the Browser

Robot tests simulate clicks in a real browser. So you can view the test progress in a separate browser window: