【问题标题】:How to add MongoDB sampler in Jmeter 5.1.1?如何在 Jmeter 5.1.1 中添加 MongoDB 采样器?
【发布时间】:2019-08-27 19:52:16
【问题描述】:

我正在尝试创建一个需要连接到 MongoDB 的 jMeter 脚本。 我需要阅读文档并添加断言,这不是性能测试。

我使用哪个采样器来连接 MongoDB? 我需要将任何外部罐子放在 bin 文件夹中吗? 另外,我正在使用 Jmeter 5.1.1。我在选项菜单中没有看到插件管理器。

【问题讨论】:

    标签: mongodb jmeter jmeter-plugins jmeter-5.0


    【解决方案1】:

    JMeter 的 Mongo support is deprecated ,改用 JSR223 组件中的脚本

    最好避免使用此元素进行负载测试,而是使用 MongoDBHolder 使用 JSR223+Groovy 脚本

    Plugins Manager 尚未包含在 JMeter 核心中,您需要 download it

    下载plugins-manager.jar并放入lib/ext目录,然后重启JMeter。

    【讨论】:

      【解决方案2】:
      1. 将下一行添加到 user.properties 文件:

        not_in_menu=
        
      2. 重启 JMeter 以获取更改

      3. 就是这样,您现在应该可以看到 MongoDB 测试元素了

      请注意,从MongoDB 3 开始,new approach with regards to MongoDB asynchronous queries 架构与 JMeter 线程模型不太兼容,因此您可能需要添加最新版本的 MongoDB 客户端库并在 Groovy 中编写测试,请查看MongoDB Performance Testing with JMeter 文章了解更多详情。

      【讨论】:

        猜你喜欢
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        • 1970-01-01
        • 2018-01-23
        • 1970-01-01
        • 1970-01-01
        相关资源
        最近更新 更多