web压力测试工具ab
From Wikipedia — “A/B testing is a way to compare two versions of a single variable, typically by testing a subject’s response to variant A against variant B, and determining which of the two variants is more effective.”
f光盘维基百科- “A / B测试是一个比较的单个可变的两个版本,典型地通过检测受试者对变体A对变化B的响应,以及确定其中两个变体的更有效的方法。”
In a Startup, you are running an e-commerce website that offers clothes for women. After the first sales year, your system has recorded numbers saying customers likely to visit than paying through your platform. Given the purpose of this screen will lead two user groups A and B, who has a similar audience characteristic, to “pay” for your product:
在一家初创企业中,您正在运行一个电子商务网站,该网站为女性提供衣服。 在第一个销售年度之后,您的系统记录的数字表明客户可能会拜访而不是通过您的平台付款。 鉴于此屏幕的目的,将导致具有相似受众特征的两个用户组A和B为您的产品“付款”:
Which one has a better sale? We need to run a user-test on both possibilities for the same audience set but divided into two different groups. This test will answer just one question:
哪一个销售更好? 我们需要针对相同的受众群体但分为两个不同的组的两种可能性进行用户测试。 该测试只会回答一个问题:
Does the audience who ages from 28–32 years old, living in a urban city, using iPhone likely to pay by PayPal, by ApplePay, by Credit Card or doesn’t care at all?
居住在城市中,年龄在28-32岁之间,使用iPhone的受众可能会通过PayPal,ApplePay,信用卡付款还是完全不在乎?
You are leading the Software Engineering team, to work with this test, your system must adopt the following requirements:
您正在领导软件工程团队,要进行此测试,您的系统必须满足以下要求:
Develop two new features: “Pay with ApplePay” and “Pay with PayPal”. 开发两个新功能:“使用ApplePay付款”和“使用PayPal付款”。 Display the feature “Pay with ApplePay” for only user-set A, 仅针对用户设置A显示功能“使用ApplePay付款”, Display the feature “Pay with PayPal” for only user-set B. 仅对用户设置B显示功能“使用PayPal进行付款”。 Display none of them for the other audience sets (not in the A/B test). 对于其他受众群体,则不显示任何内容(不在A / B测试中)。A “User Story” statement format is always a good method to describe what user needs and what system will provide to that user. Let’s link the business idea to the engineering process:
“用户故事”语句格式始终是描述用户需求以及向用户提供何种系统的好方法。 让我们将经营理念与工程流程联系起来:
Figure — 2. The user requirement for A/B Testing. 图— 2. A / B测试的用户需求。Your team will have three statements as User Stories to implement:
您的团队将执行以下三个陈述作为用户故事:
As a user in A, I want to see the “Pay with PayPal” button, so that I can measure how the effectiveness of using PayPal. 作为A中的用户,我希望看到“使用PayPal进行付款”按钮,以便可以衡量使用PayPal的效果。 As a user in B, I want to see the “Pay with ApplePay” button, so that I can measure how the effectiveness of using ApplePay. 作为B的用户,我希望看到“使用ApplePay付款”按钮,以便可以衡量使用ApplePay的效果。 As a user is NOT in A or B, I don’t want to see any of them, so that there will be no impact on the sales. 由于用户不在A或B中,因此我不想看到它们中的任何一个,因此不会对销售产生影响。On a pretty big team scale, there are three different engineering teams for those who work on a specific stage. The principal of the A/B Test engineering process is the same as in three-stage: Data engineering, Software engineering, and System Engineering stage.
在相当大的团队规模上,有三个不同的工程团队供在特定阶段工作的人员使用。 A / B测试工程过程的原理与三个阶段相同: 数据工程,软件工程和系统工程阶段 。
Figure — 3. The engineering process for A/B Testing. 图— 3. A / B测试的工程过程。Data engineering: refactoring the data source to determine the audience of interest, then divided it into the A-set and the B-set. The result of this process can be one of those two:
数据工程:重构数据源以确定感兴趣的受众,然后将其分为A集和B集。 此过程的结果可能是以下两个之一:
Mark a selection for A/B and NOT(A/B), visible to the client-side. 标记对客户端可见的A / B和NOT(A / B)选项。 A list of A/B or NOT(A/B) users to be referred by a routing service. 路由服务将引用的A / B或NOT(A / B)用户列表。Software engineering: develop new features for A-set and B-set. The previous version will become the feature NOT(A/B-set). The result of this process will be:
软件工程:为A集和B集开发新功能。 以前的版本将成为功能NOT(A / B-set)。 该过程的结果将是:
3 different software features in three different service endpoints. 三个不同服务端点中的3个不同软件功能。 3 different displayed features at the client-side for user interfacing. 客户端上3种不同的显示功能,用于用户接口。System engineering: network wiring the audience set of A/B or NOT(A/B) to the corresponding feature A/B or NOT(A/B). The result of this process will be:
系统工程:将A / B或NOT(A / B)的听众集与相应的功能A / B或NOT(A / B)布线。 该过程的结果将是:
A link between client-side requests and the corresponding features. 客户端请求和相应功能之间的链接。 Traffic routing among audience set and feature set on request. 根据需要在受众组和功能组之间进行流量路由。The responsibility of A/B Testing solution design is clearly on the System Engineering team’s shoulder. What should be a good strategy to design a resilience system that can seemly switch user on-request from one to the other service? The overall system architecture and analyzing business impact are important to make any decision of choice.
系统工程团队显然要承担A / B测试解决方案设计的责任。 设计一种可以将用户的请求从一项服务切换到另一项服务的弹性系统的最佳策略应该是什么? 总体系统架构和业务影响分析对于做出任何决定至关重要。
An end-to-end solution design must cover the differential software traversal among different users and devices. Depending on web apps or mobile apps, the deployment of new features will impact the traversal of usage differently.
端到端解决方案设计必须涵盖不同用户和设备之间的差异软件遍历。 根据Web应用程序或移动应用程序,新功能的部署将对使用遍历产生不同的影响。
With web technology, your team can push the content from the server-side with minimal, controllable time-to-update. But with mobile apps, the choice to upgrade a new version that contains your new A/B testing feature is put on the customer’s hands. For mobile apps situation, you must ensure your audience-set that you want to test having the newest version in hands.
借助Web技术,您的团队可以以最少的可控更新时间从服务器端推送内容。 但是对于移动应用程序,升级包含您的新A / B测试功能的新版本的选择权就落在了客户的手上。 对于移动应用程序,必须确保要测试的受众群体手中拥有最新版本。
You don’t want your customers are using an out-of-date version of your mobile apps. A new upgrade with breaking change may block your customer’s access to your apps that is the unwanted-ever situation. “Forcing” upgrade is one of the solutions that can work in this case or some time it works very well in an urgent case that entirely blocking your user access.
您不希望客户使用过时的移动应用程序版本。 具有重大更改的新升级可能会阻止客户访问您的应用程序,这是前所未有的情况。 “强制”升级是可以在这种情况下使用的解决方案之一,或者在某些情况下在完全阻止用户访问的紧急情况下非常有效。
Given all customers have up-to-date software in hands, what is the best scenario for A/B testing solution design?
鉴于所有客户都拥有最新的软件,A / B测试解决方案设计的最佳方案是什么?
Figure — 4. Service routing rule base on user properties. 图— 4.基于用户属性的服务路由规则。Your data engineering team has already delivered an A/B audience set that allows determining a specific customer belong to A, B, or neither A nor B. At step 1, the client-side request to the A/B audience service to know what is the specific routing customer property? This property will be used for specifying the feature to interact in the following steps.
您的数据工程团队已经交付了一个A / B听众集,该听众集可以确定某个特定客户不属于A,B,或者既不属于A也不属于B。在步骤1,客户端向A / B听众服务发出请求以了解什么是特定的路由客户属性? 此属性将用于在以下步骤中指定要交互的功能。
One of the methods to write the customer space to application space is using the “Reverse-Proxy/Rewrite URL” technique by mapping from “user-property” to “service-endpoint”. This is an example of a service mapping table:
将客户空间写入应用程序空间的方法之一是通过从“用户属性”到“服务端点”的映射,使用“反向代理/重写URL”技术。 这是服务映射表的示例:
Figure — 5. Service endpoint mapping by using the resource URLs. 图— 5.通过使用资源URL进行服务端点映射。The other method that I prefer to apply for a small software development scale or micro-teams organization whereas you own what you did:
在您拥有所做工作的同时,我更喜欢在小型软件开发规模或微型团队组织中申请的另一种方法:
Figure — 6. Service endpoint mapping by using an HTTP header. 图— 6.使用HTTP标头的服务端点映射。Next step, we will experience an example of using NGINX reverse-proxy to setup a dynamic routing rule bases on HTTP headers. This method is practical for a monolithic application architecture or a docker based microservices architecture.
下一步,我们将体验一个使用NGINX反向代理基于HTTP标头设置动态路由规则的示例。 该方法对于单片应用程序架构或基于docker的微服务架构非常实用。
Your system has an endpoint configured as a gateway. Every request will hit to the https://yourdomain.com. In the payment method selection example above, you want the new payment method button will call to the same API but work either for PayPal or AppPay depends on a particular customer to be controllable from the server-side:
您的系统具有配置为网关的端点。 每个请求都会访问https://yourdomain.com 。 在上面的付款方式选择示例中,您希望新的付款方式按钮将调用相同的API,但是否适用于PayPal或AppPay取决于可从服务器端控制的特定客户:
One endpoint https://yourdomain.com/purchase works:— for Credit Card with the old version and NOT(A/B-set).— for PayPal with the new version and A-set.— for ApplePay with the new version and B-set.
一个端点https://yourdomain.com/purchase可以工作:-适用于具有旧版本和NOT(A / B设置)的信用卡。-适用于具有新版本和A-set的PayPal。-适用于具有新版本的ApplePay。和B套。
Nginx configuration supports converting HTTP headers to variables that you can use in your configuration to redirect endpoints. Let’s define an “x-service” header to specify the service URI “/v2a” or “/v2b” corresponding to PayPal or ApplePay feature.
Nginx配置支持将HTTP标头转换为可在配置中用于重定向端点的变量。 让我们定义一个“ x-service”标头,以指定与PayPal或ApplePay功能相对应的服务URI“ / v2a ”或“ / v2b ”。
server { listen 80; server_name localhost; server_name_in_redirect off; location /purchase { proxy_pass https://yourdomain.com$http_x_service$request_uri; }}This is the mapping table explaining how it works:
这是解释其工作方式的映射表:
Figure — 7. Using an HTTP header with NGINX to rewrite the service URL. 图— 7.通过NGINX使用HTTP标头重写服务URL。NGINX is one of many methods that you can utilize to setup a dynamic routing table base on HTTP headers. Mapping Template of Amazon API Gateway is another choice if your solution using AWS Services. Istio in Kubernetes also supports a header-based routing method that works in the same way (Istio is developed base on NGINX).
NGINX是可用于基于HTTP标头设置动态路由表的众多方法之一。 如果您的解决方案使用AWS服务,则Amazon API Gateway的映射模板是另一种选择。 Kubernetes中的Istio还支持以相同方式工作的基于标头的路由方法(Istio是基于NGINX开发的)。
Amazon API Gateway Stage Deployment supports canary, tagging with Lambda Alias version to a different stage of applications. By doing so, your applications will access the different stages of one service through the different endpoints:
Amazon API Gateway Stage Deployment支持金丝雀,使用Lambda Alias版本标记到不同的应用程序阶段。 这样,您的应用程序将通过不同的端点访问一项服务的不同阶段:
https://xxxxx.execute-api.us-east-1.amazonaws.com/v2a/purchase
https://xxxxx.execute-api.us-east-1.amazonaws.com/v2a/purchase
https://xxxxx.execute-api.us-east-1.amazonaws.com/v2b/purchase
https://xxxxx.execute-api.us-east-1.amazonaws.com/v2b/purchase
https://xxxxx.execute-api.us-east-1.amazonaws.com/v1/purchase
https://xxxxx.execute-api.us-east-1.amazonaws.com/v1/purchase
Those endpoints are configured to one Lambda function but in the different stages of deployments. Whenever you want to upgrade a small patch of v2a or v2b, you must deploy another new tag: v2a-patch-1 or v2b-patch-2. Bad news comes with the need to upgrade your client-side code. It is not a good way to change client-side apps every-time a small change has just released.
这些端点被配置为具有一个Lambda功能,但处于部署的不同阶段。 每当您要升级v2a或v2b的小补丁时,都必须部署另一个新标签:v2a-patch-1或v2b-patch-2。 坏消息与升级客户端代码有关。 每次发布小的更改时,这都不是更改客户端应用程序的好方法。
So, what is the best solution to use a single endpoint with a different version of the code? Changing inside the code is the responsibility of developers who own that feature.
那么,将单个端点与不同版本的代码一起使用的最佳解决方案是什么? 在代码内部进行更改是拥有该功能的开发人员的责任。
By forwarding HTTP headers to the code inside a Lambda function, developers have full control of what to behave with the incoming request. But modifying the last qualified code (v1 feature) is not alike for the modern software development process.
通过将HTTP标头转发到Lambda函数中的代码,开发人员可以完全控制传入请求的行为。 但是,对于现代软件开发流程,修改最后的合格代码(v1功能)并不相同。
Fortunately, Lambda has Layers, an architecture that allows a function can utilize the code that deployed differently after the function was deployed. This way can allow overriding the existing file structure in it.
幸运的是,Lambda具有Layers,该体系结构允许功能可以使用功能部署后以不同方式部署的代码。 这种方法可以允许覆盖其中的现有文件结构。
Figure — 8. Using Lambda layered architecture to switch among features. 图— 8.使用Lambda分层体系结构在功能之间切换。An example of using NodeJS runtime in Lambda function, we deploy 3 layers for v1, v2a, and v2b feature in three different node modules. In the Lambda entry point index.handler(), it lazy loading the layered code as a module:
在Lambda函数中使用NodeJS运行时的示例,我们在三个不同的节点模块中为v1,v2a和v2b功能部署了3个层。 在Lambda入口点index.handler()中 , 它延迟将分层代码作为模块加载:
Figure — 9. Lambda main code to switch between layered codes. 图— 9. Lambda主代码在分层代码之间切换。Every time you need an update from a feature (v2a or v2b), there is the only thing that’s need to update is the layered code of it. Even if you extend your A/B testing scenario to another payment method, eg: “Pay with GooglePay”, you use another value for x-service = v2c and developing the “v2c-code”.
每当您需要从功能(v2a或v2b)进行更新时,唯一需要更新的就是它的分层代码。 即使您将A / B测试方案扩展到其他付款方式,例如:“ 使用GooglePay付款 ”,您也可以使用x-service = v2c的另一个值并开发“ v2c代码 ”。
Warning: the example code above is not recommended to use in production due to it’s lacking security prevention. You must sanitize the header’s value before it used to not exposing the vunerable of remote execution ability throught the require(“…”) method.
警告:由于缺乏安全防范,因此不建议在生产中使用上述示例代码。 您必须先清理标头的值,然后才能使用require(“…”)方法暴露标头的远程执行能力的弱点。
Choosing the right solution at the right time needs your engineering team's experiences and their awareness about how the system works. There is a no-one-fit-all solution always, the best one just works for a particular situation.
在正确的时间选择正确的解决方案需要您的工程团队的经验以及他们对系统工作方式的了解。 总有一种万无一失的解决方案,最好的解决方案仅适用于特定情况。
(Subscribe the Problem Solving Blog to watch out…)
(订阅问题解决博客以提防……)
翻译自: https://medium.com/swlh/a-b-testing-what-is-the-solution-for-your-web-and-mobile-apps-part-1-68faf132fceb
web压力测试工具ab
相关资源:四史答题软件安装包exe