An automated testing framework is the core of the entire automation system, defining the structure of test scripts, managing their execution, providing reports, and ensuring integration with other tools.
Background: Initially, most projects used simple testing scripts in isolation, leading to chaos and maintenance difficulties when scaling. Over time, the need for a unified automation system emerged, leading to the creation of specialized testing frameworks.
Problem: The main difficulty is the rapid aging of tests and fragmentation of approaches, making tests difficult to maintain and ineffective when changes occur in the application.
Solution: A strong architectural foundation should be laid: highlight levels (e.g., test runner, page objects, utilities); use design patterns (e.g., PageFactory), implement code quality control (linters, code reviews), and regularly refactor the framework while maintaining its documentation.
Key features:
What is the difference between a testing framework and a testing library?
A framework is a skeleton for building tests, defining architecture, structure, and processes, while a library simply provides a set of functions/methods.
Is it possible to start automation without a framework, using only Selenium + JUnit?
Technically yes, but in scalable projects, this approach will inevitably lead to chaos and code duplication.
Why shouldn't a new framework be implemented in a project without discussing it with the team?
The framework impacts all testing processes and requires the involvement of the entire team for maintenance and further development; implementation without agreement will lead to fragmentation and resistance.
In the automation team, everyone writes test scripts "as they see fit," not using a generalized framework. As a result, hundreds of tests do not scale, maintenance is complicated, and onboarding new colleagues takes a very long time.
Pros:
Cons:
The team approved a minimal framework (Selenium + Allure with support for Page Objects, reporting, and logging) and agreed on the structure. Initially, it took a bit longer to start, but the project's development has fast and reliable automation in the long term.
Pros:
Cons: