Videos

Follow along with one of our tutorials to get you up and running with Boozang.

What will you learn?

  • To automate testing of common application scenarios using a data-driven test approach
  • Report bugs and create regression tests right in the browser window
  • Get a good foundation on how to do data-driven test automation
Learn Test Automation with Boozang
Free course on Udemy
Advanced Test Automation using Boozang
Free course on Udemy

Signing Up

Getting started
Signing up to Boozang

In order to get started the student is encouraged to create a Udemy project in the Boozang Cloud. This way the student can follow along all the lectures by creating their own automated tests. This requires the student to create a free account at https://boozang.com using their email address. The name for the project used in the course is "TheShop" but you can choose anything you like. The web application we will be testing is "http://theshop.boozang.com" and it needs to be entered on project creation.

Overview

Getting started
Overview of the tool

Overview of the Boozang tool. The Boozang tool has a lot of features that we are not going into, so take your time to get familiar with the tool, especially the multi-level navigation which can be a little tricky at first.

First Recording

Getting started
Recording your first test – Add to cart

Now you are ready to record your first test. This lecture outlines how you can record a simple test scenario using the Boozang tool.

First Validation

Getting started
Making your first validation – Validate cart contents

Validations (a.k.a. assertions) are a core concept in test automation. Here we create a first simple "Validate Exists" condition. In Boozang a number of Validations are supported. For a deep-dive, consult the official documentation: http://docs.boozang.com/#validations.

Improving the selector

Getting started
Improving the test path – Add to cart

The "Add to cart" test we created wasn't strict enough. We improve the element path by using the edit function in the "Element" tab. Element paths are a complicated topic in itself, and Boozang has invented its own policy. To get more information on this, check the official Boozang documentation: http://docs.boozang.com/#elements.

First test suite

Getting started
Bringing it together – Simple test suite

Test suites are used to setup a test execution sequence of other tests. As any test in Boozang can call other tests via the plug-test cation, test suites works just like other tests in Boozang.

First data-driven test

Doing data-driven testing
Add item to cart – data-driven

After this lecture you will have created your data-driven test. Using data is central to Boozang and test-automation in general. In tests where the data is hard-coded, test are not re-usable, and the test stack would quickly grow to thousands of tests. This would be unfeasible in terms of management and maintenance.

Data-driven validation

Doing data-driven testing
Validate item in cart using data

Here we create a data-driven validation. If we create our "action-tests" to adapt to data, we also have to make our "validation" tests do the same.

Data-driven test suite

Doing data-driven testing
Updating the test suite to be data-driven

In this tests, we add parameter data to the test suite, and show how we can send this downstream to the tests in question.

Clearing the cart

Doing data-driven testing
Test setup – Implementing Clear Cart

Setting up the initial testing conditions before running a test is crucial to avoiding getting unexpected failures. In our simple case, this simply means making sure the shopping cart is cleared. We customize action "exit conditions" to simply skip the test if the cart is already empty, instead of reporting a failure.

Loops

Doing data-driven testing
Loop over data

In this test, we loop over a list of product items to highlight the usefulness of data-driven tests. We use the array data "$test.items" and use the handle "$loop" to access the items ("$test.items[index]).

Cucumber introduction

Using BDD/Cucumber to link requirements
Cucumber introduction

In this test we give a really quick introduction to Cucumber tests. The Cucumber features for TheShop can be found at https://github.com/ljunggren/theShop. To learn more about the Cucumber language, see the official Cucumber site: https://cucumber.io/ and the Boozang forum: https://cucumber.io/

Import features

Using BDD/Cucumber to link requirements
Import the feature files from GitHub

We import the features from GitHub.

Validation of cart

Using BDD/Cucumber to link requirements
Validating cart contents

Running the clear cart test should only be needed when the cart is actually has contents. We utilize a validation condition to only clear the cart when it has contents. 

Data-driven validation

Using BDD/Cucumber to link requirements
Validation of cart contents – data-driven

This time we look at how we can validate the cart contents based on data. We see that the validation can happen on the page underneath the cart, so we look how we can make the element path more specific using the edit element function (DOM picker).

Price validation

Using BDD/Cucumber to link requirements
Checking price data

We also add a validation that takes "price" as a parameter, and validates the total price in the cart.

Static form fill

The Checkout
Doing the check out using static data

After learning to record simple navigation tests and being able to add things to the shopping cart, the natural next step is to checkout the goods. We here record a simple check-out. We use static data to fill out the payment form.

Dynamic form-fill

The Checkout
Checkout using dynamic data

Here we again create a checkout, but we save the form information as Boozang data, so it can be changed independent of the test. We use the static data test as a starting point and replace it with Boozang data that we define on $module level.

Data-binding

The Checkout
Checkout using data-bind to fill form

Instead of starting with a recorded test case with static data, we use data bind functionality to directly use the data we have defined at $module level to bind it into the payment for as we record the test.

Regular Expressions

The Checkout
Using regular expressions to generate data

In this example, we replace some of the data with random data generated from regular expressions.

Cucumber: Checkout

Implementing Cucumber Checkout feature
Cucumber Checkout case

Here, we look at the Checkout scenario in Cucumber and bind it to the tests in the previous scenario.

Cucumber: Scenario

Implementing Cucumber Checkout feature
Implementing scenario – Approve order

We do the same for approve order, but run into trouble when trying to validate that the order was done. We add a TODO marker to the test to remind us we need to go back and fix at a later point in time.

Couldn't find what you were looking for?

Request your desired video tutorial!

Create your account for free!

No credit card required.