New in 2.0.x
Automated Testing Kit is shipped with custom reporting or logging capabilities which allow to customize test output and vary its verbosity by configuring log level.
In Cypress
To put custom log in Cypress, the built-in command is
cy.log('Message')
Automated Testing Kit adds custom commands:
cy.debugLog('This is debug message')
cy.trace('This is trace message')
Whether debug or trace log message will be shown can be configured via Cypress "atkLogLevel" env, either in cypress.config.js or in command line --env parameter.
cypress --env atkLogLevel=1 open|run // debug
cypress --env atkLogLevel=2 open|run // trace
cypress --env atkLogLevel=DEBUG open|run // debug
cypress --env atkLogLevel=TRACE open|run // trace
In Playwright
In Playwright, Automated Testing Kit adds a custom console reporter which leverages Winston library. It is configured in the reporter option of playwright.config.js, and can be opted-out if you want to use default Playwright console output or some other custom reporter.
It has the following levels:
info (default) - no debug information is shown;
debug - only test run and status are shown;
silly - each test step is shown, beside of that test console output is shown, such as Drush commands output, and messages from console.log() within the tests.