JMeter:tearDown线程组的目的是什么 [英] JMeter: What is the purpose of tearDown Thread Group

查看:423
本文介绍了JMeter:tearDown线程组的目的是什么的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想知道JMeter中tearDown Thread Group的实际用法.

I would like to know the practical usage of tearDown Thread Group in JMeter.

在哪种情况下我可以使用tearDown线程组?

In which scenario I can use tearDown Thread Group?

推荐答案

根据 JMeter拆除线程组

一种特殊类型的ThreadGroup,可用于执行 测试后操作.这些线程的行为就像一个 普通的线程组元素.区别在于这些类型的 线程在测试完成执行其常规之后执行 线程组.

A special type of ThreadGroup that can be utilized to perform Post-Test Actions. The behavior of these threads is exactly like a normal Thread Group element. The difference is that these type of threads execute after the test has finished executing its regular Thread Groups.

简单来说,此线程组用于执行在执行测试后已完成/必需的操作.即发布测试操作.该线程组将在正常线程组完成执行后执行.

In simple words, This thread group is used to perform actions which are done/necessary after performing tests. i.e post testing actions. This thread group will execute after normal thread group has finished execution.

此线程组可用于需要在测试执行后执行某些操作的方案.简单的例子可能是:向服务器发送重置请求,对服务器的一些预热请求,一些配置更改或客户端执行.

This thread group can be used in scenarios which needs to perform some actions after test execution. Simple examples could be, sending reset requests to server, some warm down requests to severs or some config changes or client side execution.

例如执行测试后如果要删除仅为测试创建的用户.因此,我可以在拆解线程组中发送deleteuser的请求.另一个例子可能是,如果在测试后我想对响应数据进行一些报告,那么您可以在拆卸线程组中添加示例Java代码(Bean处理器)并执行操作.

Ex. After execution of my test If I want to delete a user which I have created only for test. Thus I can send request of deleteuser in teardown threadgroup. Another example could be, If after the test I want to some reporting stuff on response data, then you can add sample java code (beanshell processor) in tear down threadgroup and perform the operation.

请记住,操作可以是任何东西,可以是服务器请求,数据库请求或示例Java代码等.条件是,应在测试执行后完成.

Keep in mind that operation can be anything, a server request or a DB request or a sample java code etc. Condition is, it should be done after your test execution.

这篇关于JMeter:tearDown线程组的目的是什么的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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