Working With Command Line


In this chapter, we will learn how to make use of the command line to run test cases.

To begin with, let us open the command prompt and go to the folder where your test cases are saved. We have created test cases and saved in the folder robotframework in C Drive.

Open command prompt

Test cases created so far are available in the folder C:\robotframework.

If you have saved your project as a file, the command is −

robot -T nameoftestcase.robot

If you have saved your project as a directory, the command is −

robot -T projectname testsuite

We will run one of the test created from the folder as shown below −

test created

The output, log and report paths are displayed at the end as shown above.

The following screenshot shows the execution details −

screenshot execution


Report execution


Log execution


We can use command line to execute robot test cases. The details of the test case pass or fail are displayed in the command line along with log and report URLs.

Useful Video Courses


Cyber Security : Mr Robot Real Life Scenarios Vol 1

17 Lectures 1 hours

Musab Zayadneh


Cyber Security : Mr Robot Real Life Scenarios Vol 2

11 Lectures 31 mins

Musab Zayadneh


UiPath Robotic Process Automation Introduction

20 Lectures 1.5 hours

Maksym Rudnyi


Robot Framework and Selenium

25 Lectures 3 hours

Kamal Kishor Girdher


Obstacle Avoiding Robot with Raspberry Pi

10 Lectures 34 mins

Ashraf Said


Arduino with Robot Operating System (ROS)

29 Lectures 2.5 hours

Ashraf Said