acceptance test driven development using robot framework' by pekka klarch & janne harkonen

17
Acceptance Test Driven Development using Robot Framework Pekka Klärck <[email protected]> Janne Härkönen <[email protected]> © Copyright Nokia Siemens Networks Creative Commons Attribution 3.0 License

Upload: eurostar-software-testing-conference

Post on 18-Jun-2015

1.381 views

Category:

Technology


1 download

DESCRIPTION

Acceptance test driven development (ATDD) is an important agile practice merging requirement gathering with acceptance testing. In its core are concrete examples, created together with the team, that provide collaborative understanding and, as automated acceptance tests, make sure that the features are implemented correctly. There are many ways to create ATDD examples/tests, and the behavior driven­ development (BDD) style with Given­-When­-Then format is one of the more popular ones. Robot Framework is an open source test automation framework suitable for ATDD and acceptance testing in general. It has a flexible test data syntax that supports keyword­-driven, data-­driven, and BDD styles, but is still simple enough so that also non­-programmers can create and understand test cases. The simple test library API makes extending the framework easy, and there are several ready made libraries that allow testing generic interfaces such as web, databases, Swing, SWT, Windows GUIs, Flex, and SSH out­-of-­the­-box. This presentation gives an introduction both to ATDD and Robot Framework. It contains different demonstrations and all the material will be freely available after the presentation.

TRANSCRIPT

Page 1: Acceptance Test Driven Development Using Robot Framework' by Pekka Klarch & Janne Harkonen

Acceptance Test Driven Development

using

Robot Framework

Pekka Klärck <[email protected]>Janne Härkönen <[email protected]>

© Copyright Nokia Siemens NetworksCreative Commons Attribution 3.0 License

Page 2: Acceptance Test Driven Development Using Robot Framework' by Pekka Klarch & Janne Harkonen

Acceptance Test Driven Development

Common understanding Ubiquitous language Executable requirements/examples Living documentation Also known as story test driven development,

behavior driven development, executable specifications, specification by example, ...

Page 3: Acceptance Test Driven Development Using Robot Framework' by Pekka Klarch & Janne Harkonen

The ATDD cycle

© Image copyright Elisabeth Hendrickson

Page 4: Acceptance Test Driven Development Using Robot Framework' by Pekka Klarch & Janne Harkonen

Development phase

The specified examples guide the implementation work

Automation of the examples can be done in parallel with feature implementation

The whole team is responsible on automation In the end, all the automated examples pass

when run against the implementation

Page 5: Acceptance Test Driven Development Using Robot Framework' by Pekka Klarch & Janne Harkonen

Deliver phase

Implemented features are demonstrated to all stakeholders

Original examples are executed against the produced software

Feedback serves as input to the next discussion phase

Page 6: Acceptance Test Driven Development Using Robot Framework' by Pekka Klarch & Janne Harkonen

Robot Framework

Generic test automation framework Utilizes the keyword-driven testing approach Suitable both for "normal" automation and ATDD

Implemented with Python Runs also on Jython (JVM) and IronPython (.NET)

Open source Apache 2.0 License Sponsored by Nokia Siemens Networks Active development and community

Page 7: Acceptance Test Driven Development Using Robot Framework' by Pekka Klarch & Janne Harkonen

High level architecture

Page 8: Acceptance Test Driven Development Using Robot Framework' by Pekka Klarch & Janne Harkonen

Simple tabular syntax

Page 9: Acceptance Test Driven Development Using Robot Framework' by Pekka Klarch & Janne Harkonen

Executable specifications

Page 10: Acceptance Test Driven Development Using Robot Framework' by Pekka Klarch & Janne Harkonen

Data-driven test cases

Page 11: Acceptance Test Driven Development Using Robot Framework' by Pekka Klarch & Janne Harkonen

Key features

Creating higher level keywords in test data Easy to create domain specific languages No programming skills needed

Variables Tagging test cases

Selecting tests, statistics, ... Simple test library API

Easy to create custom libraries

Page 12: Acceptance Test Driven Development Using Robot Framework' by Pekka Klarch & Janne Harkonen

Separate test data editor (RIDE)

Page 13: Acceptance Test Driven Development Using Robot Framework' by Pekka Klarch & Janne Harkonen

Clear reports

Page 14: Acceptance Test Driven Development Using Robot Framework' by Pekka Klarch & Janne Harkonen

Detailed logs

Page 15: Acceptance Test Driven Development Using Robot Framework' by Pekka Klarch & Janne Harkonen

Rich ecosystem

Generic test libraries Web testing, Swing, SWT, Windows GUIs,

databases, SSH, Telnet, ... Build tool integration

Outputs also in machine readable XML format Plugins for Jenkins/Hudson, Maven, Ant, ...

Text editor support Emacs, Vim, TextMate, ...

Page 16: Acceptance Test Driven Development Using Robot Framework' by Pekka Klarch & Janne Harkonen

For more information

Bridging the Communication Gap book by Gojko Adzic: http://acceptancetesting.info

Robot Framework: http://robotframework.org

ATDD with Robot Framework article by Craig Larman and Bas Vodde: http://a-tdd.org

ATDD with Robot Framework demo: http://code.google.com/p/atdd-with-robot-framework

Web testing demo with Robot Framework: http://bit.ly/rf-web-test-demo

Page 17: Acceptance Test Driven Development Using Robot Framework' by Pekka Klarch & Janne Harkonen

Questions?Thanks!

Pekka Klärck <[email protected]>Janne Härkönen <[email protected]>