-
Notifications
You must be signed in to change notification settings - Fork 669
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
TestCafe performance issues - Slow page loads, High CPU usage, Browser disconnect issues etc. #3055
Comments
We will investigate it more deeply. I will notify you of our results later.
I cannot reproduce this behavior. On my machine I have CPU usage about 60 %. Google Chrome takes about 20%. It's a normal behavior because TestCafe emulates user actions very fast.
There is a separate issue for this - DevExpress/testcafe-hammerhead#1744. |
@miherlosev Thanks for your prompt response and investigating this issue.
I've observed the CPU usage goes up while its waiting to finish loading the page and before it starts to interact on the page. This issue happens on Mac for me. Could you please check this issue on Mac if possible?. My system info is provided below.
If possible, could you please try to run the test suite in following browser & OS combination and see if you can reproduce the browser disconnect issue: I would like to see the 'Browser disconnect' issue resolved as its one of the top annoying issue for me. Its been around for a while for now and haven't been addressed yet. I understand its hard to reproduce the browser disconnect issue but please see if the team can find the root cause of this issue and fix it. |
I can confirm similar performance issues for A simple hello world test took 1m 19s where most of this time was spent navigating to the initial page. Other browsers were noticeably faster: Note that Firefox is still quite a bit slower in loading the page. Safari is basically unusable. |
Did some more testing: I only observe this when testing on localhost where I used webpack dev server to serve my page. Remote pages seem to be fast. |
I started having this problem starting from version 0.22.0 (now using 0.23.1). Before it used to hang the build for hours but with a fix introduced on the 0.22.0 now, it just disconnects the browser(s). This may be strongly linked to running tests on multi-browsers (chrome & firefox). I am using TeamCity to run the builds with the following configuration:
There is the error message I get on my CI output:
I am also using this on my runner: |
We've fixed this problem in
It's a very strange. Could you please provide a simple example so that we will reproduce it on our side? |
Admittedly only the test was "Hello World", the application under test was not. So I tried to create another repo using generic code but was not able to. In my original project I managed to track it down to my usage of @material-ui/icons. Once I removed the single used icon, Safari was immediately fast. So I set up a new project just using this icon but this was fast as well. |
The 'write ECONNABORTED' issue is resolved in [email protected]. However, the other performance issues I reported (Slow page loads, High CPU usage, Browser disconnect issues) still exists in [email protected]. |
Issue is too old now and can't reproduce. Closing. |
This thread has been automatically locked since it is closed and there has not been any recent activity. Please open a new issue for related bugs or feature requests. We recommend you ask TestCafe API, usage and configuration inquiries on StackOverflow. |
What is your Test Scenario?
Download the provided test repo and execute the tests. The test scripts basically checks the functionality of the given website.
I'm currently in the process of migrating our projects Selenium tests into TestCafe and I'm halfway through the process. When I tried to execute the migrated tests in different browsers (both on Mac & Win), I noticed several issues as mentioned below.
What is the Current behavior?
Multiple Issues:
1 - The page is very slow to load when run via TestCafe. If I manually load the page in the browser (with cache & cookie cleared), the page loads reasonably fast. So I'm not sure what's causing the page to load slow inside the TestCafe server. Try to run the tests in Firefox (on Mac or Win) and you can easily observe this issue. We have longer test execution time because of this issue.
2 - The CPU usage also goes 100% ('Google Chrome Helper' & 'FirefoxCP Web Content' processes) when executing the test suite in Chrome & Firefox on Mac. You can hear loud fan noice when this happens. (see screenshot below)
3 - Test scripts keep failing in Firefox (on Mac & Win) & Edge on Win. I'm unable to execute the test suite. I keep getting the browser disconnected error. (see screenshot below)
4 - Also test execution fails in Chrome on Windows. Getting 'write ECONNABORTED' in console (see screenshot below)
What is the Expected behavior?
None of the above issues should happen.
What is your web application and your TestCafe test code?
Download this repo - https://github.com/sijosyn/testcafe-syntests and run the test suite.
Your complete test code (or attach your test files):
Your complete test report:
Screenshots:
Firefox browser disconnect error:
Chrome disconnect error (on Win):
Edge browser disconnect error
Steps to Reproduce:
Please read the README provided in the repo - https://github.com/sijosyn/testcafe-syntests
Your Environment details:
The text was updated successfully, but these errors were encountered: