Testcafe concurrent load test performance

折月煮酒 提交于 2021-01-29 14:17:08

问题


I am trying to run a load test on my web application with Testcafe, by concurrently running a single test for each "user" in the system.

I need to run 1000 instances of the test but ran into a resource problem on the test side - running multiple Testcafe instances is very resource heavy and I was wondering if anyone knows a way to run a batch of Testcafe tests concurrently without the performance overhead?


回答1:


As an alternative, you can run TestCafe in an AWS lambda with a headless browser.

Here is what we use for reSolve framework load testing: https://github.com/reimagined/testcafe-serverless




回答2:


If you plan to use Testcase for load testing and don't have enough hardware in order to kick off the required amount of concurrent browser sessions the only solution is going for Cloud browser instance

However a better idea would be simulating the browsers on HTTP protocol level as modern browsers have immense footprint in terms of CPU and RAM and if your target is to load test a website you can just send the same HTTP request as the browser does using a dedicated load testing tool and it will take much less resources.

Check out Open Source Load Testing Tools: Which One Should You Use? article which highlights, describes and compares modern free and open source solutions and frameworks for the performance testing, the vast majority offers record and replay functionality so if you run your Testcafe script using the load testing tool of your choice as the proxy - you will get a "skeleton" of the load testing project in the time it takes to execute your Testcafe test scenarios.



来源:https://stackoverflow.com/questions/61731078/testcafe-concurrent-load-test-performance

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!