Identifying and reducing test case combinatorial explosions with Python's Abstract Syntax Tree(AST)
Test matrix explosions are a growing challenge in modern software testing, especially when using parameterized tests in machine learning pipelines. This article presents an innovative approach combining Python's Abstract Syntax Tree (AST) analysis and the parameterized testing framework Pytest to identify a mapping of test parameterizations, thereby revealing hidden redundancies. By strategically trimming the test matrix, this approach reduced test cases for our team by 35% and reduced CI/CD pipeline execution times by more than one-fourth to half, demonstrating the power of static analysis for smarter test management.
Paper | Presentation
Arun Vishwanathan
I work as a Senior Software Engineer in Test Development tools and frameworks at Apple, Inc., in the Machine Learning organization. I drive several product quality approvals and manage team members internally. I create testing automation tools and frameworks for use within the team and across other teams, with a focus on efficiency and improving productivity. These tools help qualify the product stack as a whole and catch real issues before they reach customers. As part of my role, I also present product health statistics to senior company executives.