Lesson 82: Base Framework Scaffold
Module 9: The Master Capstone | Building an industry-grade framework from scratch
🎯 Learning Objective: Set up the repo, virtual env, logging, and config loaders in a way that survives CI/CD pipelines at scale.
1 The Junior Trap: “I’ll Just Hardcode It”
Every manual tester or junior developer turning to automation writes something like this in their first week:
# test_login.py — The Junior Version
BASE_URL = "https://staging.myapp.com"
USERNAME = "admin"
PASSWORD = "secret123"
It works. Once. On their laptop. Then they push it to the CI server and the build turns red. Here is exactly why:
The path
staging.myapp.comdoesn’t exist in the CI container. The pipeline targets a different environment and nobody thought to change the string.The password is now in Git history — forever. The security team calls. It is a bad day.
There is no logging. When the job fails at 2 AM, the only output is
AssertionError. Nobody knows which environment was running or what config was loaded.
This is not just a bad habit — it is an architectural failure that compounds. Every new test copy-pastes those hardcoded values. Six months later you have 200 test files, each with their own version of BASE_URL. Change environments? Change 200 files. This is the trap. The rest of this lesson is the escape route.



