Bubblegum: A Selenium Framework for the ClearCare Platform
Bubblegum is our front-end test automation framework. It uses Selenium written in Python and is designed using the page object design pattern.
The tests themselves utilize the pytest/pytest-bdd testing framework. Bubblegum can be found within our GitHub repo. Tests can be run locally,
headlessly within a docker container, or in the cloud via BrowserStack. BDD Feature files are written in HipTest and then synced to Bubblegum
via HipTest Publisher.
BDD: the bubblegum/bdd folder contains the features and steps directories. Feature files are the test cases written in natural language
and are usually defined by product and QA. Steps take natural language fragments declared within the feature file and associates them to a pythonic function.
Page functions are declared in the bubblegum/pages directory.
Data: the bubblegum/data directory is composed of factoryboy data models, factories, and static data factories. The static directory defines our test
agency settings and data configurations. There are scripts in the tests/utils directory which utilizes Selenium to create data in the test agencies on production.
Data created by the scripts are logged in json. The basic structure to the factoryboy files are — models define all the objects that exist in the ClearCare platform
and contains their default values, factories create a default instance of the object, and static files define a specific configuration. Static factories are used to
assert the values of agencies and profiles as they should appear in the app.
Pages: the bubblegum/pages directory is the core of the bubblegum framework. This directory contains all the page objects for the ClearCare platform.
Each page contains information and functions for interacting with its elements.
Within the docs directory are Sphinx rst files for bubblegum's readthedocs. You can generate the html locally by running 'make html' from within this directory.