Sector(s)

Project Team

Team members

SDP was setting up a test automation framework to reduce reliance on manual testing. Salsa Digital provided resources to review the framework and then create/code the automated tests.

Describe the project (goals, requirements and outcome)
Back to top

DPC’s challenge

Victoria’s Department of Premier and Cabinet (DPC) is responsible for Victoria’s whole-of-government digital platform, Single Digital Presence. Like most active platforms, SDP requires a lot of testing. DPC was developing an automation framework to reduce reliance on manual testing.

Back to top

DPC’s transformation — developing sustainable, automated tests for SDP

The solution was to create more global test scenarios and map them to components that are reused across multiple content types. This leverages the component-based design by creating component-based automated tests. For example, an accordion component should have the same test on different content types, so it can be reused easily, rather than receiving its own test script over and over again with slight differences.

The framework was set up by SDP, including choosing the tools for the project — Nightwatch.js and Cucumber, integrated with CircleCI. The Salsa Digital team then worked with SDP to extend on that framework, including adding visual testing and cross-browser testing. Salsa also helped in the research phase, comparing the cross-browser testing tools on the market and setting up a proof of concept. SDP then chose BrowserStack Automate.

The SDP automated tests imitate user behaviour in both the backend (BE) and the frontend (FE). 

The automated tests imitate:

  • An editor logging into the Drupal CMS and adding some content, using most of the fields available
  • Saving the content
  • Checking the decoupled FE (Ripple) to make sure the FE content matches the entered data

The automated tests are written in Nightwatch.js and the human-readable test scripts are written in Cucumber's Gherkin script. The tests are run locally first and then go into the test repository and are run on every pull request change in GitHub via CircleCI.

Salsa Digital’s QA engineers were embedded into the SDP sprint team, working with SDP’s internal test engineers. SDP’s QA team provided test steps for Salsa to automate. Some of the specific features that Salsa Digital created automated tests for include:

  • Webforms (BE) and embedded webforms (FE)
  • Image gallery
  • Campaign with video (BE)
  • Timeline (BE and FE)
  • Site navigation tests
  • Navigation cards (BE and FE)
  • Numbered lists (BE and FE)
  • Table of contents on landing pages
  • Bullet formatting in WYSIWYG editor
  • Footer elements
  • Header elements
  • Accordions (reusable across content types)
Back to top

The outcomes — faster testing and shorter dev release cycle

The high-level outcomes for the QA automation project include:

  • An improved testing framework
  • Overall reduction in time taken to develop and test new features
  • Improved test stability — refactoring the tests and test framework to improve stability
  • Test maintainability — restructuring the tests and test framework so the code is reusable and easy to maintain
  • Improved test coverage — from 20 automated tests to 100 during the project
  • Reduced testing time, which means releases can happen faster
  • Improved developer confidence when adding or changing features
Back to top
Why Drupal was chosen

Drupal is the CMS of choice for the Victorian Government in Australia. In 2018, Victoria’s Department of Premier and Cabinet and Salsa Digital built a headless Drupal instance as part of a new open source, whole-of-government platform, Single Digital Presence. Drupal was chosen as the CMS and is being used to drive consolidation and an open source community within the Victorian Government. Single Digital Presence consists of three products:

  1. Bay — an open-source platform based on Lagoon
  2. Tide — a Drupal CMS distribution
  3. Ripple — coupled with Nuxt, the frontend presentation layer
Image

Technical Specifications

Drupal version: