Keep assertions only in tests. Give every parallel test its own browser. Mock APIs for logic checks. Tag tests as smoke or regression. I turned all of this into a free GitHub template you can clone today.
Every time I started a new test automation project, the first weeks went to the same chores: choosing library versions, deciding on folders, wiring reports, writing a pipeline.
After the fifth time, I turned my setup into a template. This post explains the structure and the rules behind it, so you can use them even if you never clone the repo.
π§ The one rule that keeps projects clean
Tests assert. Everything else acts.
Layer What it does Assertions?
Page objects Click and type Never
API clients Send requests and return the response Never
Repositories Run SQL Never
Tests Check the result Always
Because only tests contain assertions, you can reuse every page, client and query in any test without surprises.β¦