Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support artifact collection of test retries (jest.retryTimes(x)) #2073

Closed
rotemmiz opened this issue May 20, 2020 · 4 comments · Fixed by #2269
Closed

Support artifact collection of test retries (jest.retryTimes(x)) #2073

rotemmiz opened this issue May 20, 2020 · 4 comments · Fixed by #2269

Comments

@rotemmiz
Copy link
Member

When running a test with jest.retryTimes(x), the artifact manager will create a folder for the first retry, but will fail recording the next retries (if they happen).

Example:

detox[4447] WARN:  [Artifact.js/MOVE_FILE_EXISTS] cannot overwrite: "~/temp/buildTmp/d4efa026-0524-4cf9-a6da-a5c3fba4c3bc.detox.png" => "artifacts/ios.sim.release.2020-05-17 09-18-53Z/✗ testName/testDone.png"

I suggest we add the retry number to the folder name,
retry no 1: test name
retry no 2: test name - retry 2
retry no 2: test name - retry 3

@d4vidi
Copy link
Collaborator

d4vidi commented May 20, 2020

@viktorijasujetaite and I have taken a 2nd look on some tests where retry is applied and we noticed the opposite - namely, that only the artifacts from last retry prevail.

Could this be platform-specific? I think I've noticed that on Android, the artifacts are simply adb pull-ed directly into the destination folder (and hence overwrite "works")

@rotemmiz
Copy link
Member Author

Could be different between platforms, anyway, the dir names should solve either issue we have there.

@viktorijasujetaite
Copy link

viktorijasujetaite commented May 20, 2020

@viktorijasujetaite and I have taken a 2nd look on some tests where retry is applied and we noticed the opposite - namely, that only the artifacts from last retry prevail.

I would actually think that artifacts of [Retry # 1] are recorded, because for latter retries (# 2 & # 3) we see "cannot overwrite" warning.

@d4vidi
Copy link
Collaborator

d4vidi commented May 20, 2020

@viktorijasujetaite again, this is probably iOS-specific, and different on Android. In any case, solving this would solve it for both platforms

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants