About the Robot Framework

The Robot Framework is a generic test automation framework for acceptance testing and acceptance test-driven development (ATDD).

It has easy-to-use tabular test data syntax and it uses the keyword-driven testing approach.

Robot Framework Concepts

The Robot Framework modular architecture can be extended with bundled and self-made test libraries.

A test suite consists of a file containing test cases. A directory containing these suite files creates a nested structure of test suites.

Robot is capable of generating a report for each execution in its specific XML format (xUnit) as well as HTML data formats.

The native Robot Framework's XML format has a well-defined scheme and represents the pattern in which the framework executes the keywords given in that particular test suite. 

Importing Robot Framework XML reports

Each Robot test case can be marked with a Tag identifying the requirement being tested; it also can be a Test definition already present in Jira. Tagging a requirement in a test case will create a link between the test case and the requirement. Identifying a test case with an issue key Tag, will create a test execution for the pre-existing Test (it does not create any new Test in this case).

It is important that the "Requirements issue types mapping" is configured at the point of import; otherwise, no link will be created. Refer to Issue Type Mapping for more information.

Below is a simplified example of a Robot Framework XML report. There are some nested test suites, and one failed test marked with Tags. The WEB-1 tag corresponds to an existing Story we want to test, while WEB-3 is the Test issue key which contains the test definition.

Robot-Framework example Suite and Test Case source file
*** Settings ***
Documentation     A test suite with a single Gherkin style test.
Library         BuiltIn
Library         Selenium2Library
Test Teardown     Close Browser

*** Variables ***
${SERVER}         localhost:8080
${BROWSER}        chrome
${DELAY}          0.5
${LOGIN URL}      http://${SERVER}/login.jsp
${WELCOME URL}    http://${SERVER}/secure/Dashboard.jspa
 
 
*** Test Cases ***
Gherkin Valid Login
    [Tags]      WEB-1  WEB-3
    Given browser is opened to login page
    When user "admin" logs in with password "password123"
    Then welcome page should be open

 
 
*** Keywords ***
Browser is opened to login page
    Open browser to login page
 
Open Browser To Login Page
    Open Browser    ${LOGIN URL}    ${BROWSER}
    Maximize Browser Window
    Set Selenium Speed    ${DELAY}
    Login Page Should Be Open


User "${username}" logs in with password "${password}"
    Input username    ${username}
    Input password    ${password}
    Submit credentials
 
Input Username
    [Arguments]    ${username}
    Input Text    login-form-username    ${username}


Input Password
    [Arguments]    ${password}
    Input Text    login-form-password    ${password}
 
Welcome Page Should Be Open
    Location Should Be    ${WELCOME URL}
    Title Should Be    System Dashboard - Your Company JIRA
