如何测试现代角度应用的性能/负载 [英] How to test performance / load of a modern angular application

查看:58
本文介绍了如何测试现代角度应用的性能/负载的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我要加载/性能测试一个使用角度6+作为前端框架的Web应用程序.该应用程序非常大,并使用了许多向导/模态等. 我想做一些真正的" e2e-frontend-tests(不仅测试API调用,还包括js渲染等)

I want to load / performance test a web application which uses angular 6+ as the frontend-framework. The application is quite big and uses lots of wizards / modals etc. I want to do some "real" e2e-frontend-tests (not just testing API-calls, but also js-rendering etc.)

目前可以测试这种应用程序的最新方法和工具是什么?

What are the current state-of-the-art approaches and tools to test applications like this?

为澄清起见,我想进行一些真正的端到端性能测试,例如在无头模式下打开浏览器,打开向导并获取向导出现之前所花费的时间.就像使用硒进行前端测试一样.我也可以用硒来做,但是我不知道它是否合适.

To clearify, i want to do some real e2e performance test like e.g. open a browser in headless mode, open a wizard and get the time it takes until the wizard appears. Like frontend testing with selenium. I could do this with selenium toobut i don't know if its the right tool.

推荐答案

测试客户端性能的最佳方法是使用

The best way of testing client-side performance is profiling the application using browser developer tools

如果要自动化该过程-应该使用浏览器自动化框架,最受欢迎的是 Selenium Selenium .您还将能够执行 JavaScript 调用一般访问性能对象导航时间/

If you want to automate the process - you should go for the browser automation framework, the most popular one is Selenium. You will be also capable of executing JavaScript calls to access Performance object in general and Navigation Timing / User Timing APIs in particular.

我还建议您牢记服务器端的性能,即,您可能想检查应用程序可以处理多少个并发用户而不会出现问题,饱和点/第一个瓶颈是什么,当响应时间开始增加或错误开始出现时.因此,考虑将客户端性能测试与对应用程序进行预期的负载相结合,因为从客户端的角度来看,渲染速度非常快,但是服务器响应速度很慢,从而导致不良的用户体验.根据测试实验室的硬件,您可以使用 Selenium Grid 启动许多浏览器实例或进行专用负载测试工具

I would also recommend keeping in mind server-side performance, i.e. you might want to check how many concurrent users you application can handle without issues, what are the saturation point / first bottleneck, when response time starts increasing or errors start occurring. So consider combining client-side performance tests with conducting the anticipated load onto your application as it can be the case that from client perspective rendering is very fast but server responds slowly causing bad user experience. Depending on your test lab hardware you can either go for Selenium Grid to kick off many browser instances or go for a dedicated load testing tool

这篇关于如何测试现代角度应用的性能/负载的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