Skip to content

Failure in nested before hook makes root-level test disappear from report #213

@JessefSpecialisterren

Description

@JessefSpecialisterren

To Reproduce
Run this spec with allure reporting enabled:

it('root-level test', () => {
  cy.log('root-level test')
})

context('somecontext', () => {
  before(() => {
    cy.log('nested before hook')
    throw new Error('failure in a nested before hook')
  })

  it('nested test', () => {
    cy.log('nested test')
  })
})

Note how the resulting report only contains nested test, but that test contains the log step of root-level test (?) as well as the error message from the before hook. Commenting the throw line results in a report that correctly contains both tests

Expected behavior
I would expect to find root-level test in the report marked Passed, and nested test marked Broken/Defect

Environment (please complete the following information):

  • Cypress version: 12.14.0
  • OS: Windows 10
  • cypress-allure-plugin version: 2.40.0
  • allure2 version: 2.19.0

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions