Robot Framework Interview Questions

Name the supported file formats for the Robot Framework?

The Robot Framework files can be plain text format (most commonly .robot format, or .txt format) or in tab-separated format (TSV format). Plain text test data can be embedded in reStructured Text Files.

Where can the keywords in the Robot Framework be imported from?

Keywords can be imported from test libraries or resource files. Keywords can also be created in the keyword table of the test case file itself.

What are the test setup and teardown? Give examples

A test setup is something that is executed before a test case, and a test teardown is executed after a test case. In Robot Framework setups and teardowns are just normal keywords with possible arguments.

For example, opening a browser before the start of a test case and closing the browser post-execution can be examples of test setup and teardown

Can you increase or decrease the speed of execution of test cases using Selenium library

Yes, we can control the speed of execution using Set Selenium Speed keyword

How will you convert keyword-driven test cases into data-driven test cases? Explain with example.

Some test libraries are distributed with Robot Framework and these libraries are called standard libraries. The BuiltIn library is special because it is taken into use automatically and thus its keywords are always available. Other standard libraries need to be imported in the same way as any other libraries, but there is no need to install them. The available normal standard libraries are BuiltIn, Collections, DateTime, Dialogs, OperatingSystem, Process, Screenshot, String, Telnet, XML.

What are the 3 different types of variables in the Robot Framework?

Answer : Scalar variable, List variable, and Dictionary variable

Name the dependency packages that you need to install for RIDE editor

wxPython and pywin32

What is a Jenkins freestyle project?

A Jenkins project is simply a repeatable build job that can contain steps and post-build actions. Standard options are available within a Jenkins freestyle project and include the ability to configure build triggers, enable project-based security and parameterize the Jenkins project.

What are object locators in Selenium?

Selenium provides a number of Locators to precisely locate a GUI element. The different types of Locators in Selenium IDE are ID, Name, Class, CSS Selector, LinkText, XPath, etc. (Refer Lectures 43-50)

What are the different drivers available in Selenium Web Driver?

The different drivers available in WebDriver are:

  • FirefoxDriver (geckodriver)
  • InternetExplorerDriver
  • ChromeDriver
  • SafariDriver
  • OperaDriver
  • AndroidDriver
  • IPhoneDriver
  • HtmlUnitDriver
What keyword should you use to hover mouse on Web Element?

The keyword is Mouse Over in the Selenium2Library

Mention a couple of libraries that you can use for Web Services automation in Robot Framework

HTTP library.HTTP and Requests

What is a Request Payload?

The request data which is present in the body part of every HTTP message is referred to as Payload. In Restful web service, the payload can only be passed to the recipient through the POST method. There is no limit of sending data as payload through the POST method but the only concern is that more data with consuming more time and bandwidth. This may consume much of the user’s time also

Mention some key characteristics of REST

Some key characteristics of REST include -REST is stateless, therefore the SERVER has no state (or session data) With a well-applied REST API, the server could be restarted between two calls as every data is passed to the server Web service mostly uses POST method to make operations, whereas REST uses GET to access resources

Name the important HTTP REST methods

HTTP methods supported by REST are:

  • GET: It requests a resource at the request URL. It should not contain a request body as it will be discarded
  • POST: It submits information to the service for processing; it should typically return the modified or new resource
  • PUT: At the request URL it updates the resource
  • DELETE: At the request URL it removes the resource
  • OPTIONS: It indicates which techniques are supported
  • HEAD: About the request URL it returns meta information
Name the protocol which is used by RESTful web services

RESTful web services use a famous web protocol i.e. HTTP protocol. This serves as a medium of data communication between client and server. HTTP standard methods are used to access resources in RESTful web service architecture.

What are RESTful web services?

RESTful web service implementation defines the method of accessing various resources that are required by the client and he has sent the request to the server through the browser. The important aspects of this implementation include:

  • Resources
  • Request Headers
  • Request Body
  • Response Body
  • Status codes
What is a Jenkins pipeline?

Jenkins Pipeline (or simply "Pipeline") is a suite of plugins which supports implementing and integrating continuous delivery pipelines into Jenkins

What do you understand by Continuous Integration?

Continuous integration (CI) is a software engineering practice in which isolated changes are immediately tested and reported on when they are added to a larger codebase. Continuous Integration (CI) is a development practice where developers integrate code into a shared repository frequently, preferably several times a day. Each integration can then be verified by an automated build and automated tests

What do you understand by ‘conflict’ in git?

A conflict arises when the commit that has to be merged has some change in one place, and the current commit also has a change at the same place

