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.

Advertisements