Model-Based Test Automation for Shadow DOM

Generate functional tests for complex web applications

Test Modeller enables rapid and rigorous functional test automation for web applications built with Shadow DOM, moving quickly from application scans to optimised test suites. 

let's talk


More brittle identifiers to maintain?!

Using Shadow DOM offers greater flexibility to web developers but can add to the delays associated with overly manual test automation. Shadow DOM trees often force automation engineers to extract identifiers from multiple roots, laboriously embedding them in test scripts. These test scripts must be highly repetitious in order to test the application logic sufficiently, leading to significant time spent editing, copying and pasting boilerplate code. The brittle test suites then break as the system changes, and Shadow DOM identifiers must be updated. Manual test maintenance in turn prevents rigorous test automation in-sprint, while inaccurate or unavailable test data further leaves web applications exposed to damaging bugs. 


Rapid functional test automation for complex web applications

Test Modeller makes testing web applications with Shadow DOM quick, simple and rigorous. An application scanner automatically builds automation modules for each scanned component, incorporating the Shadow Root and CSS identifiers associated with each element. Scanned elements can then be dragged and dropped to intuitive BPMN-style models, leveraging “Fast Modelling” to identify the equivalence classes associated with each element. This rapidly builds logically complete models, before applying automated coverage algorithms to create the smallest set of tests needed to test the modelled web application completely.

Shadow DOM

The comprehensive test suites are synchronized with ALM and test management tooling, while a customizable code generation engine compiles automated tests for a widerange of languages and frameworks. Script generation assigns “just in time” data to each test on-the-fly, for continuous test execution without the delays associated with test data. If the web application changes, any impacted elements can simply be re-scanned, rapidly updating complete functional test suites. This automatically re-synchronizes automation frameworks stored in source control systems and test cases in test management tools, maintaining complete functional tests at the speed of rapid releases. 


In-sprint test automation for Shadow DOM applications

Watch this short example of model-based test generation for a Java functional test automation framework, and discover how: 

  1. Scanning a web UI constructed with a Shadow DOM automatically builds complete page objects and implementation code in C#, Java, Javascript, VB Script, Python and more.

  2. Test Modeller’s application scanner automatically identifiers Shadow DOM roots and CSS identifiers, avoiding the time scripting complex and repetitious element locators.

  3. “Fast Modelling” rapidly converts the scanned elements into logically complete models, identifying the equivalence classes associated with each scanned element.

  4. Automated coverage algorithms generate the smallest set of test scripts needed to test the modelled web application rigorously, detecting defects earlier and at less cost to fix

  5. Exporting the optimised test cases to test management tools like Zephyr, Azure DevOps and ALM/Octane creates a link to Test Modeller, auto-updating test cases after test execution.

  6. Test script generation embeds dynamic test data functions in each test, pushing the automation code to Git repositories automatically and triggering CI/CD processes to execute tests.

  7. Updating the central models re-generates and synchronizes the automated test scripts and test cases, enabling comprehensive automated testing in short iterations.


Speak with an expert

Discover how Model-Based Test Automation can help you automate today!

let's talk