Test Fragment--测试片段

The Test Fragment is used in conjunction with the Include Controller and Module Controller .

测试片段一般和包含控制器和模块控制器一起使用

 

Include Controller--包含控制器

The include controller is designed to use an external jmx file. To use it, create a Test Fragment underneath the Test Plan and add any desired samplers, controllers etc. below it. Then save the Test Plan. The file is now ready to be included as part of other Test Plans.

For convenience, a Thread Group can also be added in the external JMX file for debugging purposes. A Module Controller can be used to reference the Test Fragment. The Thread Group will be ignored during the include process.

If the test uses a Cookie Manager or User Defined Variables, these should be placed in the top-level test plan, not the included file, otherwise they are not guaranteed to work.

1.Include controller(包含控制器)是用来使用外部jmx文件的。使用方法:在测试计划下创建一个Test Fragment(测试片段),并在测试片段下添加所需要的取样器、控制器等等。最后别忘了启用Test Fragment和保存测试计划,用Include controller引用测试计划。

2.为了方便,可以在外部JMX文件里面使用线程组进行调试。模板控制器可以引用测试片段。在包含过程中,线程组会被无视。

3.如果测试时需要使用cookie管理器或者用户参数要在需要运行的测试中定义,不然不会生效(在测试片段中不会生效)。

4.多个include controller的命名必须不一样,include controller命名唯一性

。。。

 

Module Controller--模块控制器

。。。

 

 

使用场景:在多个测试计划中需要使用同一个步骤,为了避免不断重写可以使用这种方法引用

 

 简单的例子:

1.Test Fragment.jmx里面的Test Fragment定义了一些变量

2.include controller

内容来源于网络如有侵权请私信删除
你还没有登录,请先登录注册
  • 还没有人评论,欢迎说说您的想法!