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

Add a retry option #7

Open
Saqibm128 opened this issue Jun 15, 2020 · 2 comments
Open

Add a retry option #7

Saqibm128 opened this issue Jun 15, 2020 · 2 comments
Labels
enhancement New feature or request

Comments

@Saqibm128
Copy link

Is your feature request related to a problem? Please describe.
Running puppeteer with jest is quite flakey and can cause issues. Is there anyway to do retries with this?

Describe the solution you'd like
Some kind of hook for a retry or some way to get handle to running puppeteer process

Describe alternatives you've considered
Tried jest-retries but didn't get it to work

Additional context

@Saqibm128 Saqibm128 added the enhancement New feature or request label Jun 15, 2020
@DaniJG
Copy link
Collaborator

DaniJG commented Jun 18, 2020

When you say flaky, is it a specific issue with jest-puppetteer or are you pointing at a general issue when writing E2E tests?

I would assume you mean the latter (but if you know of some specifics with jest-puppeteer let me know!) and I agree that E2E tests are flaky, or rather harder to write and maintain.
Have you seen the expect-puppeteer API that gets added by jest-puppeteer, described here https://github.com/smooth-code/jest-puppeteer/tree/master/packages/expect-puppeteer/README.md#api? That sort of approach helps writing more robust E2E tests without having to go down the route of retrying the tests themselves.

Other than that, this plugin simply wires the jest-puppeteer library and its required dependencies. You would need to look into hooks and extension methods it provides, like https://github.com/smooth-code/jest-puppeteer#extend-puppeteerenvironment or https://github.com/smooth-code/jest-puppeteer#create-your-own-globalsetup-and-globalteardown

@Saqibm128
Copy link
Author

I was having issues earlier with puppeteer crashing and giving out network errors in the middle of a test. I was looking earlier for a way to restart puppeteer between tests.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants