Handling and binding data

Handling and binding data

To increase re-use of automated tests, it’s key to be able to separate dynamic data from static, non-changing code. It’s easy to understand why. Let’s say you have a test case that fills out a web form. Without separation of data, you would need to record one test for each set of data that needs to be tested.

 

Boozang supports a wide-variety of data-types

 

Properties: For name-value pairs

CSV data: To loop over data sets

Matrix data: For accessing a data set by key

Object: One-level JSON data – perfect for forms

Array data: A list of string or numbers

File: Used for file upload tests

External data: Used to fetch data from external sources

JavaScript: Javascript to generate data using Javascript

 

 

 

The data is available to be stored on four different levels, or “scopes”  in the Boozang tool

 

Project level: This scope is used for common data shared across modules

Module level: This scope is used for data shared across different tests in a module

Test level: This scope is used for local test data and temp data

Parameter level:  This scope is temporary data, that should be set when invoking a test

 

Data binding is a very powerful way to use data to record filling of forms. When a user is recording a form fill and “Bind data” is enabled, Boozang will look for matching data in the specified scope. For instance, when finding data key “first_name”, this will be suggested to be filled in the “First Name” field.

 

It’s also possible to do the opposite. When recording a form fill, simply type the data into the form and click on the suggested key, and the data will be saved as JSON in the Boozang tool data tab. This allows users to create data-driven tests directly when recording, greatly adding to the re-usability of the test.

Create your account for free!

No credit card required.