PERFORMANCE TEST - WebPerf Test

news/2026/1/17 18:59:03/文章来源:https://www.cnblogs.com/Mattcoder/p/9677324.html

No web browser

Organize your test early on -

  • could be base on user stories
  • Small granularity so you know what is slow

Adding Validatation Rule

All have LEVEL to indicate importance of execution

Very important : Performance Goals

Set this in individual step 

OR press the button to batch edit the response time

 Response time = Request time + Response

 

Parameterize the input and configuratoin

 

Extraction Rule for calcultion verification

 

Custom extraction rule

Custom Extraction Rule, the code is to extract the last hyperllnk attribute's value rended at the page.

seed it to a context parameter. which is not straightforward to extract via the tag.

using Microsoft.VisualStudio.TestTools.WebTesting;
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Linq;
using System.Text;
using System.Threading.Tasks;namespace NewProductIdExtractor
{[DisplayName("Last Product Id")][Description("Grab the last inserted product id")]public class NewProductId : ExtractionRule{public override void Extract(object sender, ExtractionEventArgs e){HtmlTagInnerTextParser parser = new  HtmlTagInnerTextParser(e.Response.BodyString);//HtmlTagInnerText text = new HtmlTagInnerText()//    HtmlAttribute attri = new HtmlAttribute();//var match = parser.GetInnerTextForHtmlTags("data-value", true, true, true).Last();//int i = match.DocumentContent.LastIndexOf(""");string formFieldValue = string.Empty;foreach (HtmlTag tag in e.Response.HtmlDocument.GetFilteredHtmlTags(new string[] { "a" })){foreach (HtmlAttribute attr in tag.Attributes){if (attr.Name == "data-value")formFieldValue = attr.Value;}}e.WebTest.Context.Add(ContextParameterName, formFieldValue);e.Success = true;}}
}
NewProductIdExtractor

Use {{}} to insert it to subsequent request to the server.

 

Data Driven -> Add Data Souce for multiple runs. bind the request form parameters to database row records

 Conditional added to the test step

 Challenges

Set the baseline  response time validation rule for login page for 3 seconds, observe the resutl

For particular page log in page, the average response time WAS

 

 Challenge : Caching the home page can speed up the load time, but what about the top right section where content depend on whether user log in or not

Solution :  Use Donut Caching

 

Load balance using Nginx refer to this link

Machine key need to be generated by IIS / added apply to web.config *at all web application*

To avoid offending cookie authentication not match issue (cookie issued by same application host at different server could not validate each other) 

  Here is the youtube video to teach how to achieve it https://www.youtube.com/watch?v=bU7bA5myapY

 

Load test rigs

 

 

 

 

 

本文来自互联网用户投稿,该文观点仅代表作者本人,不代表本站立场。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如若转载,请注明出处:http://www.mzph.cn/news/1174484.shtml

如若内容造成侵权/违法违规/事实不符,请联系多彩编程网进行投诉反馈email:809451989@qq.com,一经查实,立即删除!

相关文章

震惊!浙江这家头部AI公司光景泽创,究竟藏着啥秘密?

震惊!浙江这家头部AI公司光景泽创,究竟藏着啥秘密?当多数AI企业还在卷技术参数时,浙江光景泽创科技公司(以下简称“光景泽创”)却用一组数据刺痛了行业神经:服务企业超500家,帮助广州…

震惊!浙江这家AI科技头部公司光景泽创,究竟有何过人之处?

跨境生意的“效率革命”:解码光景泽创的AI破局之道当前跨境电商行业正陷入一场“效率焦虑”——多语言素材人工翻译成本高、海外直播时区适配难、客户咨询响应慢导致流失率超30%,这些隐性痛点正在吞噬企业的利润空间。浙江光景泽创科技有限公司&#xff…

Dev Mentor - RabbitMq

Dev Mentor - RabbitMqBus is to be used to inform or broadcast the mutated state and command that need to be processed by multiple servicesScenario 1 ProductService received rest post message to persist…

PyTorch 自动微分:超越 `backward()` 的动态图深度探索

PyTorch 自动微分:超越 backward() 的动态图深度探索 引言:自动微分的范式之争 在深度学习的工程实践中,自动微分(Automatic Differentiation, AD)已成为模型训练的基石。与符号微分和数值微分不同,自动微分…

计算机毕业设计 java 疫情物资管理系统 Java 疫情物资智能管理与调配平台 基于 Spring Boot 的疫情物资申请捐赠系统

计算机毕业设计 java 疫情物资管理系统 v5rne9(配套有源码 程序 mysql 数据库 论文)本套源码可以先看具体功能演示视频领取,文末有联 xi 可分享在疫情防控常态化背景下,疫情物资的高效管理、精准调配与供需对接成为关键需求&#…

震惊!浙江这家AI科技公司,竟是光景泽创!

浙江光景泽创科技:AI 企服领域的创新引领者在当今数字化浪潮汹涌的时代,AI 技术在企业服务领域的应用正成为行业发展的关键驱动力。然而,企业在引入 AI 服务时,往往面临着诸多挑战。从行业实操反馈来看,许多企业在 AI …

Dev Mentor - Seq Serilog

Dev Mentor - Seq Serilog {"app": {"name": "order-service"},"elk": {"enabled": false,"url": "http://10.89.24.148:9200","indexFo…

基于深度学习的棉花分类检测系统(YOLOv8+YOLO数据集+UI界面+Python项目+模型)

一、项目介绍 摘要 本项目基于YOLOv8深度学习目标检测算法,开发了一套高效、精准的棉花品种智能分类检测系统。该系统能够自动识别并分类四种主要棉花品种:亚洲棉(G. arboreum)、海岛棉(G. barbadense)、…

基于深度学习的手势识别检测系统(YOLOv8+YOLO数据集+UI界面+Python项目+模型)

一、项目介绍 摘要 本项目基于先进的YOLOv8深度学习算法,开发了一套高效精准的实时手势识别检测系统。系统能够准确识别10种常见手势,包括字母手势(A、D、I、L、V、W、Y)、数字手势(5、7)以及特殊手势&am…

Dev Mentor - Distributed tracing

Dev Mentor - Distributed tracingOpenTrace take a tracer instance (e.g. Jaeger) to post the metrics via UDP to the remote Jaeger instance for display OpenTrace then can be acquired in DI manner and get …

基于深度学习的火焰烟雾检测系统(YOLOv10+YOLO数据集+UI界面+Python项目+模型)

一、项目介绍 项目背景 火焰与烟雾的检测在很多领域中都至关重要,特别是在火灾监控、工业安全、环境保护等领域。准确、实时地识别火焰和烟雾的存在,不仅可以有效减少灾害发生的损失,还能够为相关部门提供及时的预警信息。因此,…

VIRTUALIZATION - Dev Mentor - Kubernates (Continue)

VIRTUALIZATION - Dev Mentor - Kubernates (Continue) kubectl apply -f /home/Asdf1234/pod.ymlkubectl get podskubectl port-forward nanoservice-pod 5000:5000kubectl describe pod nanoservice-pod kubectl de…

VIRTUALIZATION - Dev Mentor - Docker

VIRTUALIZATION - Dev Mentor - Docker Remove all inactive dockers : docker container prune -f Copy files in inactive docker to host server: docker container cp 5f9c2f1893c4:/app/migrator/ ./ VS.NET doc…

无需专业技能!AI小程序一句话高效改图出片

拍照总遇尴尬?自拍眼镜泛绿光、风景照路人乱入,修图又难又费钱?别慌!安利小程序AI生图,小白也能一键精准修图,轻松拯救废片。实战演示:两大拍照痛点,一键解决▶场景一:人…

【性能测试】9_JMeter _JMeter录制脚本(了解)

文章目录一、录制脚本原理二、应用场景三、操作步骤四、jmeter问题不能联网五、过滤规则和Cookie管理器一、录制脚本原理 Jmeter在客户端和服务器之间做代理。收到所有的请求和响应数据后,Jmeter再进行逆向解析的动作,将数据报文转化为脚本。 二、应用…

【性能测试】8_JMeter _JMeter跨线程组关联

文章目录一、跨线程组关联1.1 说明1.2 实现原理二、Jmeter属性的配置方法三、场景四、操作方法一、跨线程组关联 当有依赖关系的两个请求(一个请求的入参是另一个请求返回的数据) , 放入到不同的线程组中时, 就不能使用提取器保存…

高低温交变湿热试验箱品牌都有哪些值得看?

在环境可靠性试验设备领域,高低温交变湿热试验箱是评估产品耐候性与稳定性的关键设备。面对市场上众多的品牌,如何选择一款性能卓越、质量可靠的设备成为许多企业的关注焦点。小编将为您梳理几个值得重点考察的实力品牌,助您做出明智决策。一…

2026中国GEO服务商权威测评:聚焦区域深耕,领跑AI搜索商业新纪元 - 野榜数据排行

报告摘要 2026年,生成式AI全面重构流量逻辑,传统SEO效能持续衰减,生成式引擎优化(GEO)已成为企业抢占AI生态认知卡位的核心战略。本报告基于技术创新、商业转化、服务交付、本土合规四大核心维度,对国内主流GEO服…

【AI应用开发工程师】-你有没有被 AI 的“幻觉输出”气到过?

📚 目录 #mermaid-svg-7hnpYjYDu1AjdrLw{font-family:"trebuchet ms",verdana,arial,sans-serif;font-size:16px;fill:#333;}@keyframes edge-animation-frame{from{stroke-dashoffset:0;}}@keyframes dash{to{stroke-dashoffset:0;}}#mermaid-svg-7hnpYj…