DEV Community

Cover image for Common Mistakes Senior QA Engineers Make (And How to Fix Them)
Faizal
Faizal

Posted on

Common Mistakes Senior QA Engineers Make (And How to Fix Them)

After 6+ years in QA automation — working across fintech, product startups, and enterprise software — I've seen the same patterns play out again and again. Not in junior engineers. In senior ones.

These are the mistakes that slow teams down, kill confidence in test suites, and make automation feel like a burden instead of a superpower. I've made most of them myself. Here's what I wish someone had told me earlier.


Mistake 1 🏗️ — Writing Tests Without a Strategy

Most engineers jump straight into writing test scripts without thinking about what to automate, why, and at which layer. The result? Thousands of flaky E2E tests covering things already validated by unit tests — and zero coverage on business-critical paths that actually matter.

Classic symptom: Your test suite takes 45 minutes to run and the team has stopped trusting it.

The Fix:
Apply the Test Pyramid — more unit tests at the base, fewer E2E tests at the top. Map every test to a user story or business risk. If you can't answer "what breaks if this test fails?", don't automate it yet.


Mistake 2 😴 — Ignoring Test Maintenance Until It's Too Late

Automation is not "write once, forget forever." I've seen teams where 30% of tests are permanently skipped because "we'll fix them later." Later never comes. The suite rots, trust collapses, and someone suggests scrapping everything and starting over.

The Fix:
Treat tests like production code. Add a flaky test threshold policy — if a test fails 3 times in a row with no code change, it gets quarantined and triaged immediately. Schedule a monthly "test debt" cleanup session.


Mistake 3 🔗 — Hardcoding Data, URLs & Credentials

You'd be surprised how often I see test files with hardcoded environment URLs, test user credentials, or even database connection strings baked directly into the code. This makes tests impossible to run across environments and is a serious security risk.

// ❌ Bad — hardcoded everywhere
const baseUrl = "https://staging.myapp.com";
const password = "Test@1234";

// ✅ Good — from environment config
const baseUrl = process.env.BASE_URL;
const password = process.env.TEST_PASSWORD;
Enter fullscreen mode Exit fullscreen mode

✅ The Fix

Use .env files and a config layer. Never commit credentials to git. Use secret managers (GitHub Secrets, AWS Secrets Manager) in your CI/CD pipelines.

// ❌ Bad — hardcoded everywhere
const baseUrl = "https://staging.myapp.com";
const password = "Test@1234";

// ✅ Good — pulled from environment
const baseUrl = process.env.BASE_URL;
const password = process.env.TEST_PASSWORD;
Enter fullscreen mode Exit fullscreen mode

Mistake 4 ⏰ — Using Thread.sleep() Instead of Smart Waits

Static sleeps are the silent killer of automation suites. They make tests slow on fast machines and flaky on slow ones. Even experienced engineers fall into this trap when debugging locally and forgetting to clean up.

🚨 Real impact: A suite with 200 tests each having a 2-second sleep adds 6+ minutes of pure wasted time per run.

✅ The Fix

Always use explicit waits — wait for a specific element state, network idle, or API response.

//Bad approach:
await page.waitForTimeout(3000);

//Good approach in Playwright:
await page.waitForSelector('#submit-btn', { state: 'visible' });

//Good approach in WDIO:
await $('#submit-btn').waitForDisplayed({ timeout: 5000 });
Enter fullscreen mode Exit fullscreen mode

Mistake 5 📊 — Not Measuring Test Coverage or Quality

Having 500 automated tests means nothing if they all test the same login flow 500 different ways. Senior engineers often assume "more tests = better coverage." Without metrics, you're flying blind.

✅ The Fix

Track these as KPIs every sprint:

  • Code coverage % — use Istanbul for JS, JaCoCo for Java
  • Feature coverage — maintain a traceability matrix mapping tests to requirements
  • Flakiness rate — aim to keep it below 2%
  • Average test run time — flag any single test taking over 30 seconds

Mistake 6 🤐 — Treating QA as a Gatekeeper, Not a Partner

The biggest non-technical mistake on this list. Senior QA engineers who position themselves as the "final blocker before release" create friction, resentment, and an us-vs-them culture. Quality is everyone's responsibility, not a single department's job.

✅ The Fix

Shift to a quality coaching mindset. Get involved early — in sprint planning, design discussions, and code reviews. Help developers write testable code from the beginning. Quality built-in beats quality bolted-on every single time.

Top comments (0)