Working With Command Line


Advertisements

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

Report execution

Log

Log execution

Conclusion

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


Video

Cyber Security : Mr Robot Real Life Scenarios Vol 1

17 Lectures 1 hours

Musab Zayadneh

Video

Cyber Security : Mr Robot Real Life Scenarios Vol 2

11 Lectures 31 mins

Musab Zayadneh

Video

UiPath Robotic Process Automation Introduction

20 Lectures 1.5 hours

Maksym Rudnyi

Video

Robot Framework and Selenium

25 Lectures 3 hours

Kamal Kishor Girdher

Video

Obstacle Avoiding Robot with Raspberry Pi

10 Lectures 34 mins

Ashraf Said

Video

Arduino with Robot Operating System (ROS)

29 Lectures 2.5 hours

Ashraf Said

Advertisements