In this video, we'll go with the basics of Winston logger and how to generate a log file for the Playwright.
In this video, the creator discusses the use of the Winston logger in test automation. The video starts by explaining how console.log is commonly used in test automation to track the progress and status of tests. However, when running test scripts in CI/CD pipelines or GitHub actions, relying solely on console logs may not be effective as the logs can be cleared or overwritten by other jobs.
The logger object can then be used in place of console.log throughout the code. The creator shows an example of logging with different levels (e.g., info, warning) and demonstrates how the logs are stored in a file or displayed in the console, depending on the specified transport option. Finally, the creator mentions that in the next video, they will show how to use the logger in a base class or fixture.
Rayrun is a community for QA engineers. I am constantly looking for new ways to add value to people learning Playwright and other browser automation frameworks. If you have feedback, email email@example.com.