This is how my code looks in e2e.js
import 'cypress-mochawesome-reporter/register';
// Import commands.js using ES2015 syntax:
import './commands';
import sqlServer from 'cypress-sql-server';
afterEach(() => {
cy.wait(50, { log: false }).then(() =>
cy.addTestContext({
title: "Execution log",
value: Cypress.TerminalReport.getLogs("txt"),
})
)
})
const logsCollectorOptions = {
collectTypes: ["cy:command", "cy:log"],
}
require("cypress-terminal-report/src/installLogsCollector")(logsCollectorOptions)
I have also added the below code in cypress.config.js
require('@cypress/grep/src/plugin')(config);
require('cypress-terminal-report/src/installLogsPrinter')(on);
require("cypress-terminal-report/src/installLogsPrinter")(on)
require("cypress-mochawesome-reporter/plugin")(on);
When i run the tests, i can see the normal html reports without any logs. I want to see the logs also embedded in html report. what can i do?. Plz help me….
New contributor
Sarika Gopal is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.