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

Failure to Pass Test Data to Allure Reporter Due to Jest Timeout

Open PavGurin opened this issue 10 months ago • 1 comments

Describe the bug When a Jest test exceeds its timeout (for example, using jest.setTimeout(1000)), the test fails with a timeout error. However, this failure is not logged correctly in the Allure report, and relevant information about the timeout is missing from the report. Instead of showing the correct error message or relevant data regarding the timeout, the test does not appear in the Allure report as a failure or it is incomplete, causing confusion during test result analysis.

To Reproduce Steps to reproduce the behavior:

  1. Create a Jest test with a jest.setTimeout(1000) setting.
  2. Run the test with a long-running process that exceeds the 1000ms timeout.
  3. Observe that the test will fail due to a timeout.
  4. View the Allure report generated after the test run.
  5. Notice that the timeout failure is either missing or lacks important details about the timeout error.

Expected behavior The expected behavior is that the Allure report should capture all relevant details about a failed test due to a timeout, including the timeout error message and the relevant stack trace or additional information that can help in debugging the cause of the failure. Specifically, it should show:

The fact that the test exceeded its timeout. The error message related to the timeout failure. Additional context (e.g., duration of the test) if applicable.

**Version

Allure-Jest: 3.0.8 Allure-JS-Commons: 3.0.8 Jest: 29.7.0 Jest-Junit: 16.0.0 Node: 18.18.2 NPM: 9.8.1

PavGurin avatar Feb 11 '25 16:02 PavGurin

I'm facing the same issue. It looks like it was fixed in version 3.1.0: https://github.com/allure-framework/allure-js/pull/1238

algiorgi avatar Oct 27 '25 19:10 algiorgi