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

Test refactor, making them faster #574

Merged
merged 3 commits into from
Nov 15, 2021
Merged

Conversation

ahmadayubi
Copy link
Member

@ahmadayubi ahmadayubi commented Nov 14, 2021

time

Refactor and parallelism resulted in tests running in under 2 minutes (or less).
This requires the use of await page.waitForTimeout(200); when doing many keyboard interactions in a row to prevent missed keys.

  • Certain tests are currently unstable, need fix

Closes #518 (indirect, as instead of launching a single browser, it's launching multiple browsers depending on the device)

@ahmadayubi ahmadayubi requested review from prushforth and removed request for prushforth November 14, 2021 01:21
@ahmadayubi ahmadayubi mentioned this pull request Nov 14, 2021
2 tasks
@prushforth
Copy link
Member

It's fantastic how fast they run. I ran them 4 times, but had a failure in one run, that disappeared in subsequent runs. Have you noticed this, and if so is it a setting that could be adjusted?

@ahmadayubi
Copy link
Member Author

ahmadayubi commented Nov 15, 2021

It's fantastic how fast they run. I ran them 4 times, but had a failure in one run, that disappeared in subsequent runs. Have you noticed this, and if so is it a setting that could be adjusted?

Do you remember the test? This is probably an issue related to actions being made too quickly. Since mapml-viewer is visual with animations, parts of the code need timeouts to allow the animations and loading to complete.

You can simply increase the overall sloMo value but this slows down parts that don't need slowing.

@prushforth
Copy link
Member

No I didn't take note. I will play around to see if I encounter it again.

@Anshpreet8
Copy link
Contributor

Do you remember the test? This is probably an issue related to actions being made too quickly. Since mapml-viewer is visual with animations, parts of the code need timeouts to allow the animations and loading to complete.

It appeared I had a failure for mapMLTemplatedFeatures and mapMLTemplatedImageLayer two seperate times, the failures seem to be a result of zooming:
Screen Shot 2021-11-15 at 2 23 04 PM

Screen Shot 2021-11-15 at 2 27 06 PM

@ahmadayubi
Copy link
Member Author

ahmadayubi commented Nov 15, 2021

It appeared I had a failure for mapMLTemplatedFeatures and mapMLTemplatedImageLayer two seperate times, the failures seem to be a result of zooming:

Try adding timeouts to parts, for example many keyboard actions at one point, see if that fixes it. Those files for me didn't cause issues but it's very hardware dependent (without timeouts).

@Anshpreet8
Copy link
Contributor

Try adding timeouts to parts that seem, for example many keyboard actions at one point, see if that fixes it. Those files for me didn't cause issues but it's very hardware dependent (without timeouts).

yea, adding a larger timeout number seemed to fix it for me

@prushforth
Copy link
Member

OK, I couldn't get the tests to fail again on that branch. It could have to do with caching resources, that happens at levels we might not be aware of. So, let's merge and deal with issues as they may come.

@prushforth prushforth merged commit feae50c into Maps4HTML:main Nov 15, 2021
@Malvoz Malvoz added the tests label Dec 28, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Make the E2E tests run faster by launching the browser only once, at the beginning of the testing
4 participants