性能测试回归测试_自动网站性能回归测试
性能测试回归测试
by Adam Henson
亚当·汉森(Adam Henson)
如何使用Foo自动执行网站性能回归测试 (How to automate website performance regression testing with Foo)
使用部署后步骤自动执行连续交付工作流程中的性能回归测试 (Using a post deploy step to automate performance regression testing in a continuous delivery workflow)
In another post I went over how to analyze website performance using Lighthouse, and specifically how we can automate performance monitoring with Foo. In this post I’m going to demonstrate how we can step it up a notch by regression testing performance… automagically ?.
在另一篇文章中,我介绍了如何使用Lighthouse分析网站性能 ,特别是如何使用Foo自动执行性能监控。 在这篇文章中,我将演示如何通过回归测试性能……自动地将其提升一个等级。
什么是回归测试? (What is Regression Testing?)
Regression Testing is a type of software testing to confirm that a recent program or code change has not adversely affected existing features. Adhering to best practice could include the below.
回归测试是一种软件测试,用于确认最近的程序或代码更改未对现有功能造成不利影响。 遵循最佳做法可能包括以下内容。
Maintain a Strict Testing Schedule: Always maintain a continual testing schedule throughout the entire software development life cycle. Not only will this quickly force the team to adapt to a frequent testing regimen, it will also ensure the finished product is as well-tested as possible.
维护严格的测试计划 :在整个软件开发生命周期中始终保持连续的测试计划。 这不仅将Swift迫使团队适应频繁的测试方案,还将确保最终产品经过尽可能好的测试。
Use Test Management Software: Unless your current software project is a simple self-developed side project, chances are you’ll have such an abundance of tests that tracking each will be well beyond the capabilities of a single individual or a spreadsheet. Thankfully, there are many different test management tools on the market designed to simplify the process of creating, managing, tracking, and reporting on all the tests in your entire testing suite.
使用测试管理软件 :除非您当前的软件项目是一个简单的自行开发的副项目,否则您将拥有大量的测试,因此跟踪每个测试的能力将远远超出单个人或电子表格的能力。 幸运的是,市场上有许多不同的测试管理工具旨在简化整个测试套件中所有测试的创建,管理,跟踪和报告过程。
Categorize Your Tests: Imagine a test suite of hundreds or thousands of tests that are merely identified by a single
name
orid
field. How on Earth would anyone ever sort through that massive list in order to identify tests that are related? The solution is to categorize tests into smaller groups based on whatever criteria is appropriate for your team. Most test management tools will provide the means of categorizing or tagging tests, which will make it easier for everyone on the team to identify and reference a certain type of test.分类测试 :想象一个包含数百或数千个测试的测试套件,这些测试仅由一个
name
或id
字段id
。 在地球上,任何人将如何对大量列表进行排序以识别相关测试? 解决方案是根据适合您团队的任何标准将测试分类为较小的组。 大多数测试管理工具将提供对测试进行分类或标记的方法,这将使团队中的每个人都更容易识别和引用特定类型的测试。Prioritize Tests Based on Customer Needs: One useful way to prioritize tests is to consider the needs of the customer or user. Consider how a given test case impacts the end user’s experience or the customer’s business requirements.
根据客户需求对测试进行优先级排序:对测试进行优先级排序的一种有用方法是考虑客户或用户的需求。 考虑给定的测试用例如何影响最终用户的体验或客户的业务需求。
Check out this article for more info: “Regression Testing: What It Is and How to Use It”
请查看本文以获取更多信息:“ 回归测试:它是什么以及如何使用它 ”
“网站性能”实际上是什么意思? (What Does “Website Performance” Actually Mean?)
Load times vary dramatically from user to user, depending on their device capabilities and network conditions. Traditional performance metrics like load time or DOMContentLoaded time are extremely unreliable since when they occur may or may not correspond to when the user thinks the app is loaded.
加载时间因用户而异,具体取决于他们的设备功能和网络状况。 传统的性能指标(例如加载时间或DOMContentLoaded时间)极其不可靠,因为它们发生的时间可能与用户认为已加载应用程序的时间相对应,也可能不相对应。
~ User-centric Performance Metrics | Web Fundamentals | Google Developers
〜以用户为中心的性能指标| 网页基础知识| Google开发人员
Nowadays, life cycle of a web page load can be thought of more granularly. We can think of website performance metrics as being “user-centric”. When a user goes to a web page, they’re typically looking for visual feedback to reassure them everything is working as expected.
如今,可以更精细地考虑网页加载的生命周期。 我们可以将网站效果指标视为“以用户为中心”。 当用户转到网页时,他们通常是在寻找视觉反馈,以确保他们一切正常。
The metrics below represent important points of the page load life cycle. Each answers questions about the user experience.
以下指标代表页面加载生命周期的重要点。 每个回答有关用户体验的问题。
First Contentful Paint: Is it happening? Did the navigation start successfully? Has the server responded?
第一个内容丰富的油漆 :正在发生吗? 导航是否成功启动? 服务器响应了吗?
First Meaningful Paint: Is it useful? Has enough content rendered that users can engage with it?
首先有意义的绘画 :有用吗? 是否渲染了足够的内容以使用户可以参与其中?
Time to Interactive: Is it usable? Can users interact with the page, or is it still busy loading?
互动时间 :可以使用吗? 用户可以与页面进行交互,还是仍在忙于加载?
Long Tasks (absence of): Is it delightful? Are the interactions smooth and natural, free of lag and jank?
长任务(不存在) :令人愉快吗? 交互是否顺畅自然,没有滞后和颠簸?
We can run performance audits manually or programmatically using tools like Lighthouse to provide values to metrics similar to the above. We can use a Lighthouse integration like Foo to automatically monitor website performance over time. In the example below you can see Twitter’s performance degrade and correlate it to an exact day and time! What if we could pinpoint this to an exact release? In the next section I explain how to do this.
我们可以使用Lighthouse之类的工具手动或以编程方式运行绩效审核,以为与上述类似的指标提供价值 。 我们可以使用像Foo这样的Lighthouse集成 来自动监控网站的性能 。 在下面的示例中,您可以看到Twitter的性能下降并将其与确切的日期和时间相关联! 如果我们可以确定确切的版本怎么办? 在下一节中,我将说明如何执行此操作。
我们如何自动回归测试性能? (How Can we Regression Test Performance Automatically?)
We can accomplish automatic performance tests integrated as a post deploy step in a continuous delivery pipeline. We can do this by creating a free account with Foo and utilizing its public REST API. Follow the steps below.
我们可以完成自动性能测试,作为连续交付管道中的部署后步骤进行集成。 为此,我们可以使用Foo创建一个免费帐户并利用其公共REST API。 请按照以下步骤操作。
Create a free account with Foo. Verify your email by clicking on the link sent.
使用Foo创建一个免费帐户 。 通过单击发送的链接来验证您的电子邮件。
Create a page on Foo where you can add the URL to the page you want to performance test.
在Foo上创建一个页面 ,您可以在其中将URL添加到要进行性能测试的页面。
- Click on the list item for your page from the screen above. This will direct you to the dashboard reflecting your page.在上方的屏幕上,单击页面的列表项。 这会将您定向到反映您的页面的仪表板。
- Obtain the page API token by scrolling to the bottom of the page above.滚动到上面页面的底部,获取页面API令牌。
Trigger a test run by requesting the endpoint as detailed in Foo’s API documentation. A curl command would look something like
curl -X POST "https://www.foo.software/api/v1/queue/items" -H "accept: application/json" -H "Content-Type: application/json" -d "{ \"pages\": \"pagetoken1,pagetoken2\", \"tag\": \"My Tag\" }"
.通过请求端点来触发测试运行,如Foo的API文档中所述 。 curl命令看起来像
curl -X POST "https://www.foo.software/api/v1/queue/items" -H "accept: application/json" -H "Content-Type: application/json" -d "{ \"pages\": \"pagetoken1,pagetoken2\", \"tag\": \"My Tag\" }"
。Add the above command as a post deploy step in your CD pipeline. You can find a full example in GitHub. Below a circleci snippet that actually defines this step.
将以上命令作为CD管道中的部署后步骤添加。 您可以在GitHub中找到完整的示例 。 在实际上定义此步骤的circleci片段下方。
From the example linked above our pipeline steps run on every commit to our master
branch.
从上面链接的示例中,我们的流水线步骤在对master
分支的每次提交上运行。
And voilà we are now deploying a release on every commit to master
and running a performance audit on it automatically ⭐!
而且,我们现在每次对master
提交都部署一个发行版,并自动对其进行性能审核⭐!
结论 (Conclusion)
Foo provides many features to monitor and analyze performance. In this post we took a look into how we can utilize it to run Lighthouse performance regression testing automatically. Below are other features — most of which are free!
Foo提供了许多功能来监视和分析性能 。 在这篇文章中,我们研究了如何利用它来自动运行Lighthouse性能回归测试。 以下是其他功能-其中大多数是免费的 !
- Automatic performance audits, a timeline visualization and detailed views of results.自动绩效审核,时间线可视化和结果的详细视图。
- Email, Slack, an PagerDuty notifications when performance has dropped, improved or become “back to normal”.当性能下降,提高或恢复“正常”时,通过电子邮件,Slack和PagerDuty通知。
- Automatic health check pings and notifications.自动运行状况检查ping和通知。
翻译自: https://www.freecodecamp.org/news/automatic-website-performance-regression-testing-4e30e6bf5cd/
性能测试回归测试
相关文章:

【html】【13】特效篇--下拉导航
html代码: 1 <!DOCTYPE html>2 <html>3 <head>4 <meta http-equiv"Content-Type" content"text/html; charsetUTF-8">5 <title>Bootstrap导航条鼠标悬停下拉菜单</title>6 <li…

小程序获取用户所在城市完整代码
小程序目录结构 插入提示: 1. 申请开发者密钥(key): 申请密钥 2. 下载微信小程序JavaScriptSDK,下载地址 下载完成后放入utils文件夹下引用即可 3. 安全域名设置,在“设置” -> “开发设置”中设置req…

prolog_如何通过观看权力的游戏学习Prolog
prologby Rachel Wiles瑞秋威尔斯(Rachel Wiles) 如何通过观看权力的游戏学习Prolog (How to learn Prolog by watching Game of Thrones) 他们死了吗? 他们还活着吗? 她是他的姨妈吗? 不用把精力浪费在2011年,而可以使用Prolog节…

身份证号码对应地区-官方措辞:行政区划代码
身份证前6位代表着该身份证的籍贯在哪里,而官方的措辞则为:行政区划代码 如何找到最新的行政区划代码了? 通过:http://blog.sina.com.cn/s/blog_5a76dae20100tqv5.html 此人的博客得知,行政区划代码是国家统计局统计的…

