GOOD TEST AUTOMATION FRAMEWORK CHECKLIST
(1) Reusable methods or Page classes -create reusable methods whenever you find repeatable code. Don’t duplicate same thing multiple times.
(2) Explicit wait- Thread sleep delays everywhere in test scenarios and also effect on performance by throwing an exception error if page is not loaded till the time which we mentioned in thread sleep but Explicit wait is basically based on conditions where it will wait for element till it is not displayed.
(3) Variable names should be meaningful.
(4) Try to use public API instead of creating utility files from scratch
(5) For reporting do not use Print statement. Always use Report mechanism like Testng, allure reports etc.
(6) Use Headless Browser wherever it is needed For e.g. you are getting catches after launching the browser and Closing all those catches are consuming lot of time so to avoid those catches and to increase efficiency try to use headless browser.
(7) Try to reduce unnecessary loops in your code.
(8) Test framework should organize in well-defined Packages. e.g
Pages, test and utility should reside in their respective packages only.
(9) Documentation on deploying automation Framework.
(10) logging facility should be in your Framework to log files when something goes wrong.
(11) Base driver support to run in multiple browsers.
(12) Detailed report on test execution and failure.
(13) Screenshot on failure should also be there in while generating reports.
(14) Use BDD but this is not mandatory.
(15) Use dependency management like Maven for Java and PIP for Python.