Issue #3 — “The Login That Only Worked After Midnight”

Published on August 1, 2025

Issue #3 — “The Login That Only Worked After Midnight”

🌼 Lady Daisy Bug: A QA & Test Automation Digest with Personality

Welcome to Lady Daisy Bug — your new favorite corner of the internet where quality assurance meets charm, code, and character. Whether you’re debugging tests in the moonlight or strategizing a flawless regression suite before your first coffee, this newsletter’s for you.

I’m your host, Lady Daisy Bug — part test whisperer, part bug wrangler, and full-time believer in thoughtful testing. Each issue will blend bite-sized insights, automation tips, and a little QA storytelling to brighten your day (and your pipelines).

Let’s squash some bugs — and do it in style.

🌟 Bug of the Week: The Login That Only Worked After Midnight

Story:
I was running nightly automation when something strange emerged from the CI shadows:

✅ Login tests passed flawlessly between 12:00 AM - 4:00 AM.
❌ Same tests failed every other hour.

No code changes. No backend deployments. Just… moonlight magic?

Symptoms:

  • “Invalid Credentials” error on login, despite using valid test accounts.
  • Only failed during working hours — local or UTC didn’t matter.
  • Re-running tests manually… passed.

Root Cause:
A subtle rate-limiting rule had been added to the staging environment — limiting login attempts per IP during peak hours to throttle automated login spam. The CI runners were triggering the limit.

How I cracked it:

  • Compared test logs by timestamp.
  • Reproduced manually during the day and traced the backend response headers.
  • Spotted a 429 Too Many Requests masquerading behind a generic “Invalid credentials” message.

Fix:

  • Worked with DevOps to whitelist CI IPs for staging.
  • Added retries + 429 detection in the test framework.

📌 Lesson: Not all test failures are bugs in your code. Some are bugs in your environment assumptions.

🧪 Test Garden Tip: Add Retry Logic (The Right Way)

Sometimes, retries are your best friend — as long as they’re smart, not sloppy.

Example with Python’s tenacity library:

from tenacity import retry, wait_fixed, stop_after_attempt

@retry(wait=wait_fixed(2), stop=stop_after_attempt(3))
def login_user():
driver.find_element(By.ID, "username").send_keys("testuser")
driver.find_element(By.ID, "password").send_keys("test123")
driver.find_element(By.ID, "login").click()
assert "Welcome" in driver.page_source

Why it works:
This approach gives flaky endpoints room to breathe — but stops after a few logical tries. Combine it with logging + alerts for patterns.

💬 Lady’s Log

“If a test fails once a week, it’s not flaky. It’s mysterious. And mysteries are where the fun begins.”

We don’t just automate tests. We investigate.
Keep your logs clean, your timestamps handy, and your inner detective wide awake.

- 𝓛𝓪𝓭𝔂 𝓓𝓪𝓲𝓼𝔂 𝓑𝓾𝓰 🐞🌼

📚 Petal Picks

💌 Next Week on Lady Daisy Bug

We investigate a mysterious screenshot mismatch caused by… dark mode. 🌑

Hint: Visual testing is trickier than it looks.

LinkedIn

GitHub

Medium

Patreon

X