Write Selenium and Appium tests in Python using the Page Object pattern. This Pythonic GUI and API test automation framework will help you get started with QA automation quickly. It comes with many useful integrations like - email, BrowserStack, Slack, TestRail, etc. This repository is developed and maintained by Qxf2 Services.
The logging implementation currently looks like this:
The LoggingObject object reads the logging configuration from the BaseLogging object through composition, the LoggingObject is then inherited into BasePage.
The problem with this approach is that the pytest logs for test collection and failure summary is not present in the log file. The implementation also conflicts with SOLID object oriented design principles.
Modify the implementation to look like this:
The pytest logging fixture - caplog should create an instance of the LoggingObject, this instance then should be used in BasePage through composition. This way, the pytest logs are also captured in the log files and the LoggingObject becomes more cleaner.
The logging implementation currently looks like this:
The
LoggingObject
object reads the logging configuration from theBaseLogging
object through composition, theLoggingObject
is then inherited intoBasePage
.The problem with this approach is that the
pytest
logs for test collection and failure summary is not present in the log file. The implementation also conflicts with SOLID object oriented design principles.Modify the implementation to look like this:
The
pytest
logging fixture -caplog
should create an instance of theLoggingObject
, this instance then should be used inBasePage
through composition. This way, thepytest
logs are also captured in the log files and theLoggingObject
becomes more cleaner.