Robot-Framework example output XML
<?xml version="1.0" encoding="UTF-8"?>
<robot generator="Robot 7.1 (Python 3.12.3 on darwin)" generated="2024-09-19T10:53:10.383420" rpa="false" schemaversion="5">
<suite id="s1" name="Login Tests" source="/Users/cristianocunha/Documents/Projects/garbage/webdemo/WebDemo/login_tests">
<suite id="s1-s1" name="Gherkin Login" source="/Users/cristianocunha/Documents/Projects/garbage/webdemo/WebDemo/login_tests/gherkin_login.robot">
<test id="s1-s1-t1" name="Valid Login" line="10">
<kw name="Given browser is opened to login page">
<kw name="Open Browser To Login Page" owner="resource">
<kw name="Open Browser" owner="SeleniumLibrary">
<msg time="2024-09-19T10:53:10.621925" level="INFO">Opening browser 'Firefox' to base url 'http://127.0.0.1:7272/'.</msg>
<arg>${LOGIN URL}</arg>
<arg>${BROWSER}</arg>
<doc>Opens a new browser instance to the optional ``url``.</doc>
<status status="PASS" start="2024-09-19T10:53:10.621696" elapsed="4.375811"/>
</kw>
<kw name="Maximize Browser Window" owner="SeleniumLibrary">
<doc>Maximizes current browser window.</doc>
<status status="PASS" start="2024-09-19T10:53:14.998219" elapsed="0.582856"/>
</kw>
<kw name="Set Selenium Speed" owner="SeleniumLibrary">
<arg>${DELAY}</arg>
<doc>Sets the delay that is waited after each Selenium command.</doc>
<status status="PASS" start="2024-09-19T10:53:15.581334" elapsed="0.000497"/>
</kw>
<kw name="Login Page Should Be Open" owner="resource">
<kw name="Title Should Be" owner="SeleniumLibrary">
<msg time="2024-09-19T10:53:15.584530" level="INFO">Page title is 'Login Page'.</msg>
<arg>Login Page</arg>
<doc>Verifies that the current page title equals ``title``.</doc>
<status status="PASS" start="2024-09-19T10:53:15.582590" elapsed="0.002032"/>
</kw>
<status status="PASS" start="2024-09-19T10:53:15.582145" elapsed="0.002603"/>
</kw>
<status status="PASS" start="2024-09-19T10:53:10.621090" elapsed="4.963756"/>
</kw>
<status status="PASS" start="2024-09-19T10:53:10.620729" elapsed="4.964221"/>
</kw>
<kw name="When user "demo" logs in with password "mode"" source_name="User "${username}" logs in with password "${password}"">
<kw name="Input Username" owner="resource">
<kw name="Input Text" owner="SeleniumLibrary">
<msg time="2024-09-19T10:53:15.586667" level="INFO">Typing text 'demo' into text field 'username_field'.</msg>
<arg>username_field</arg>
<arg>${username}</arg>
<doc>Types the given ``text`` into the text field identified by ``locator``.</doc>
<status status="PASS" start="2024-09-19T10:53:15.586150" elapsed="0.093901"/>
</kw>
<arg>${username}</arg>
<status status="PASS" start="2024-09-19T10:53:15.585718" elapsed="0.094472"/>
</kw>
<kw name="Input Password" owner="resource">
<kw name="Input Text" owner="SeleniumLibrary">
<msg time="2024-09-19T10:53:15.680943" level="INFO">Typing text 'mode' into text field 'password_field'.</msg>
<arg>password_field</arg>
<arg>${password}</arg>
<doc>Types the given ``text`` into the text field identified by ``locator``.</doc>
<status status="PASS" start="2024-09-19T10:53:15.680714" elapsed="0.015906"/>
</kw>
<arg>${password}</arg>
<status status="PASS" start="2024-09-19T10:53:15.680374" elapsed="0.016435"/>
</kw>
<kw name="Submit Credentials" owner="resource">
<kw name="Click Button" owner="SeleniumLibrary">
<msg time="2024-09-19T10:53:15.697524" level="INFO">Clicking button 'login_button'.</msg>
<arg>login_button</arg>
<doc>Clicks the button identified by ``locator``.</doc>
<status status="PASS" start="2024-09-19T10:53:15.697329" elapsed="0.069141"/>
</kw>
<status status="PASS" start="2024-09-19T10:53:15.697017" elapsed="0.069743"/>
</kw>
<status status="PASS" start="2024-09-19T10:53:15.585334" elapsed="0.181611"/>
</kw>
<kw name="Then welcome page should be open" owner="resource">
<kw name="Location Should Be" owner="SeleniumLibrary">
<msg time="2024-09-19T10:53:15.769947" level="INFO">Current location is 'http://127.0.0.1:7272/welcome.html'.</msg>
<arg>${WELCOME URL}</arg>
<doc>Verifies that the current URL is exactly ``url``.</doc>
<status status="PASS" start="2024-09-19T10:53:15.767972" elapsed="0.002084"/>
</kw>
<kw name="Title Should Be" owner="SeleniumLibrary">
<msg time="2024-09-19T10:53:15.772465" level="INFO">Page title is 'Welcome Page'.</msg>
<arg>Welcome Page</arg>
<doc>Verifies that the current page title equals ``title``.</doc>
<status status="PASS" start="2024-09-19T10:53:15.770313" elapsed="0.002425"/>
</kw>
<status status="PASS" start="2024-09-19T10:53:15.767468" elapsed="0.005392"/>
</kw>
<kw name="Close Browser" owner="SeleniumLibrary" type="TEARDOWN">
<doc>Closes the current browser.</doc>
<status status="PASS" start="2024-09-19T10:53:15.773545" elapsed="0.876093"/>
</kw>
<status status="PASS" start="2024-09-19T10:53:10.620146" elapsed="6.029860"/>
</test>
<doc>A test suite with a single Gherkin style test.

