Think of automation as a living project. It’s a cycle that grows and adapts with your product. A loop of planning, building, running, fixing, and improving. In this section you can get familiar with the stepst of this lifecycle, from planning to execution.
Planning & Requirements Gathering
Before writing a single line of code, decide what you actually want to automate. As we talked about it earlier in this course, it is an important step, as not everything has to be automated, and not every test brings value. Planning ahead means to build an effective test plan and find the best testing approaches.
Focus on:
- High-risk areas (things that often break).
- Repetitive regression tests (things you run every release).
- Time-consuming manual flows.
Example: Instead of automating the whole app, start with “login” or “checkout,” because these are core and repetitive.
Tool Selection
The preivious chapter showed us the wide range of tools we can use for test automation. Choosing the right tool for the task ensures that everything flows smoothly, and our tests will bring value.
Consider:
- Language your team already knows (Python, JavaScript, Java?).
- Community support & documentation.
- CI/CD integration (does it play nicely with Jenkins, GitHub Actions, etc.?).
- Features you need (parallel runs, reporting, mobile/web coverage).
Example: If your team writes in JavaScript, Cypress or Playwright may be easier than Selenium.
Framework Setup
The frameworks and tools are usually come hand-in-hand. Choosing the required testing tool offers it’s framework to ensure smoothless execution. Here you can reach back to Selenium, Playwright, Cypress, and many more.
Example: Instead of repeating “login” steps in every test, build a LoginPage
class once and reuse it.
Test Development This is the phase where the magic starts after the preparations. In this phase we write the actual tests, step-by-steps instrucrtions in code.
Best practices:
- Keep tests short and focused.
- Make them readable (future you will thank you).
- Reuse functions instead of copy-pasting.
Example:
- Open homepage
- Enter product name
- Verify results show the right item
Execution & Reporting
In this phase we execute the tests and and share the results. The results should be presented in a form every involved party understands. Transparency and communication is essential.
Good reporting can bring quick debugging and visibility for managers.
Tools: built-in reporters (Playwright), dashboards (Allure), CI/CD logs.
Example: Instead of “Test failed,” a good report says: “Checkout test failed at Step 3: Payment gateway timeout.”
Maintenance & Refactoring
To ensure that our automated tests still birngs value and provides useful result, regular maintenance and refactory is a must. This means the tests should be revised every time the app changes. If the maintenance is skipped, with time the tests become obsolete.
Key habits:
- Update selectors when the UI changes.
- Remove or fix flaky tests.
- Refactor duplicated code.
Example: If the “Login” button’s ID changes, fix it once in LoginPage
instead of 15 tests separately
Retrospective & Optimization Automation is never “done.” You’ll always find ways to make it faster, more reliable, or more useful.
Questions to ask:
- Did we automate the right things?
- Are tests giving fast and clear feedback?
- What can we improve (parallel runs, better reporting, CI/CD triggers)?
Example: After a sprint, you might decide to move smoke tests into CI/CD so bugs are caught earlier.