You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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 text was updated successfully, but these errors were encountered:
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.The text was updated successfully, but these errors were encountered: