{"slug": "i-cut-my-ai-test-automation-cost-by-300x-by-ditching-vision-models", "title": "I Cut My AI Test Automation Cost by 300x by Ditching Vision Models", "summary": "A developer reduced AI test automation costs by 200-300x, from $0.011 per step to $0.00004, by replacing vision models with a pure-text approach. Instead of sending full-page screenshots to multimodal LLMs, the new framework extracts interactive elements directly from the DOM tree and uses DeepSeek V4 to analyze the structure and decide actions. The author notes that for standard CRUD operations like filling forms and clicking buttons, vision models are overkill since the DOM already contains all necessary information.", "body_md": "From $0.011 per step to $0.00004 — here's how I learned vision models are overkill for most web testing, and what I built instead.\nIt started with a $400 monthly API bill (and yes, that's USD — I'm in China, but you'll feel the same pain in any currency).\nI was running an AI-powered test automation platform built on Midscene.js with Qwen-VL vision models. Every test step meant sending a full-page screenshot to a multimodal LLM — and paying about $0.011 per step.\nA 50-step test case cost about $0.55. Run it daily? $16.50/month. Add a few more test scenarios, and suddenly I was spending more on API calls than on coffee.\nAnd the worst part? Most of those screenshots contained information I already had for free.\nFirst, a quick backstory.\nI built ai-test-platform, a full-stack test automation management system:\nIt worked. Beautiful reports, clean UI, easy test management. I even pushed it to Docker Hub (xulingfeng/ai-test-platform:latest\n).\nBut every time I ran a test, I could almost hear the coins dropping. $0.011 here, $0.011 there. A 29-step doctor-onboarding flow cost $0.32.\nFor a solo QA engineer running tests multiple times a day, that adds up fast.\nI was watching a test run one afternoon. The AI was analyzing a screenshot of a web page — and I realized something:\nThe AI could see 45 interactive elements in the screenshot. But Playwright had already extracted all 45 of them as clean structured text.\nI was paying to process pixels when the data was already neatly organized in the DOM tree.\nHere's what a page looks like to a vision model:\n[screenshot image with pixel data, rendering details, colors, shadows...]\nAnd here's what it looks like in the DOM:\n[0] <input placeholder=\"Search...\" name=\"q\">\n[1] <button>Sign in</button>\n[2] <a>Add new doctor</a>\n...\nThe AI doesn't need to \"see\" the page. It needs to understand the structure and decide what to click. And structured text does that perfectly.\nI built deep-test — a pure-text AI testing framework.\nThe architecture is embarrassingly simple:\nTask: \"Login system, search product, add to cart\"\n↓\n① Extract interactive elements (DOM tree / uiautomator)\n(No screenshots. No vision models.)\n↓\n② DeepSeek V4 analyzes structure + decides next action\n(~2000 tokens/step × $0.14/M = $0.0001/step)\n↓\n③ Execute action (Playwright click / ADB tap)\n↓\n④ Back to ① until task completes\nThe cost comparison is ridiculous:\n200-300x cheaper. The 50-step test that cost $0.55 now costs less than a cent.\nI ran a complete hospital management workflow — login, navigate menus, add a new doctor with 12 fields, verify the result. 29 steps total.\nResult: 81.8 seconds, ~$0.001 total cost.\nFor context, that's less than the price of a single step on the vision-based approach.\nHere's where it gets even more interesting.\nAndroid apps can't give you a clean DOM tree like a web page. So I added a hybrid approach:\nThis means one AI agent handles both Web and Android with the same architecture.\nAnd I even solved the notorious hybrid app WebView input problem — where in-app web views ignore standard automation commands. The fix: uiautomator2.send_keys()\ninstead of set_text()\n. Took days to figure out, one line to implement.\nVision models are overkill for most web testing.\nThey're great for:\nBut for standard CRUD operations — filling forms, clicking buttons, navigating menus — the DOM already has all the information you need.\nThe real optimization isn't about better prompting or smarter AI. It's about choosing the right data format for the job.\nBoth projects are not yet public — they contain real test data from production healthcare applications. I plan to clean and open-source them once the company-specific content is stripped out. If you'd like early access or want to discuss the approach, feel free to reach out.\nThe tech stack:\nI'm a test manager with 15 years of experience. I've been building AI testing tools on the side because I believe good testing shouldn't cost a fortune. If this resonates, I share more practical testing prompts and techniques in my toolkit: xulingfeng.gumroad.com/l/vkhhq", "url": "https://wpnews.pro/news/i-cut-my-ai-test-automation-cost-by-300x-by-ditching-vision-models", "canonical_source": "https://dev.to/xulingfeng/i-cut-my-ai-test-automation-cost-by-300x-by-ditching-vision-models-4go7", "published_at": "2026-05-20 06:41:11+00:00", "updated_at": "2026-05-20 07:04:59.724190+00:00", "lang": "en", "topics": ["artificial-intelligence", "developer-tools", "open-source", "products"], "entities": ["Midscene.js", "Qwen-VL", "Playwright", "Docker Hub", "ai-test-platform"], "alternates": {"html": "https://wpnews.pro/news/i-cut-my-ai-test-automation-cost-by-300x-by-ditching-vision-models", "markdown": "https://wpnews.pro/news/i-cut-my-ai-test-automation-cost-by-300x-by-ditching-vision-models.md", "text": "https://wpnews.pro/news/i-cut-my-ai-test-automation-cost-by-300x-by-ditching-vision-models.txt", "jsonld": "https://wpnews.pro/news/i-cut-my-ai-test-automation-cost-by-300x-by-ditching-vision-models.jsonld"}}