allure-js icon indicating copy to clipboard operation
allure-js copied to clipboard

[v.3.0.2][allure-jest][allure-js-commons] The autotest is displayed as skipped in Allure report when it fails in the beforeEach or beforeAll fixture

Open lifanov-rza opened this issue 1 year ago • 5 comments

Describe the bug The autotest is displayed as skipped in Allure report when it fails in the beforeEach or beforeAll fixture

To Reproduce Steps to reproduce the behavior:

  1. Add expect(1).toStrictEqual(2); in beforeAll or beforeEach hook
  2. Run test
  3. Check allure report

Expected behavior The test is displayed as failed

Screenshots image

lifanov-rza avatar Nov 05 '24 07:11 lifanov-rza

@lifanov-rza, what test framework are you using?

baev avatar Jan 16 '25 13:01 baev

@lifanov-rza, what test framework are you using?

jest

lifanov-rza avatar Jan 27 '25 07:01 lifanov-rza

@baev any updates?

lifanov-rza avatar Mar 10 '25 10:03 lifanov-rza

Hey team, I checked the allure-js code and it looks like this behavior starts here: https://github.com/allure-framework/allure-js/pull/1154/files#diff-49e4a85aa62a824a1f425b1be60c4c57fdff7ab1fe7d389da2b5301959da7551R196. When a hook fails, the test is finished as skipped. Is that intentional in allure-js? @baev

The issue for us is that tests failing during setup are marked as skipped, which gets mixed in with real skipped tests and makes the Allure report pass rate misleading. Do we have a recommended way to tell setup failures from actual skips, or should this be treated as a bug?

tomchang-tubi avatar Aug 19 '25 05:08 tomchang-tubi