How to use java program in bean pre-processor

前端 未结 2 1428
灰色年华
灰色年华 2021-01-24 09:51

The below program reads the XML file and compress into gzip.

I have a couple of questions here.

  1. Can I use the following program directly in JMeter BeanS

2条回答
  •  生来不讨喜
    2021-01-24 10:13

    GZIP compression is rather "heavy" operation, if you will have lots of virtual users - it may become a bottleneck so consider using other approaches:

    1. There is __base64Encode() function available via JMeter plugins
    2. If for any reason it is not enough - go for JSR223 Sampler and Groovy language, Groovy is mostly compatible with Java so your code should work fine (just remove main method)

提交回复
热议问题