This test is functionally identical to the example in
valid_login.robot file.</doc>
<status status="PASS" start="2024-09-19T10:53:10.421765" elapsed="6.229233"/>
</suite>
<suite id="s1-s2" name="Invalid Login" source="/Users/cristianocunha/Documents/Projects/garbage/webdemo/WebDemo/login_tests/invalid_login.robot">
<kw name="Open Browser To Login Page" owner="resource" type="SETUP">
<kw name="Open Browser" owner="SeleniumLibrary">
<msg time="2024-09-19T10:53:16.658216" level="INFO">Opening browser 'Firefox' to base url 'http://127.0.0.1:7272/'.</msg>
<arg>${LOGIN URL}</arg>
<arg>${BROWSER}</arg>
<doc>Opens a new browser instance to the optional ``url``.</doc>
<status status="PASS" start="2024-09-19T10:53:16.657779" elapsed="3.493803"/>
</kw>
<kw name="Maximize Browser Window" owner="SeleniumLibrary">
<doc>Maximizes current browser window.</doc>
<status status="PASS" start="2024-09-19T10:53:20.152362" elapsed="0.577143"/>
</kw>
<kw name="Set Selenium Speed" owner="SeleniumLibrary">
<arg>${DELAY}</arg>
<doc>Sets the delay that is waited after each Selenium command.</doc>
<status status="PASS" start="2024-09-19T10:53:20.729750" elapsed="0.000619"/>
</kw>
<kw name="Login Page Should Be Open" owner="resource">
<kw name="Title Should Be" owner="SeleniumLibrary">
<msg time="2024-09-19T10:53:20.733356" level="INFO">Page title is 'Login Page'.</msg>
<arg>Login Page</arg>
<doc>Verifies that the current page title equals ``title``.</doc>
<status status="PASS" start="2024-09-19T10:53:20.731139" elapsed="0.002309"/>
</kw>
<status status="PASS" start="2024-09-19T10:53:20.730748" elapsed="0.002814"/>
</kw>
<status status="PASS" start="2024-09-19T10:53:16.657209" elapsed="4.076441"/>
</kw>
<test id="s1-s2-t1" name="Invalid Username" line="17">
<kw name="Go To Login Page" owner="resource" type="SETUP">
<kw name="Go To" owner="SeleniumLibrary">
<msg time="2024-09-19T10:53:20.734862" level="INFO">Opening url 'http://127.0.0.1:7272/'</msg>
<arg>${LOGIN URL}</arg>
<doc>Navigates the current browser window to the provided ``url``.</doc>
<status status="PASS" start="2024-09-19T10:53:20.734686" elapsed="0.022777"/>
</kw>
<kw name="Login Page Should Be Open" owner="resource">
<kw name="Title Should Be" owner="SeleniumLibrary">
<msg time="2024-09-19T10:53:20.759877" level="INFO">Page title is 'Login Page'.</msg>
<arg>Login Page</arg>
<doc>Verifies that the current page title equals ``title``.</doc>
<status status="PASS" start="2024-09-19T10:53:20.758292" elapsed="0.001680"/>
</kw>
<status status="PASS" start="2024-09-19T10:53:20.757896" elapsed="0.002273"/>
</kw>
<status status="PASS" start="2024-09-19T10:53:20.734389" elapsed="0.025961"/>
</kw>
<kw name="Login With Invalid Credentials Should Fail">
<kw name="Input Username" owner="resource">
<kw name="Input Text" owner="SeleniumLibrary">
<msg time="2024-09-19T10:53:20.762674" level="INFO">Typing text 'invalid' into text field 'username_field'.</msg>
<arg>username_field</arg>
<arg>${username}</arg>
<doc>Types the given ``text`` into the text field identified by ``locator``.</doc>
<status status="PASS" start="2024-09-19T10:53:20.762075" elapsed="0.098415"/>
</kw>
<arg>${username}</arg>
<status status="PASS" start="2024-09-19T10:53:20.761308" elapsed="0.099424"/>
</kw>
<kw name="Input Password" owner="resource">
<kw name="Input Text" owner="SeleniumLibrary">
<msg time="2024-09-19T10:53:20.862466" level="INFO">Typing text 'mode' into text field 'password_field'.</msg>
<arg>password_field</arg>
<arg>${password}</arg>
<doc>Types the given ``text`` into the text field identified by ``locator``.</doc>
<status status="PASS" start="2024-09-19T10:53:20.861511" elapsed="0.049073"/>
</kw>
<arg>${password}</arg>
<status status="PASS" start="2024-09-19T10:53:20.861005" elapsed="0.049783"/>
</kw>
<kw name="Submit Credentials" owner="resource">
<kw name="Click Button" owner="SeleniumLibrary">
<msg time="2024-09-19T10:53:20.912138" level="INFO">Clicking button 'login_button'.</msg>
<arg>login_button</arg>
<doc>Clicks the button identified by ``locator``.</doc>
<status status="PASS" start="2024-09-19T10:53:20.911809" elapsed="0.056743"/>
</kw>
<status status="PASS" start="2024-09-19T10:53:20.911220" elapsed="0.057477"/>
</kw>
<kw name="Login Should Have Failed">
<kw name="Location Should Be" owner="SeleniumLibrary">
<msg time="2024-09-19T10:53:20.971223" level="INFO">Current location is 'http://127.0.0.1:7272/error.html'.</msg>
<arg>${ERROR URL}</arg>
<doc>Verifies that the current URL is exactly ``url``.</doc>
<status status="PASS" start="2024-09-19T10:53:20.969244" elapsed="0.002078"/>
</kw>
<kw name="Title Should Be" owner="SeleniumLibrary">
<msg time="2024-09-19T10:53:20.973744" level="INFO">Page title is 'Error Page'.</msg>
<arg>Error Page</arg>
<doc>Verifies that the current page title equals ``title``.</doc>
<status status="PASS" start="2024-09-19T10:53:20.971541" elapsed="0.002306"/>
</kw>
<status status="PASS" start="2024-09-19T10:53:20.968917" elapsed="0.005047"/>
</kw>
<arg>invalid</arg>
<arg>${VALID PASSWORD}</arg>
<status status="PASS" start="2024-09-19T10:53:20.760751" elapsed="0.213296"/>
</kw>
<status status="PASS" start="2024-09-19T10:53:20.733821" elapsed="0.240518"/>
</test>
<test id="s1-s2-t2" name="Invalid Password" line="18">
<kw name="Go To Login Page" owner="resource" type="SETUP">
<kw name="Go To" owner="SeleniumLibrary">
<msg time="2024-09-19T10:53:20.975515" level="INFO">Opening url 'http://127.0.0.1:7272/'</msg>
<arg>${LOGIN URL}</arg>
<doc>Navigates the current browser window to the provided ``url``.</doc>
<status status="PASS" start="2024-09-19T10:53:20.975337" elapsed="0.029535"/>
</kw>
<kw name="Login Page Should Be Open" owner="resource">
<kw name="Title Should Be" owner="SeleniumLibrary">
<msg time="2024-09-19T10:53:21.006823" level="INFO">Page title is 'Login Page'.</msg>
<arg>Login Page</arg>
<doc>Verifies that the current page title equals ``title``.</doc>
<status status="PASS" start="2024-09-19T10:53:21.005423" elapsed="0.001486"/>
</kw>
<status status="PASS" start="2024-09-19T10:53:21.005113" elapsed="0.001901"/>
</kw>
<status status="PASS" start="2024-09-19T10:53:20.975057" elapsed="0.032038"/>
</kw>
<kw name="Login With Invalid Credentials Should Fail">
<kw name="Input Username" owner="resource">
<kw name="Input Text" owner="SeleniumLibrary">
<msg time="2024-09-19T10:53:21.008239" level="INFO">Typing text 'demo' into text field 'username_field'.</msg>
<arg>username_field</arg>
<arg>${username}</arg>
<doc>Types the given ``text`` into the text field identified by ``locator``.</doc>
<status status="PASS" start="2024-09-19T10:53:21.008021" elapsed="0.063429"/>
</kw>
<arg>${username}</arg>
<status status="PASS" start="2024-09-19T10:53:21.007709" elapsed="0.063885"/>
</kw>
<kw name="Input Password" owner="resource">
<kw name="Input Text" owner="SeleniumLibrary">
<msg time="2024-09-19T10:53:21.072845" level="INFO">Typing text 'invalid' into text field 'password_field'.</msg>
<arg>password_field</arg>
<arg>${password}</arg>
<doc>Types the given ``text`` into the text field identified by ``locator``.</doc>
<status status="PASS" start="2024-09-19T10:53:21.072601" elapsed="0.015264"/>
</kw>
<arg>${password}</arg>
<status status="PASS" start="2024-09-19T10:53:21.071911" elapsed="0.016159"/>
</kw>
<kw name="Submit Credentials" owner="resource">
<kw name="Click Button" owner="SeleniumLibrary">
<msg time="2024-09-19T10:53:21.088776" level="INFO">Clicking button 'login_button'.</msg>
<arg>login_button</arg>
<doc>Clicks the button identified by ``locator``.</doc>
<status status="PASS" start="2024-09-19T10:53:21.088587" elapsed="0.034337"/>
</kw>
<status status="PASS" start="2024-09-19T10:53:21.088282" elapsed="0.034784"/>
</kw>
<kw name="Login Should Have Failed">
<kw name="Location Should Be" owner="SeleniumLibrary">
<msg time="2024-09-19T10:53:21.125753" level="INFO">Current location is 'http://127.0.0.1:7272/error.html'.</msg>
<arg>${ERROR URL}</arg>
<doc>Verifies that the current URL is exactly ``url``.</doc>
<status status="PASS" start="2024-09-19T10:53:21.123553" elapsed="0.002396"/>
</kw>
<kw name="Title Should Be" owner="SeleniumLibrary">
<msg time="2024-09-19T10:53:21.133077" level="INFO">Page title is 'Error Page'.</msg>
<arg>Error Page</arg>
<doc>Verifies that the current page title equals ``title``.</doc>
<status status="PASS" start="2024-09-19T10:53:21.126188" elapsed="0.007084"/>
</kw>
<status status="PASS" start="2024-09-19T10:53:21.123255" elapsed="0.010150"/>
</kw>
<arg>${VALID USER}</arg>
<arg>invalid</arg>
<status status="PASS" start="2024-09-19T10:53:21.007328" elapsed="0.126163"/>
</kw>
<status status="PASS" start="2024-09-19T10:53:20.974680" elapsed="0.159014"/>
</test>
<test id="s1-s2-t3" name="Invalid Username And Password" line="19">
<kw name="Go To Login Page" owner="resource" type="SETUP">
<kw name="Go To" owner="SeleniumLibrary">
<msg time="2024-09-19T10:53:21.134844" level="INFO">Opening url 'http://127.0.0.1:7272/'</msg>
<arg>${LOGIN URL}</arg>
<doc>Navigates the current browser window to the provided ``url``.</doc>
<status status="PASS" start="2024-09-19T10:53:21.134654" elapsed="0.029921"/>
</kw>
<kw name="Login Page Should Be Open" owner="resource">
<kw name="Title Should Be" owner="SeleniumLibrary">
<msg time="2024-09-19T10:53:21.169138" level="INFO">Page title is 'Login Page'.</msg>
<arg>Login Page</arg>
<doc>Verifies that the current page title equals ``title``.</doc>
<status status="PASS" start="2024-09-19T10:53:21.165297" elapsed="0.003947"/>
</kw>
<status status="PASS" start="2024-09-19T10:53:21.164905" elapsed="0.004458"/>
</kw>
<status status="PASS" start="2024-09-19T10:53:21.134371" elapsed="0.035073"/>
</kw>
<kw name="Login With Invalid Credentials Should Fail">
<kw name="Input Username" owner="resource">
<kw name="Input Text" owner="SeleniumLibrary">
<msg time="2024-09-19T10:53:21.170695" level="INFO">Typing text 'invalid' into text field 'username_field'.</msg>
<arg>username_field</arg>
<arg>${username}</arg>
<doc>Types the given ``text`` into the text field identified by ``locator``.</doc>
<status status="PASS" start="2024-09-19T10:53:21.170464" elapsed="0.023559"/>
</kw>
<arg>${username}</arg>
<status status="PASS" start="2024-09-19T10:53:21.170133" elapsed="0.024127"/>
</kw>
<kw name="Input Password" owner="resource">
<kw name="Input Text" owner="SeleniumLibrary">
<msg time="2024-09-19T10:53:21.195216" level="INFO">Typing text 'whatever' into text field 'password_field'.</msg>
<arg>password_field</arg>
<arg>${password}</arg>
<doc>Types the given ``text`` into the text field identified by ``locator``.</doc>
<status status="PASS" start="2024-09-19T10:53:21.194965" elapsed="0.017717"/>
</kw>
<arg>${password}</arg>
<status status="PASS" start="2024-09-19T10:53:21.194541" elapsed="0.018336"/>
</kw>
<kw name="Submit Credentials" owner="resource">
<kw name="Click Button" owner="SeleniumLibrary">
<msg time="2024-09-19T10:53:21.214236" level="INFO">Clicking button 'login_button'.</msg>
<arg>login_button</arg>
<doc>Clicks the button identified by ``locator``.</doc>
<status status="PASS" start="2024-09-19T10:53:21.213924" elapsed="0.036724"/>
</kw>
<status status="PASS" start="2024-09-19T10:53:21.213357" elapsed="0.037425"/>
</kw>
<kw name="Login Should Have Failed">
<kw name="Location Should Be" owner="SeleniumLibrary">
<msg time="2024-09-19T10:53:21.253797" level="INFO">Current location is 'http://127.0.0.1:7272/error.html'.</msg>
<arg>${ERROR URL}</arg>
<doc>Verifies that the current URL is exactly ``url``.</doc>
<status status="PASS" start="2024-09-19T10:53:21.251325" elapsed="0.002570"/>
</kw>
<kw name="Title Should Be" owner="SeleniumLibrary">
<msg time="2024-09-19T10:53:21.255596" level="INFO">Page title is 'Error Page'.</msg>
<arg>Error Page</arg>
<doc>Verifies that the current page title equals ``title``.</doc>
<status status="PASS" start="2024-09-19T10:53:21.254162" elapsed="0.001528"/>
</kw>
<status status="PASS" start="2024-09-19T10:53:21.250966" elapsed="0.004840"/>
</kw>
<arg>invalid</arg>
<arg>whatever</arg>
<status status="PASS" start="2024-09-19T10:53:21.169700" elapsed="0.086225"/>
</kw>
<status status="PASS" start="2024-09-19T10:53:21.133983" elapsed="0.122435"/>
</test>
<test id="s1-s2-t4" name="Empty Username" line="20">
<kw name="Go To Login Page" owner="resource" type="SETUP">
<kw name="Go To" owner="SeleniumLibrary">
<msg time="2024-09-19T10:53:21.257902" level="INFO">Opening url 'http://127.0.0.1:7272/'</msg>
<arg>${LOGIN URL}</arg>
<doc>Navigates the current browser window to the provided ``url``.</doc>
<status status="PASS" start="2024-09-19T10:53:21.257554" elapsed="0.031000"/>
</kw>
<kw name="Login Page Should Be Open" owner="resource">
<kw name="Title Should Be" owner="SeleniumLibrary">
<msg time="2024-09-19T10:53:21.290419" level="INFO">Page title is 'Login Page'.</msg>
<arg>Login Page</arg>
<doc>Verifies that the current page title equals ``title``.</doc>
<status status="PASS" start="2024-09-19T10:53:21.289088" elapsed="0.001414"/>
</kw>
<status status="PASS" start="2024-09-19T10:53:21.288786" elapsed="0.001830"/>
</kw>
<status status="PASS" start="2024-09-19T10:53:21.257255" elapsed="0.033441"/>
</kw>
<kw name="Login With Invalid Credentials Should Fail">
<kw name="Input Username" owner="resource">
<kw name="Input Text" owner="SeleniumLibrary">
<msg time="2024-09-19T10:53:21.292571" level="INFO">Typing text '' into text field 'username_field'.</msg>
<arg>username_field</arg>
<arg>${username}</arg>
<doc>Types the given ``text`` into the text field identified by ``locator``.</doc>
<status status="PASS" start="2024-09-19T10:53:21.292305" elapsed="0.014163"/>
</kw>
<arg>${username}</arg>
<status status="PASS" start="2024-09-19T10:53:21.291875" elapsed="0.014837"/>
</kw>
<kw name="Input Password" owner="resource">
<kw name="Input Text" owner="SeleniumLibrary">
<msg time="2024-09-19T10:53:21.307528" level="INFO">Typing text 'mode' into text field 'password_field'.</msg>
<arg>password_field</arg>
<arg>${password}</arg>
<doc>Types the given ``text`` into the text field identified by ``locator``.</doc>
<status status="PASS" start="2024-09-19T10:53:21.307298" elapsed="0.018762"/>
</kw>
<arg>${password}</arg>
<status status="PASS" start="2024-09-19T10:53:21.306931" elapsed="0.019272"/>
</kw>
<kw name="Submit Credentials" owner="resource">
<kw name="Click Button" owner="SeleniumLibrary">
<msg time="2024-09-19T10:53:21.326880" level="INFO">Clicking button 'login_button'.</msg>
<arg>login_button</arg>
<doc>Clicks the button identified by ``locator``.</doc>
<status status="PASS" start="2024-09-19T10:53:21.326692" elapsed="0.041145"/>
</kw>
<status status="PASS" start="2024-09-19T10:53:21.326397" elapsed="0.041649"/>
</kw>
<kw name="Login Should Have Failed">
<kw name="Location Should Be" owner="SeleniumLibrary">
<msg time="2024-09-19T10:53:21.372642" level="INFO">Current location is 'http://127.0.0.1:7272/error.html'.</msg>
<arg>${ERROR URL}</arg>
<doc>Verifies that the current URL is exactly ``url``.</doc>
<status status="PASS" start="2024-09-19T10:53:21.368760" elapsed="0.004000"/>
</kw>
<kw name="Title Should Be" owner="SeleniumLibrary">
<msg time="2024-09-19T10:53:21.374320" level="INFO">Page title is 'Error Page'.</msg>
<arg>Error Page</arg>
<doc>Verifies that the current page title equals ``title``.</doc>
<status status="PASS" start="2024-09-19T10:53:21.372945" elapsed="0.001464"/>
</kw>
<status status="PASS" start="2024-09-19T10:53:21.368354" elapsed="0.006165"/>
</kw>
<arg>${EMPTY}</arg>
<arg>${VALID PASSWORD}</arg>
<status status="PASS" start="2024-09-19T10:53:21.290970" elapsed="0.083631"/>
</kw>
<status status="PASS" start="2024-09-19T10:53:21.256856" elapsed="0.117943"/>
</test>
<test id="s1-s2-t5" name="Empty Password" line="21">
<kw name="Go To Login Page" owner="resource" type="SETUP">
<kw name="Go To" owner="SeleniumLibrary">
<msg time="2024-09-19T10:53:21.375903" level="INFO">Opening url 'http://127.0.0.1:7272/'</msg>
<arg>${LOGIN URL}</arg>
<doc>Navigates the current browser window to the provided ``url``.</doc>
<status status="PASS" start="2024-09-19T10:53:21.375720" elapsed="0.030219"/>
</kw>
<kw name="Login Page Should Be Open" owner="resource">
<kw name="Title Should Be" owner="SeleniumLibrary">
<msg time="2024-09-19T10:53:21.407861" level="INFO">Page title is 'Login Page'.</msg>
<arg>Login Page</arg>
<doc>Verifies that the current page title equals ``title``.</doc>
<status status="PASS" start="2024-09-19T10:53:21.406484" elapsed="0.001468"/>
</kw>
<status status="PASS" start="2024-09-19T10:53:21.406174" elapsed="0.001886"/>
</kw>
<status status="PASS" start="2024-09-19T10:53:21.375439" elapsed="0.032701"/>
</kw>
<kw name="Login With Invalid Credentials Should Fail">
<kw name="Input Username" owner="resource">
<kw name="Input Text" owner="SeleniumLibrary">
<msg time="2024-09-19T10:53:21.409705" level="INFO">Typing text 'demo' into text field 'username_field'.</msg>
<arg>username_field</arg>
<arg>${username}</arg>
<doc>Types the given ``text`` into the text field identified by ``locator``.</doc>
<status status="PASS" start="2024-09-19T10:53:21.409467" elapsed="0.021607"/>
</kw>
<arg>${username}</arg>
<status status="PASS" start="2024-09-19T10:53:21.409136" elapsed="0.022132"/>
</kw>
<kw name="Input Password" owner="resource">
<kw name="Input Text" owner="SeleniumLibrary">
<msg time="2024-09-19T10:53:21.432091" level="INFO">Typing text '' into text field 'password_field'.</msg>
<arg>password_field</arg>
<arg>${password}</arg>
<doc>Types the given ``text`` into the text field identified by ``locator``.</doc>
<status status="PASS" start="2024-09-19T10:53:21.431858" elapsed="0.017061"/>
</kw>
<arg>${password}</arg>
<status status="PASS" start="2024-09-19T10:53:21.431497" elapsed="0.017574"/>
</kw>
<kw name="Submit Credentials" owner="resource">
<kw name="Click Button" owner="SeleniumLibrary">
<msg time="2024-09-19T10:53:21.449987" level="INFO">Clicking button 'login_button'.</msg>
<arg>login_button</arg>
<doc>Clicks the button identified by ``locator``.</doc>
<status status="PASS" start="2024-09-19T10:53:21.449761" elapsed="0.037626"/>
</kw>
<status status="PASS" start="2024-09-19T10:53:21.449383" elapsed="0.038136"/>
</kw>
<kw name="Login Should Have Failed">
<kw name="Location Should Be" owner="SeleniumLibrary">
<msg time="2024-09-19T10:53:21.490175" level="INFO">Current location is 'http://127.0.0.1:7272/error.html'.</msg>
<arg>${ERROR URL}</arg>
<doc>Verifies that the current URL is exactly ``url``.</doc>
<status status="PASS" start="2024-09-19T10:53:21.488075" elapsed="0.002207"/>
</kw>
<kw name="Title Should Be" owner="SeleniumLibrary">
<msg time="2024-09-19T10:53:21.491839" level="INFO">Page title is 'Error Page'.</msg>
<arg>Error Page</arg>
<doc>Verifies that the current page title equals ``title``.</doc>
<status status="PASS" start="2024-09-19T10:53:21.490465" elapsed="0.001468"/>
</kw>
<status status="PASS" start="2024-09-19T10:53:21.487705" elapsed="0.004349"/>
</kw>
<arg>${VALID USER}</arg>
<arg>${EMPTY}</arg>
<status status="PASS" start="2024-09-19T10:53:21.408388" elapsed="0.083753"/>
</kw>
<status status="PASS" start="2024-09-19T10:53:21.375068" elapsed="0.117283"/>
</test>
<test id="s1-s2-t6" name="Empty Username And Password" line="22">
<kw name="Go To Login Page" owner="resource" type="SETUP">
<kw name="Go To" owner="SeleniumLibrary">
<msg time="2024-09-19T10:53:21.494116" level="INFO">Opening url 'http://127.0.0.1:7272/'</msg>
<arg>${LOGIN URL}</arg>
<doc>Navigates the current browser window to the provided ``url``.</doc>
<status status="PASS" start="2024-09-19T10:53:21.493900" elapsed="0.028376"/>
</kw>
<kw name="Login Page Should Be Open" owner="resource">
<kw name="Title Should Be" owner="SeleniumLibrary">
<msg time="2024-09-19T10:53:21.524383" level="INFO">Page title is 'Login Page'.</msg>
<arg>Login Page</arg>
<doc>Verifies that the current page title equals ``title``.</doc>
<status status="PASS" start="2024-09-19T10:53:21.523023" elapsed="0.001447"/>
</kw>
<status status="PASS" start="2024-09-19T10:53:21.522638" elapsed="0.001937"/>
</kw>
<status status="PASS" start="2024-09-19T10:53:21.493392" elapsed="0.031264"/>
</kw>
<kw name="Login With Invalid Credentials Should Fail">
<kw name="Input Username" owner="resource">
<kw name="Input Text" owner="SeleniumLibrary">
<msg time="2024-09-19T10:53:21.527112" level="INFO">Typing text '' into text field 'username_field'.</msg>
<arg>username_field</arg>
<arg>${username}</arg>
<doc>Types the given ``text`` into the text field identified by ``locator``.</doc>
<status status="PASS" start="2024-09-19T10:53:21.526666" elapsed="0.013740"/>
</kw>
<arg>${username}</arg>
<status status="PASS" start="2024-09-19T10:53:21.526255" elapsed="0.014287"/>
</kw>
<kw name="Input Password" owner="resource">
<kw name="Input Text" owner="SeleniumLibrary">
<msg time="2024-09-19T10:53:21.541300" level="INFO">Typing text '' into text field 'password_field'.</msg>
<arg>password_field</arg>
<arg>${password}</arg>
<doc>Types the given ``text`` into the text field identified by ``locator``.</doc>
<status status="PASS" start="2024-09-19T10:53:21.541079" elapsed="0.014050"/>
</kw>
<arg>${password}</arg>
<status status="PASS" start="2024-09-19T10:53:21.540728" elapsed="0.014692"/>
</kw>
<kw name="Submit Credentials" owner="resource">
<kw name="Click Button" owner="SeleniumLibrary">
<msg time="2024-09-19T10:53:21.556776" level="INFO">Clicking button 'login_button'.</msg>
<arg>login_button</arg>
<doc>Clicks the button identified by ``locator``.</doc>
<status status="PASS" start="2024-09-19T10:53:21.556406" elapsed="0.056620"/>
</kw>
<status status="PASS" start="2024-09-19T10:53:21.555796" elapsed="0.057471"/>
</kw>
<kw name="Login Should Have Failed">
<kw name="Location Should Be" owner="SeleniumLibrary">
<msg time="2024-09-19T10:53:21.615670" level="INFO">Current location is 'http://127.0.0.1:7272/error.html'.</msg>
<arg>${ERROR URL}</arg>
<doc>Verifies that the current URL is exactly ``url``.</doc>
<status status="PASS" start="2024-09-19T10:53:21.613901" elapsed="0.001875"/>
</kw>
<kw name="Title Should Be" owner="SeleniumLibrary">
<msg time="2024-09-19T10:53:21.617285" level="INFO">Page title is 'Error Page'.</msg>
<arg>Error Page</arg>
<doc>Verifies that the current page title equals ``title``.</doc>
<status status="PASS" start="2024-09-19T10:53:21.615964" elapsed="0.001406"/>
</kw>
<status status="PASS" start="2024-09-19T10:53:21.613561" elapsed="0.003915"/>
</kw>
<arg>${EMPTY}</arg>
<arg>${EMPTY}</arg>
<status status="PASS" start="2024-09-19T10:53:21.524991" elapsed="0.092566"/>
</kw>
<status status="PASS" start="2024-09-19T10:53:21.492849" elapsed="0.124909"/>
</test>
<kw name="Close Browser" owner="SeleniumLibrary" type="TEARDOWN">
<doc>Closes the current browser.</doc>
<status status="PASS" start="2024-09-19T10:53:21.618370" elapsed="0.947242"/>
</kw>
<doc>A test suite containing tests related to invalid login.