What are the 3 different types of variables in the Robot Framework?

Scalar variable, List variable, and Dictionary variable

How will you view the commit history of the git repository?

Use the command git log; this command display commits list(in chronological order) from the latest to old one in descending order of the committed date. To make the output compact, we can use git log - - oneline.

What are standard libraries in the Robot Framework? Name the standard libraries.

Some test libraries are distributed with Robot Framework and these libraries are called standard libraries. The BuiltIn library is special because it is taken into use automatically and thus its keywords are always available.

Other standard libraries need to be imported in the same way as any other libraries, but there is no need to install them. The available normal standard libraries are BuiltIn, Collections, DateTime, Dialogs, OperatingSystem, Process, Screenshot, String, Telnet, XML.

What is the difference between Run Keyword If and Run Keyword Unless?

Run Keyword If will run the keyword with the given arguments if the condition is true, whereas Run Keyword Unless will run the keyword with the given keywords if the condition is false. Additionally, Run Keyword If support ELSE and ELSE IF branches, but Run Keyword Unless doesn’t support

What is the difference between Implicit Wait and Explicit Wait?

An Implicit Wait is an instruction for the Driver to wait for a certain amount of time when trying to find an element if it’s not immediately available and is generally implemented using keywords like – Wait Until Element Contains, Wait Until Element is Enabled, Wait Until Element is Visible. Explicit Wait, on the other hand, instructs the Driver to sleep for a certain time before proceeding further in the code and is generally implemented using sleep n (does nothing for n seconds)

Imagine you have the manual test cases as individual rows in an Excel file which you would want to read one test case name at a time. Explain how you will do the same.

First, we need to install ExcelLibrary. One way will be – get the number of rows in the worksheet using the keyword Get Row Count, and then loop thru the column Test Case Name using the keyword Read Cell Data By Name (sheetname, cell_name)

What do you understand by conflict in git?

A conflict arises when the commit that has to be merged has some change in one place, and the current commit also has a change at the same place.

What is git, and why do we use it?

GIT is a Distributed Version Control System (DVCS) and Source Code Management System (SCMS) which can track

changes to a file and lets you revert back to any particular change. It can also handle small and large projects with efficiency and

speed.

  • Any project can use GIT without any restrictions.
  • It is collaboration-friendly.
  • It has superior disk utilization and network performance.
  • There can be only one GIT directory per repository.
  • High availability, data redundancy, and replication.
What are the different types of automation framework?

Different types of the framework include:

  • Keyword-driven framework
  • Data-Driven framework
  • Hybrid Framework (Combination of the above two)
  • Linear Scripting (Record and Playback)
What are the steps involved in the pre-automation phase?

The steps involved in the pre-automation phase are :

Business Feasibility Analysis (ROI analysis)

Technical Feasibility Analysis

Framework Evaluation

Tool (along with scripting language and IDE) evaluation

How will install a library in the Robot Framework?

We can install by running the command – pip install from Command prompt. Alternatively, you can download the zip package, extract it and install it by running setup.py install on the command prompt in the created directory.

Name a few editors for the Robot Framework?

RIDE, PyCharm, and RED

Q 10. How will you upgrade the Robot Framework?

pip install --upgrade robot framework

How do you identify test cases which are suitable for automation?

Identifying the best test cases for automation is the most important step towards automation. This starts with Business Feasibility analysis or identifying the test cases that would give the desired Return on Investment.

Assume, after ROI analysis, it is found that 90 out of 100 test cases will be executed multiple times and have the desired ROI.

The next step is to carry out the technical feasibility and find how many of the 90 test cases are technically feasible to automate. There might be test cases that involve manual intervention (like scanning checks) or test cases built on technology

which the available automation tools cannot understand, or test cases that involve Captcha. Say 10 test cases are like that. So we come up with a set of 80 test cases which are candidates for automation.

What do you understand by the term automation coverage?

Automation coverage or Automation Test Coverage denotes the test cases automated as a percentage of the total

automation-coverage-formula

Give examples of test cases you think should not be automated?
  • One-off execution or test cases seldom executed
  • Test cases that need manual intervention
  • Exploratory testing
What tasks would you do during the automation phase?

The automation phase starts with framework development (if the framework is not in place) and framework customization, followed by script development.

tasks-during-automation-phase

Name a few metrics related to Test Automation?

automation-coverage-formula

percentage-of-test-script-passed



error-discovery-rate

Comment / Suggestion Section
Point our Mistakes and Post Your Suggestions

Subscribe to See Videos

Subscribe to my Youtube channel for new videos : Subscribe Now