Skip to content

How can I auto log cypress test name? #28717

Discussion options

You must be logged in to vote

Hey hey @dushkin 👋🏼 You don't need to remember it because you can add it globally in beforeEach loop to support/command.js file.

beforeEach(() => {
    cy.log(`Executing beforeEach() for: ` + Cypress.currentTest.title)
  })

So this way it is added only once 🚀

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@dushkin
Comment options

Answer selected by dushkin
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
2 participants