O'Reilly logo

Python Testing Cookbook by Greg L. Turnquist

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Creating a data-driven test suite with Robot

Robot Framework uses keywords to define tests, test steps, variables, and other testing components. Keywords are short-hand commands that are provided by various libraries and can also be custom defined. This allows many different ways of writing and organizing tests.

In this recipe, we'll explore how to run the same test procedure with varying inputs and outputs. These can be described as data-driven tests.

Getting ready

  1. We first need to activate our virtualenv setup.
  2. For this recipe, we will use the shopping cart application.
  3. Next, we need to install Robot Framework, as shown in the previous recipe.

How to do it...

The following steps will show us how to write a simple acceptance test using HTML tables. ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required