A gentle introduction to Robot Framework
Efremova Elizaveta
Software Quality Engineer
© Copyright 2018 Dell Inc.
1
[Blank]
© Copyright 2018 Dell Inc.
2
What is Robot Framework?
© Copyright 2018 Dell Inc.
3
History
software
© Copyright 2018 Dell Inc.
4
Useful links
Official site
https://robotframework.org/
GitHub project
https://github.com/robotframework/robotframework
https://github.com/robotframework/QuickStartGuide/blob/master/QuickStart.rst
Quick Start
© Copyright 2018 Dell Inc.
5
How to use Robot Framework?
© Copyright 2018 Dell Inc.
6
KEYWORD
© Copyright 2018 Dell Inc.
7
Keyword structure
*** Keywords ***�User enter text to a search field� [Arguments] ${text} ${field_xpath}� Search page should be open� Wait until page contains ${field_xpath}� Search field exists on page� Input text to a search field� Press enter� [Return] True
© Copyright 2018 Dell Inc.
8
Keyword structure
@keyword�def wait_until_page_contains(self, text, timeout=None, error=None):� """Waits until ``text`` appears on current page.� Fails if ``timeout`` expires before the text appears. See� the `Timeouts` section for more information about using timeouts� and their default value.� ``error`` can be used to override the default error message.� """� self._wait_until(lambda: self.is_text_present(text),� "Text '%s' did not appear in <TIMEOUT>." % text,� timeout, error)
© Copyright 2018 Dell Inc.
9
Import keywords
*** Settings ***�Library String�Library DateTime�Library lib.DLm�Library lib.Mainframe�Resource resources/Mainframe_Keywords.robot�Resource resources/Storage_keywords.robot�Resource resources/dlm_common_keywords.robot
© Copyright 2018 Dell Inc.
10
TEST CASE
© Copyright 2018 Dell Inc.
11
Test structure
Name
Body
[Documentation]
[Tags]
[Timeout]
[Teardown]
[Setup]
© Copyright 2018 Dell Inc.
12
How to run
>robot --include TEST-24 file_with_test_cases.robot
>robot file_with_test_cases.robot
>robot --test “User can find information with start page“
file_with_test_cases.robot
© Copyright 2018 Dell Inc.
13
REPORTS
© Copyright 2018 Dell Inc.
14
Reporting
log.html
report.html
© Copyright 2018 Dell Inc.
15
Reporting
ALLURE REPORTER
log.html
report.html
© Copyright 2018 Dell Inc.
16
Integration with Jenkins
Robot Framework Plugin
https://wiki.jenkins.io/display/JENKINS/Robot+Framework+Plugin
© Copyright 2018 Dell Inc.
17
Why Robot Framework?
© Copyright 2018 Dell Inc.
18
ATDD
keyword-driving testing
platform independent
integration testing
system testing
good reporting
open source
integration with Jenkins/…
© Copyright 2018 Dell Inc.
19
© Copyright 2018 Dell Inc.
20