## HMCTS Digital Overhauls Legacy Testing with API-Driven Case Factories & Axe-Core Accessibility Suite
The HMCTS Digital team is executing a foundational overhaul of its functional and accessibility testing framework, targeting legacy Jest-based tests and manual case setup processes. The core change replaces the old Jest accessibility suite with a Playwright/Axe-core integration and introduces a new API-driven case creation factory. This shift aims to eliminate manual, environment-dependent setup steps that have been a source of test flakiness and inefficiency.

The implementation centers on a new `ContestedCaseFactory.ts` designed to programmatically create and progress cases through key CCD events like HWF Decision, Issue Application, and Progress to Listing. This is supported by a dedicated `CcdApi.ts` module featuring exponential backoff and retry logic to manage the eventual consistency challenges inherent in the CCD platform. Furthermore, the team has extended Playwright fixtures to automatically provide pre-authenticated browser sessions and pre-generated contested case data for every test run, embedding the new factory into the core test infrastructure.

This modernization drive signals a strategic move towards greater automation, reliability, and security within the HMCTS digital pipeline. By programmatically managing case data and integrating robust accessibility scanning directly into the functional test flow, the team is addressing long-standing pain points around test stability and compliance. The changes, tracked under Jira ticket DFR-4256, represent a significant technical debt payoff and a step-change in the team's ability to deliver and validate software for the court system with reduced manual overhead and increased confidence.
---
- **Source**: GitHub Issues
- **Sector**: The Lab
- **Tags**: Software Testing, Playwright, Accessibility, API Automation, CCD
- **Credibility**: unverified
- **Published**: 2026-04-01 08:27:04
- **ID**: 44892
- **URL**: https://whisperx.ai/en/intel/44892