These tests are data-driven by their nature. They use a single
keyword, specified with Test Template setting, that is called
with different arguments to cover different scenarios.

This suite also demonstrates using setups and teardowns in
different levels.</doc>
<status status="PASS" start="2024-09-19T10:53:16.651767" elapsed="5.913955"/>
</suite>
<suite id="s1-s3" name="Valid Login" source="/Users/cristianocunha/Documents/Projects/garbage/webdemo/WebDemo/login_tests/valid_login.robot">
<test id="s1-s3-t1" name="Valid Login" line="9">
<kw name="Open Browser To Login Page" owner="resource">
<kw name="Open Browser" owner="SeleniumLibrary">
<msg time="2024-09-19T10:53:22.581291" level="INFO">Opening browser 'Firefox' to base url 'http://127.0.0.1:7272/'.</msg>
<arg>${LOGIN URL}</arg>
<arg>${BROWSER}</arg>
<doc>Opens a new browser instance to the optional ``url``.</doc>
<status status="PASS" start="2024-09-19T10:53:22.580469" elapsed="3.455596"/>
</kw>
<kw name="Maximize Browser Window" owner="SeleniumLibrary">
<doc>Maximizes current browser window.</doc>
<status status="PASS" start="2024-09-19T10:53:26.036602" elapsed="0.578616"/>
</kw>
<kw name="Set Selenium Speed" owner="SeleniumLibrary">
<arg>${DELAY}</arg>
<doc>Sets the delay that is waited after each Selenium command.</doc>
<status status="PASS" start="2024-09-19T10:53:26.615540" elapsed="0.000496"/>
</kw>
<kw name="Login Page Should Be Open" owner="resource">
<kw name="Title Should Be" owner="SeleniumLibrary">
<msg time="2024-09-19T10:53:26.618741" level="INFO">Page title is 'Login Page'.</msg>
<arg>Login Page</arg>
<doc>Verifies that the current page title equals ``title``.</doc>
<status status="PASS" start="2024-09-19T10:53:26.616810" elapsed="0.002041"/>
</kw>
<status status="PASS" start="2024-09-19T10:53:26.616360" elapsed="0.002614"/>
</kw>
<status status="PASS" start="2024-09-19T10:53:22.579319" elapsed="4.039757"/>
</kw>
<kw name="Input Username" owner="resource">
<kw name="Input Text" owner="SeleniumLibrary">
<msg time="2024-09-19T10:53:26.620128" level="INFO">Typing text 'demo' into text field 'username_field'.</msg>
<arg>username_field</arg>
<arg>${username}</arg>
<doc>Types the given ``text`` into the text field identified by ``locator``.</doc>
<status status="PASS" start="2024-09-19T10:53:26.619791" elapsed="0.074255"/>
</kw>
<arg>demo</arg>
<status status="PASS" start="2024-09-19T10:53:26.619424" elapsed="0.074753"/>
</kw>
<kw name="Input Password" owner="resource">
<kw name="Input Text" owner="SeleniumLibrary">
<msg time="2024-09-19T10:53:26.694967" level="INFO">Typing text 'mode' into text field 'password_field'.</msg>
<arg>password_field</arg>
<arg>${password}</arg>
<doc>Types the given ``text`` into the text field identified by ``locator``.</doc>
<status status="PASS" start="2024-09-19T10:53:26.694740" elapsed="0.014788"/>
</kw>
<arg>mode</arg>
<status status="PASS" start="2024-09-19T10:53:26.694422" elapsed="0.015239"/>
</kw>
<kw name="Submit Credentials" owner="resource">
<kw name="Click Button" owner="SeleniumLibrary">
<msg time="2024-09-19T10:53:26.710464" level="INFO">Clicking button 'login_button'.</msg>
<arg>login_button</arg>
<doc>Clicks the button identified by ``locator``.</doc>
<status status="PASS" start="2024-09-19T10:53:26.710257" elapsed="0.063640"/>
</kw>
<status status="PASS" start="2024-09-19T10:53:26.709932" elapsed="0.064111"/>
</kw>
<kw name="Welcome Page Should Be Open" owner="resource">
<kw name="Location Should Be" owner="SeleniumLibrary">
<msg time="2024-09-19T10:53:26.777589" level="INFO">Current location is 'http://127.0.0.1:7272/welcome.html'.</msg>
<arg>${WELCOME URL}</arg>
<doc>Verifies that the current URL is exactly ``url``.</doc>
<status status="PASS" start="2024-09-19T10:53:26.774679" elapsed="0.003020"/>
</kw>
<kw name="Title Should Be" owner="SeleniumLibrary">
<msg time="2024-09-19T10:53:26.783960" level="INFO">Page title is 'Welcome Page'.</msg>
<arg>Welcome Page</arg>
<doc>Verifies that the current page title equals ``title``.</doc>
<status status="PASS" start="2024-09-19T10:53:26.777886" elapsed="0.006286"/>
</kw>
<status status="PASS" start="2024-09-19T10:53:26.774306" elapsed="0.010131"/>
</kw>
<kw name="Close Browser" owner="SeleniumLibrary" type="TEARDOWN">
<doc>Closes the current browser.</doc>
<status status="PASS" start="2024-09-19T10:53:26.784824" elapsed="0.833639"/>
</kw>
<tag>EC-4</tag>
<tag>UI</tag>
<status status="PASS" start="2024-09-19T10:53:22.575632" elapsed="5.043000"/>
</test>
<doc>A test suite with a single test for valid login.

This test has a workflow that is created using keywords in
the imported resource file.</doc>
<status status="PASS" start="2024-09-19T10:53:22.566596" elapsed="5.052539"/>
</suite>
<status status="PASS" start="2024-09-19T10:53:10.385393" elapsed="17.234468"/>
</suite>
<statistics>
<total>
<stat pass="8" fail="0" skip="0">All Tests</stat>
</total>
<tag>
<stat pass="1" fail="0" skip="0">EC-4</stat>
<stat pass="1" fail="0" skip="0">UI</stat>
</tag>
<suite>
<stat pass="8" fail="0" skip="0" id="s1" name="Login Tests">Login Tests</stat>
<stat pass="1" fail="0" skip="0" id="s1-s1" name="Gherkin Login">Login Tests.Gherkin Login</stat>
<stat pass="6" fail="0" skip="0" id="s1-s2" name="Invalid Login">Login Tests.Invalid Login</stat>
<stat pass="1" fail="0" skip="0" id="s1-s3" name="Valid Login">Login Tests.Valid Login</stat>
</suite>
</statistics>
<errors>
</errors>
</robot>

Entities

Each Robot test case is mapped to a Generic Test in Jira, having the summary with the name of the test case, and the Generic Test Definition field contains the concatenated names of the test suites, along with the name of the test case. Note that the Robot Framework considers the base folder of the project as the first test suite.

Please note

The way you run your tests also affects Robot's XML, so if you execute the file from somewhere else or you directly execute the file by passing it as an argument, the test suite's information will potentially be different. 

The name, error message, duration, and status of  Robot's keywords will be imported and stored in the test run results.

Note

The test case keywords and the test case setup/teardown keywords are individually imported; therefore, you can see their respective results. The test suite setup/teardown keywords are not imported.

Information about each Robot keyword (i.e., step), along with the corresponding status, is displayed in the Context section of the Execution Details of the Generic Test.

The example below shows the execution details page of a Test containing both test keywords as well as the final test teardown keyword.


Note

If the XML report contains embedded images such as screenshots, they will be also be imported by Xray and displayed on the report.

Status

Robot Framework's test case status maps directly to Xray test run status FAIL and PASS.

Note

Test Cases with the status FAIL may have an error/failure message displayed in the Results section of the Test Run screen.

Working example

Please take a look at the tutorial Testing using Robot Framework integration in Python or Java for a more concrete end-to-end example.

References