Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Refactor Logging Object and simplify logging implementation #479

Open
shivahari opened this issue Oct 16, 2024 · 0 comments
Open

Refactor Logging Object and simplify logging implementation #479

shivahari opened this issue Oct 16, 2024 · 0 comments

Comments

@shivahari
Copy link
Collaborator

The logging implementation currently looks like this:

existing_logging_implementation

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:

simplified_logging_implementation drawio

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant