Stop Shipping "zombie Tests": Introducing Project Vandal V0.2.0
Posted on Dec 21
• Originally published at dhirajdas.dev
Have you ever looked at a 100% green test suite and wondered: *"Is this actually testing anything, or is it just passing because the happy path hasn't changed?"* In the world of Test Automation, we often suffer from test rot—tests that remain green even when the application logic is broken. These are Zombie Tests.
Zombie Tests give you a false sense of security. They are the reason bugs slip into production despite your massive automation suite.
Vandal is a deterministic chaos engineering tool for frontends. Unlike traditional mutation testing that modifies source code (slow and rebuild-heavy), Vandal sabotages the live DOM inside your browser during test execution.
Traditional tools change your if statements to else in React/Vue source. Vandal changes the browser's reality. It strips click listeners, shifts UI elements, and sabotages form state *while the test is running*.
We've packed the v0.2.0 release with enterprise-grade features designed for high-scale apps.
The biggest challenge with UI mutation is navigation. Traditional scripts disappear on reload. Vandal v0.2.0 uses a combination of add\_init\_script and a deep MutationObserver to ensure your sabotages survive page reloads and transitions.
Modern apps are built with Web Components. Vandal now recursively penetrates Shadow DOM boundaries, ensuring that even elements hidden inside multiple shadow roots can be targeted and vandalized.
Want to test a "broken" state and then "fix" it without reloading the page? Vandal v0.2.0 caches the original state of elements, allowing you to restore them on-the-fly with await v.revert\_mutation().
Vandal comes with high-impact strategies designed to mimic real-world regressions:
Source: Dev.to