使用浏览器进行多次运行的自动页面加载解决方案

发布于 2025-01-12 16:57:04 字数 121 浏览 0 评论 0原文

我需要对特定 URL 执行最多 1000 次运行(然后导出这些数据),以使用 2 种不同的浏览器(Chrome、Firefox)分析不同网络条件下的页面加载时间趋势。自动化此过程的最佳解决方案是什么? 此处的任何帮助将不胜感激。

I need to execute up to 1000 runs of a specific URL (and export these data afterwards) to analyse its page load time trend with different network conditions using 2 different browsers (Chrome, Firefox). What's the best solution to automate this process?
Any help here will be greatly appreciated.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

天生の放荡 2025-01-19 16:57:04

我建议使用开源负载测试工具,例如:

  1. JMeter
  2. Locust
  3. Gattle
  4. Grinder

我会推荐 Locust,这是一个易于使用的基于 UI 的工具。

希望这有帮助

I would suggest going for open-source load testing tools like:

  1. JMeter
  2. Locust
  3. Gatling
  4. Grinder

I would recommend Locust which is an easy to use UI based tool.

Hope this helps

ぶ宁プ宁ぶ 2025-01-19 16:57:04

我对你以及你自己能做什么还不够了解。你的技能组合。

尝试 GTmetrix 和 WebpageTest。
您是否具备使用 API 然后编译结果的技能。

我用 PHP 编写了一个应用程序来获取网页测试结果,然后将结果编译为人类可读的形式。这并不简单。他们返回了一个巨大的 CVS 文件,其中包含的数据比您可能需要的还要多。现在他们返回一个 JSON 结果文件。比我 2013 年使用时多了很多功能。

我认为 WebPageTest 是最全面的(2013 年),并且有相当多的桌面和移动选项以及网络带宽和服务器位置。

如果您不具备相应的技能,那么您需要聘请知道如何做此类事情的人。

这些是我最感兴趣的统计数据:

  • firstPaint
  • render
  • loadTime
  • fullLoaded
  • VisuallyCompleteDT
  • bytesIn
  • requests
  • domElements
  • DNS_Lookups
  • Connections
  • Redirects

但这就是简单的东西。 CSV 结果包含页面发出的每个 HTTP 请求的所有详细信息。
还有瀑布。

早在 2013 年,当我编写 WebpageTest 应用程序时,就有 18 个浏览器和 38 个服务器位置(如下所示)。
我从代码中复制的选择:

<option value="IE6">IE 6</option>
<option value="IE7">IE 7</option>
<option value="IE8">IE 8</option>
<option selected="" value="IE9">IE 9</option>
<option value="IE10">IE 10</option>
<option value="Chrome">Chrome</option>
<option value="Canary">Canary</option>
<option value="Firefox">Firefox</option>
<option value="FirefoxNightly">Firefox Nightly</option>
<option value="Safari">Safari (Windows)</option>
<option value="dynaTraceIE 7">dynaTrace IE 7</option>
<option value="dynaTraceIE 8">dynaTrace IE 8</option>
<option value="ChromeFrame IE6">Chrome Frame IE6</option>
<option value="Chrome- Replay">Chrome - Replay</option>
<option value="iPhone4 iOS 5.1">iPhone 4 iOS 5.1</option>
<option value="NexusS Android 2.3">Nexus S Android 2.3</option>

共有 38 个服务器位置:

<option value="Dulles_Thinkpad_VA">Dulles - Thinkpad T430 (IE 10,Chrome,Firefox,Safari)</option>
<option value="Asheville_NC">Asheville, NC USA (IE8,Chrome,Firefox)</option>
<option value="Miami_FL">Miami, FL USA (IE8, Chrome,Firefox)</option>
<option value="Chicago_IL">Chicago, IL USA (IE9-10, Chrome,Firefox)</option>
<option value="KansasCity_MO">Kansas City, MO USA (IE8, Chrome)</option>
<option value="Denver_CO">Denver, Colorado (IE 8, Chrome, Firefox, Safari)</option>
<option value="Phoenix_AZ">Phoenix, AZ (IE 10, Chrome, Firefox)</option>
<option value="Boardman_OR">Boardman, Oregon (IE 9, Chrome, Firefox, Safari)</option>
<option value="SanJose_CA">San Jose, CA USA (IE 9,Chrome,Firefox)</option>
<option value="LosAngeles_CA">Los Angeles, CA USA (IE 7,8,9, Chrome)</option>
<option value="Montreal_Canada">Montreal, Canada (IE 8,Chrome,Firefox)</option>
<option value="Toronto_Canada">Toronto, Canada (IE 8)</option></optgroup><optgroup label="South America"><option value="Argentina">Buenos Aires, Argentina (IE 8,Firefox,Chrome)</option>
<option value="SaoPaulo_BR">São Paulo, Brasil (IE 8,9,Chrome,Firefox)</option></optgroup><optgroup label="Europe"><option value="Dublin_IL">Dublin, Ireland (IE 9,Chrome,Firefox,Safari)</option>
<option value="London_UK">London, UK (IE 7-8)</option>
<option value="Madrid_Telefonica">Madrid, Spain (IE8)</option>
<option value="Paris_FR">Paris, FR (IE 7,8, Chrome)</option>
<option value="Brussels_BE">Brussels, BE (IE 9,Chrome,Firefox,Safari)</option>
<option value="Amsterdam_NL">Amsterdam, NL (IE 7-9, Chrome, Firefox)</option>
<option value="Amsterdam_Godaddy">Amsterdam, NL - Go Daddy (IE 10, Chrome, Firefox)</option>
<option value="Amsterdam_IISpeed_Loc">Amsterdam, NL - IISpeed (IE 10,Chrome,Firefox,Safari)</option>
<option value="Vianen_NL">Vianen, NL (IE 8, Chrome, Firefox)</option>
<option value="Geneva">Geneva, Switzerland (IE 8)</option>
<option value="Frankfurt_DE">Frankfurt, Germany (IE 7-9,Chrome,Firefox)</option>
<option value="Falkenstein_DE">Falkenstein, Germany (IE 9,Chrome,Firefox,Safari)</option>
<option value="Stockholm_SE">Stockholm, Sweden (IE 8,Chrome,Firefox,Safari)</option>
<option value="Romania_EU">Bucharest, Romania (IE 8,Chrome,Firefox)</option>
<option value="Israel">Israel - Efficens (IE 8, Chrome)</option>
<option value="Israel_Petah">Israel - Interhost (IE 10,Chrome,Firefox,Safari)</option>
<option value="Moscow_Loc">Moscow, Russia (IE 8,Chrome,Firefox)</option>
<option value="StPetersburg_Loc">Saint Petersburg, Russia (IE 8,Chrome,Firefox)</option></optgroup><optgroup label="Asia"><option value="Indore_IN">Indore, M.P., India (IE 9,Chrome,Firefox,Safari)</option>
<option value="Delhi">Delhi, India (IE 8,Chrome,Firefox)</option>
<option value="Singapore">Singapore (IE 8, 10, Chrome, Firefox)</option>
<option value="HongKong_CN">Hong Kong, China (IE 8,Chrome,Firefox)</option>
<option value="China_Loc">Jiangsu, China (IE 7,Chrome,Firefox)</option>
<option value="Seoul_Korea">Seoul, Korea (IE 7-8)</option>
<option value="Tokyo_Loc">Tokyo, Japan (IE 9,Chrome,Firefox)</option></optgroup><optgroup label="Oceania"><option value="Sydney_AU">Sydney, Australia (IE 7,9,Chrome,Firefox)</option>
<option value="Wellington_NZ">Wellington, NZ (IE 9,Chrome,Firefox)</option>
<option value="CAM">Cambridge, MA (Android, iOS)</option>

I do not know enough about you and what you are capable of doing your self. Your skill set.

Try GTmetrix and WebpageTest.
Do you have the skill set to use an API and then compile the results.

I had written an app in PHP to get the Webpage test results and then compile the results into human readable form. It's not simple. They returned a huge CVS file with more data than you could ever possibly need. Now they return a JSON result file. With so many more features than when I used them in 2013.

I think WebPageTest is the most comprehensive (they were in 2013) and has a fair amount of desktop and mobile options plus network bandwidths and server locations.

If you do not have the skill set then you need hire someone that knows how to do this type of stuff.

These were the stats I was most interested in:

  • firstPaint
  • render
  • loadTime
  • fullyLoaded
  • VisuallyCompleteDT
  • bytesIn
  • requests
  • domElements
  • DNS_Loookups
  • Connections
  • Redirects

But that's the simple stuff. The CSV result had every detail on every HTTP request the page made.
And the waterfall.

Back in 2013 when I wrote a WebpageTest app there were 18 Browsers and 38 server locations (shown below).
The choices I copied from my code:

<option value="IE6">IE 6</option>
<option value="IE7">IE 7</option>
<option value="IE8">IE 8</option>
<option selected="" value="IE9">IE 9</option>
<option value="IE10">IE 10</option>
<option value="Chrome">Chrome</option>
<option value="Canary">Canary</option>
<option value="Firefox">Firefox</option>
<option value="FirefoxNightly">Firefox Nightly</option>
<option value="Safari">Safari (Windows)</option>
<option value="dynaTraceIE 7">dynaTrace IE 7</option>
<option value="dynaTraceIE 8">dynaTrace IE 8</option>
<option value="ChromeFrame IE6">Chrome Frame IE6</option>
<option value="Chrome- Replay">Chrome - Replay</option>
<option value="iPhone4 iOS 5.1">iPhone 4 iOS 5.1</option>
<option value="NexusS Android 2.3">Nexus S Android 2.3</option>

And there were 38 server locations:

<option value="Dulles_Thinkpad_VA">Dulles - Thinkpad T430 (IE 10,Chrome,Firefox,Safari)</option>
<option value="Asheville_NC">Asheville, NC USA (IE8,Chrome,Firefox)</option>
<option value="Miami_FL">Miami, FL USA (IE8, Chrome,Firefox)</option>
<option value="Chicago_IL">Chicago, IL USA (IE9-10, Chrome,Firefox)</option>
<option value="KansasCity_MO">Kansas City, MO USA (IE8, Chrome)</option>
<option value="Denver_CO">Denver, Colorado (IE 8, Chrome, Firefox, Safari)</option>
<option value="Phoenix_AZ">Phoenix, AZ (IE 10, Chrome, Firefox)</option>
<option value="Boardman_OR">Boardman, Oregon (IE 9, Chrome, Firefox, Safari)</option>
<option value="SanJose_CA">San Jose, CA USA (IE 9,Chrome,Firefox)</option>
<option value="LosAngeles_CA">Los Angeles, CA USA (IE 7,8,9, Chrome)</option>
<option value="Montreal_Canada">Montreal, Canada (IE 8,Chrome,Firefox)</option>
<option value="Toronto_Canada">Toronto, Canada (IE 8)</option></optgroup><optgroup label="South America"><option value="Argentina">Buenos Aires, Argentina (IE 8,Firefox,Chrome)</option>
<option value="SaoPaulo_BR">São Paulo, Brasil (IE 8,9,Chrome,Firefox)</option></optgroup><optgroup label="Europe"><option value="Dublin_IL">Dublin, Ireland (IE 9,Chrome,Firefox,Safari)</option>
<option value="London_UK">London, UK (IE 7-8)</option>
<option value="Madrid_Telefonica">Madrid, Spain (IE8)</option>
<option value="Paris_FR">Paris, FR (IE 7,8, Chrome)</option>
<option value="Brussels_BE">Brussels, BE (IE 9,Chrome,Firefox,Safari)</option>
<option value="Amsterdam_NL">Amsterdam, NL (IE 7-9, Chrome, Firefox)</option>
<option value="Amsterdam_Godaddy">Amsterdam, NL - Go Daddy (IE 10, Chrome, Firefox)</option>
<option value="Amsterdam_IISpeed_Loc">Amsterdam, NL - IISpeed (IE 10,Chrome,Firefox,Safari)</option>
<option value="Vianen_NL">Vianen, NL (IE 8, Chrome, Firefox)</option>
<option value="Geneva">Geneva, Switzerland (IE 8)</option>
<option value="Frankfurt_DE">Frankfurt, Germany (IE 7-9,Chrome,Firefox)</option>
<option value="Falkenstein_DE">Falkenstein, Germany (IE 9,Chrome,Firefox,Safari)</option>
<option value="Stockholm_SE">Stockholm, Sweden (IE 8,Chrome,Firefox,Safari)</option>
<option value="Romania_EU">Bucharest, Romania (IE 8,Chrome,Firefox)</option>
<option value="Israel">Israel - Efficens (IE 8, Chrome)</option>
<option value="Israel_Petah">Israel - Interhost (IE 10,Chrome,Firefox,Safari)</option>
<option value="Moscow_Loc">Moscow, Russia (IE 8,Chrome,Firefox)</option>
<option value="StPetersburg_Loc">Saint Petersburg, Russia (IE 8,Chrome,Firefox)</option></optgroup><optgroup label="Asia"><option value="Indore_IN">Indore, M.P., India (IE 9,Chrome,Firefox,Safari)</option>
<option value="Delhi">Delhi, India (IE 8,Chrome,Firefox)</option>
<option value="Singapore">Singapore (IE 8, 10, Chrome, Firefox)</option>
<option value="HongKong_CN">Hong Kong, China (IE 8,Chrome,Firefox)</option>
<option value="China_Loc">Jiangsu, China (IE 7,Chrome,Firefox)</option>
<option value="Seoul_Korea">Seoul, Korea (IE 7-8)</option>
<option value="Tokyo_Loc">Tokyo, Japan (IE 9,Chrome,Firefox)</option></optgroup><optgroup label="Oceania"><option value="Sydney_AU">Sydney, Australia (IE 7,9,Chrome,Firefox)</option>
<option value="Wellington_NZ">Wellington, NZ (IE 9,Chrome,Firefox)</option>
<option value="CAM">Cambridge, MA (Android, iOS)</option>
~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文