Self-Healing Automation with Reinforcement Learning: Adaptive Test Scripts Using PPO and Dynamic XPath in Playwright

S. Gahlot, Akhil Reddy Bairi, Muthuraman Saminathan · Journal of Artificial Intelligence General science (JAIGS) ISSN 3006-4023 · 2024

Automated testing plays a crucial role in software development, ensuring reliability and efficiency in continuous integration and deployment pipelines. However, traditional test scripts often break due to dynamic web elements and frequent UI changes, leading to increased maintenance costs. This research introduces a self-healing test automation framework leveraging reinforcement learning (RL) to adaptively modify test scripts. By integrating Proximal Policy Optimization (PPO) with dynamic XPath in Playwright, the proposed approach enables test scripts to dynamically adjust to UI changes, reducing test failures and maintenance efforts. The RL agent learns optimal XPath selection strategies, improving test stability and resilience over time. Experimental results demonstrate a significant reduction in test script failures and maintenance overhead compared to conventional automated testing approaches. This study highlights the potential of reinforcement learning in enhancing the robustness and adaptability of automated testing frameworks.

Read the paper · More papers on PaperTik