You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
We are using v2.15.1 and this version incorrectly calculates tests' start time, which leads to incorrectly calculated Duration time on allure report UI.
The instance of AllureTest is created here on Jest's add_test event:
Could you please re-check the issue using the latest 3.0.0-beta.3 release? All the integrations were revisited (& reworked) recently, we're about to release 3.0.0. If the issue still occurs, we'll be happy to fix it
Describe the bug
We are using
v2.15.1
and this version incorrectly calculates tests'start
time, which leads to incorrectly calculatedDuration
time on allure report UI.The instance of
AllureTest
is created here on Jest'sadd_test
event:allure-js/packages/allure-jest/src/AllureJest.ts
Lines 95 to 98 in d426d79
Then, we set time to
test.testResult.start
:allure-js/packages/allure-js-commons/src/current/AllureTest.ts
Line 21 in d426d79
The root of the bug is that we should save
start
time ontest_start
event, not onadd_test
. Here:allure-js/packages/allure-jest/src/AllureJest.ts
Lines 101 to 103 in d426d79
add_test
event occures for all the tests cases of the fille at the same time, so this is simply not a correct event to save start time of the test..To Reproduce
test()
case, add for examplesleep
for 3 secondsExpected behavior
test()
case, add for examplesleep
for 3 secondsScreenshots
Before:
After adding a fix:
The fix is pretty simple, we just need to save
test.testResult.start
time somewere here ontest_start
event:allure-js/packages/allure-jest/src/AllureJest.ts
Line 179 in d426d79
If you agree, I can try to provide a PR.
The text was updated successfully, but these errors were encountered: