Share
Embed
Robot Framework
What is Robot Framework along with key concepts, also some comparison with Cucumber based home grown frameworks
gauravve
February 03, 2015
Transcript
18 slides
-
My background 2 • DevOps, Continuous Integration and Continuous Delivery
@Odecee • Java/WESB/WPS Developer @ IBM • Passionate about Automation Testing (ATDD/BDD, TDD) -
What is Robot Framework? 3 • Keyword driven, automation framework
for acceptance testing and acceptance test-driven development (ATDD) • Provides • Execution Platform • Reporting • Tools • Facilitates Keyword driven, Data driven and BDD style testing • Facilitates Automation testing across different application types • Very mature and actively developed -
Keywords 4 • Keywords Define specific actions • Eg “Open
Browser” keyword tells Robot to open a browser window • Eg “Click Button” [@locators] • Similar to functions with parameters • Abstracts implementation detail from the user • No Selenium Knowledge required to run tests using Selenium • No REST API framework knowledge required to run API Tests • Keyword based approach plays a pivotal role in reducing technical barriers to automation testing for non technical users -
Extending Keywords 5 • Two ways to extend • Build
on existing keywords • Define new high level keywords based on existing keywords • Add custom functionality • Add new low level keywords using Java or Python. Other languages can be used using remote server library -
Libraries 6 • A collection of Keywords that expose functionality
• Eg Selenium Library has 146 keywords which provide users with every possible functionality that Selenium exposes. • Extension mechanism – Write your own keywords and libraries • Lots of libraries available • Compared to Cucumber based BDD automation the need to write custom code is reduced which drastically reduces the time to automate. -
Supports many testing paradigms 9 • Keyword Driven • Login
… Then Click this…. Then click that…. Then Something happens • Data Driven • Test Login for 1000 users • Test configuration changes for a specific test case • BDD • Given .. When .. Then -
Benefits 10 • Executable Acceptance Criteria with no knowledge of
underlying framework • Abstracts framework and language complexities from end users • Comes with extensive built-in and external libraries • Web, REST API, SOAP, Database, Mobile • Extensible - Write you own libraries • Java and Python can be used to extend existing libraries or write custom ones • Beautiful Reports, Jenkins/Bamboo Integration • Mature and well documented -
Benefits….! 11 • Robot IDE • Auto Completion, Keyword Search,
Context Help. • Helps get new users get up to speed very quickly • CLI • No need to use Ant or Maven or Gradle or Rake or Spring. Less bloat-ware • Fast • Compared to home grown Java/Ruby based selenium framework • Projects/Tests suites/Test cases are text based files which can be easily version controlled. • Test executable files are plain English which makes tests much easier to understand for everyone – No RubyMine, No Intellij, No Eclipse required. -
Robot Tools – A complete ecosystem for Testing http://robotframework.org/#tools 12
• RobotHub – Enables keyword sharing and reuse • RobotIDE (RIDE) • Pybot – CLI • ReBOT – Report Processing • PaBOT – Parallel executors for Robot. Takes care of Data race conditions. • Robot-Excel – Read and Write data from Excel files. • JIRA-Robot – Keywords for interacting with JIRA • Plugins for every IDE under the sun • Integrates with Maven, Ant, Jenkins and Bamboo -
Compared to BDD/Cucumber 13 • BDD provides • A common
language based on simple, structured sentences expressed in English (or in the native language of the stakeholders) that facilitates communication between project team members and business stakeholders. • “As a … I want to … So that” and “Given… When … Then” is English “LIKE”. • It does not • Make writing automation easier or • Standardizes Given.. When.. Then across the organization -
BDD challenges which Robot fixes 16 • Process and Tools
• It takes more time to automate test cases than actually develop code for an application • Tests need to carefully designed with the right level of abstraction and expressiveness • Lot of code duplication • Given.. When.. Then does not make sense all the time • Types of application to test Web, REST API, SOAP Web Services, iOS, Android • Produce consistent reports across application types • Produce reports with rolled up results across specifications • Agile = Code changes fast = Tests break faster • Many languages and frameworks to learn for testers or automation developers • People • Its not my problem. I don’t write automation code. -
Why Robot Framework 17 • Technical • No glue code
required to automate acceptance criteria. • Abstracts framework and language complexities for end users • Provide a unified execution and reporting platform for various types of System Under Test. • Provides Tools for processing reports, expose REST APIs, centrally share keywords across organization and a dedicated IDE • Process • More time spent automating tests rather than understanding the framework(s) = Faster time to market • Culture • Enables non technical people to easily understand and automate test cases = Everyone can help in improving quality. -
Final Thoughts 18 • Robot Framework is what every home-grown
Cucumber/JBehave automation framework aspires to be. • It fast tracks teams way ahead in automation testing maturity. • Keyword driven way of thinking enables reuse and abstraction • What do you think?