Jquery_操作cookies
首先引入jquery.cookie.js jquery.cookie.js下地址:http://plugins.jquery.com/cookie/ 操作文档: https://github.com/carhartl/jquery-cookie#readme 创建cookies: $.cookie(name, value); 设置有效期: 设置七天过期 $.cookie(n…

rem转rpx工具
对样式进行格式化,然后根据 “rem” 进行拆分,这样就会拆分成一个数组 [str1,str2,str3...,str6], 除了最后一个元素,前边的元素都会以 “rem” 样式的数值结尾, 然后在对数组中的元素字符串进行再次根据 “:” 进行…

colab中的变量怎么读取_Fizyr Retinanet在Colab中进行目标检测
colab中的变量怎么读取by RomRoc由RomRoc 带有Fizyr Retinanet的Google Colab中的对象检测 (Object Detection in Google Colab with Fizyr Retinanet) Let’s continue our journey to explore the best machine learning frameworks in computer vision.让我们继续我们的旅程…

c++重载(以运算符重载为主)
重载(OverLoading)是面向对象程序设计多态性的一种体现。所谓重载,是指“同一标识符”在同一作用域的不同场合具有不同的语义,这个标识符可以是函数名或运算符。也就是说,重载可以使多个函数使用同一个函数名ÿ…

记录-MySQL中的事件调度Event Scheduler
下面是自己的实例 /*查询event是否开启(查询结果Off为关闭 On为开启)*/show variables like %sche%; /*开启/关闭命令(1开启--0关闭)*/set global event_scheduler1; /*关闭事件任务: */alter event e_test_insert ON COMPLETION…

JS 实现下载Blod文件
实现代码: //下载Blod文件 const downLoadBlobFile (filename, res) > {if (!res) return;let a document.createElement(a);let blob new Blob([res], { type: application/vnd.openxmlformats-officedocument.spreadsheetml.sheet;charsetutf-8 });let blo…

盖尔-沙普利算法_盖尔定律-及其与初创企业的关系
盖尔-沙普利算法I realized something fascinating the other day: I realized that, as a startup entrepreneur and founder, I’m a builder of systems.前几天,我意识到了一件令人着迷的事情:我意识到,作为一名初创企业家和创始人&#x…

使用VS Code开发.Net Core 2.0 MVC Web应用程序教程之三(配置文件读取)
干了一天的活,还有点时间,给兄弟们写点东西吧。 大家有没有发现一个问题?那就是在.Net Core的MVC项目里面,没有.config文件了!!!同志们,没有config文件了啊,这样搞&#…

小程序云开发数据库在网站读取
使用TCB JS SDK Tencent Cloud Base(TCB) JavaScript SDK 介绍 TCB 提供开发应用所需服务和基础设施。TCB JS SDK 让你可以在网页端使用 JavaScript 代码服务访问 TCB 的的服务。你可以使用该 SDK 构建自己的公众号页面或者独立的网站等 Web 服务。 安装 TCB JS SDK 可以…

设计模式学习心得4
1.组合模式 定义一个父类,其中包括所有子类的方法接口,那么对于任何一个子类来说对外界都是封闭的,外界只调用父类的接口,而不知道子类是否有实现。 2.迭代器模式 这个很常见,在C中常常会用在标准模版类中,…

react创建组件_如何使用React创建时间轴组件
react创建组件These days I’ve been working on a new page for my website. I wanted to have a Timeline to showcase some of my professional accomplishments over the years.这些天来,我一直在为网站创建新页面。 我希望有一个时间表来展示我多年来的一些专业…

oracle根据一张表更新另外一张表
知道是两张表进行更新,之前作过mysql的,直接就写了: update a,b set a.code b.code wehre a.id b.id 然后就报错了,上网查了下知道oracle不能这样子写 之后找到如下的办法: UPDATE a set a.code (select b.code from b where…

应用内设置语言不重启方法
1、设置本应用方法网上有很多,大概如下 Resources resources getResources(); Configuration config resources.getConfiguration(); DisplayMetrics dm resources.getDisplayMetrics(); config.locale locale; //目标语言 resources.updateConfiguration(confi…

小程序内容审核违规过滤,在小程序使用security.msgSecCheck
使用微信提供的API security.msgSecCheck 查看文档 1.开通云开发,创建云环境。 2.在云函数的目录中,创建一个云函数(ContentCheck),如果小程序代码没有云函数的目录,可以在 project.config.json 目录中配置…

如何在JavaScript中切片和拼接数组
.slice() and .splice() are similar methods in JavaScript. They look similar, they sound similar, and they do similar things. For those reasons, it’s important to know the differences between them. Also, they’re used very often, so understanding their usa…

jQuery中getJSON跨域原理详解
详见:http://blog.yemou.net/article/query/info/tytfjhfascvhzxcytp28 jQuery中getJSON跨域原理详解 前几天我再开发一个叫 河蟹工具条 的时候,其中有个功能就是获取本页面的短网址。 这个想法是好的,可是在我付诸于行动的时候,发…

样式集(七)仿微信发现页样式
效果图: <!--pages/find/find.wxml--><include src"/components/common/common" /> <view class"item" catchtap"nav1"><image class"icon" mode"widthFix" src"/images/icon_5.png&q…

html向js传递id
html获取id方法: <div id"thediv1" style"display:block" onclick"ceshi(this.id)">技术A组</div> this.id ------>本身id转载于:https://www.cnblogs.com/wanlibingfeng/p/7613575.html

javascript功能_功能性JavaScript简介
javascript功能Hey everybody! I’ve written a book called Discover Functional JavaScript, and it’s now ready in both paperback and Kindle formats.大家好! 我已经写了一本书《 发现功能JavaScript》 ,现在已经可以使用平装本和Kindle格式。 A…

样式集,小程序群聊,聊天室样式,效果图
效果图 注:(码云 group_chat_yun ) 代码: <!-- <view class"top"><image class"page_editright" catchtap"navBack" mode"widthFix" src"/images/editright.png&quo…

GeoQuiz项目的开发与总结2
时间过得很快,第二阶段的学习结束了。 本周的主要工作是完成了Geoquiz项目的剩余部分。 首先是学到了些什么,最主要的是工作的流程,然后是界面的布局,菜单栏的设计到等。当然我觉得我学到的应该是工作制作的思维方式吧。 再来说说…

【12.16】VC++调用Word OLE进行自动化生成报表
! 12-16更新 初始化博客转载于:https://www.cnblogs.com/miki-52/p/5052689.html

python timber_如何使用Timber更有效地记录日志
python timberby Ayusch Jain通过Ayusch Jain 如何使用Timber更有效地记录日志 (How to log more efficiently with Timber) Logging is one of the most used utilities in the Android framework. It is really helpful in debugging your code when debugging by break-poi…

node 实现blog博客
https://cnodejs.org/topic/581b0c4ebb9452c9052e7acb转载于:https://www.cnblogs.com/zhangshuda/p/7640363.html

小程序输入框导致界面上移,在输入的时候固定住页面的解决代码
效果: 代码: <view class"comment" style"bottom:{{bottom}}px"><view class"emoji_block" wx:if{{emoji_block_show}}><view wx:for{{connectemoji}} catchtap"add_biaoqing" id"{{item}}…

react中纯函数_如何在纯React中创建电子邮件芯片
react中纯函数by Andreas Remdt由Andreas Remdt 如何在纯React中创建电子邮件芯片 (How to create email chips in pure React) Imagine that you, the good-looking developer (yes, I’m talking to you!), want to build an invitation form where users can add one or mo…