AI Generated Code = Framework Quality.
Two Test Frameworks. Same AI Agent. Same Prompt. Same Task.
๐—”๐—ฑ๐—ฑ ๐—ฎ ๐—น๐—ผ๐—ด๐—ถ๐—ป ๐˜๐—ฒ๐˜€๐˜.
Framework 1 result:
  • Test passes on first run.
  • Credentials pulled from the fixture.
  • File placed in the right folder.
  • Naming follows the existing convention.
  • Page object used. No raw selectors.
Framework 2 result:
  • Test technically runs.
  • Credentials hardcoded directly in the test.
  • New file dropped in the root directory.
  • Named `test_new.py.`
  • Raw selectors everywhere. No page object in sight.
The test in Framework 1 looks like if was written by an actual engineer.
The test in Framework 2 is a mess, it is kinda of working... but still a complete mess.
โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€
๐Ÿง  ๐‡๐ž๐ซ๐ž ๐ˆ๐ฌ ๐–๐ก๐ฒ
The AI Agent does not decide what good tests look like.
It reads what already exists in your repo and continues the pattern.
Framework 1 had fixture files, page objects, consistent naming, and a clear folder structure. The agent read all of that. Matched against it. Wrote a test that fits right in.
Framework 2 had hardcoded values, raw selectors, no structure, and copy-pasted setup code in every file. The agent read that too. It draws one conclusion: this is the standard here. And continued exactly that pattern.
โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€
๐Ÿ“Œ ๐“๐ก๐ž ๐”๐ง๐œ๐จ๐ฆ๐Ÿ๐จ๐ซ๐ญ๐š๐›๐ฅ๐ž ๐“๐ซ๐ฎ๐ญ๐ก
Before you hand your repo to an agent, ask yourself one question:
โ€œWould I be comfortable showing this code to senior engineers?โ€
If yes, start using AI coding agents.
If no, fix the framework issues first, then bring in AI. Because it wonโ€™t fix bad test automation code. It will scale it.
โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€
Want to learn how to use AI coding agents in test automation ? Checkout this live workshop.
9
1 comment
Matviy Cherniavski
6
AI Generated Code = Framework Quality.
AI & QA Accelerator
skool.com/qa-automation-career-hub
From QA Automation to AI-Powered SDET. Join AI & QA Accelerator.
Leaderboard (30-day)
Powered by