Robot Framework
An ATDD Framework
Apua, PyCon TW 2016
Unit Test?
Acceptance Test?
Robot Framework?
Robot Framework is a Python-based, extensible keyword-driven test automation framework for end-to-end acceptance testing and acceptance-test-driven development (ATDD). It can be used for testing distributed, heterogeneous applications, where verification requires touching several technologies and interfaces.
User and Functional
Implementation
Acceptance Test
Determine if requirements are met
Examples:
- Minimal Accpetance Test
- End-to-End Acceptance Test
Break down
Break down
User Story
...
Acceptance Test
Break down
As a (role)
I want (something)
so that (benefit)
Given (initial)
When (event)
Then (outcomes)
Flow
- Break down user story
- Create acceptance test
- Implement keywords
- Debug with log
- Automated test and get report
Framework?
Format
- Pipe, space separated, table ...
- Plain text, TSV, HTML, reStructuredText ...
- Tool for cleaning and transformation
Programmability
- Limited flow control:
- for loop
- ternary operator
- Convenient variable syntax:
- shell script-like
- collection and pack/unpack
Hierarchical Structure
- Variable files in YAML, Python
- Resource files to collect keywords and libraries
- File and directory to organize setup/teardown
Tagging
- Categorize to select
(eg: RAT, FAST, FET) - Set critical cases
(eg: smoke test)
Documentation
- Meta data and syntax support
- Documentation of suites
- Documentation of cases and keywords
- Tool to generate cases / keywords document
Remote Library
In additon...
- Official user guide
- Customization of report
- IDE support
- Keywords creating tool
- API
- CI plugin
Third Party
Summary
- Focus on design and maintain test
- Extensible, scalable, powerful
- Acceptance test-driven development:
breakdown story
→ acceptance test
→ implement/reuse keywords
→ automation for continuous delivery
References
- Robot Framework 3
- Robot Framework User Guide
- Robot Framework Tools
- Robot Framework Webdemo
- Robot Framework Robotdemo
- Agile Manifesto
- Type of Requirements
- User Stories: An Agile Introduction
- Driving Development with Tests: ATDD and TDD
- Introduction to Robot Framework - PyCon TW 2014
- An Introduction to Test Automation
Q & A
Robot Framework - An ATDD Framework
By Apua A.Aa
Robot Framework - An ATDD Framework
- 3,470