【问题标题】:JMeter - Test not running on second call at run timeJMeter - 在运行时测试未在第二次调用时运行
【发布时间】:2020-04-28 11:35:25
【问题描述】:

我已将测试设置为以下布局:

Test Plam
Test Fragment 
    EP-1(include controller)
    EP-2(include controller)
    EP-3(include controller)
Thread Group
    Parameterized controller
        Module Controller
            EP1
    Parameterized controller
        Module Controller
            EP2
    Parameterized controller
        Module Controller
            EP1     
    Parameterized controller
        Module Controller
            EP3             
    View Results Tree

结果: EP1 EP2 EP3

在运行这些测试时,我只让 EP1 运行一次,而没有运行第二次(甚至看起来都没有尝试运行)

除了加载(包括控制器)之外,JMeter 日志中没有任何信息

我直接添加了 HTTP 请求并且遇到了同样的问题,所以进行了以下设置:

    Test Plan
Test Fragment 
    EP-1(include controller)
    EP-2(include controller)
    EP-3(include controller)
Thread Group
    Parameterized controller
            EP1
    Parameterized controller
            EP2
    Parameterized controller
            EP1     
    Parameterized controller
            EP3             
    View Results Tree

仍然得到相同的结果。有什么想法吗?

新:

输出是:

  • JWT 令牌
  • 包括 Controller1 (PUT)
  • 包括 Controller2 (GET)
  • HTTP 请求 (PUT)
  • 包括 Controller1 (PUT)
  • HTTP 请求 (GET)
  • 包括 Controller1 (PUT)

预期:

  • JWT 令牌
  • 包括 Controller1 (PUT)
  • 包括 Controller2 (GET)
  • HTTP 请求 (PUT)
  • 包括 Controller1 (PUT)
  • 包括 Controller2 (GET)
  • HTTP 请求 (GET)
  • 包括 Controller1 (PUT)
  • HTTP 请求 (GET)
  • 包括 Controller2 (GET)

【问题讨论】:

    标签: jmeter performance-testing jmeter-plugins jmeter-5.0


    【解决方案1】:

    我无法使用最新的稳定版JMeter 5.2.1 和您的测试计划结构以及每个包含文件的测试片段下的简单Dummy Samplers 来重现您的问题。

    我使用__threadGroupName() 和__V() functions combination 配置了包含的采样器以显示当前线程组迭代:

    ${__V(__jm__${__threadGroupName}__idx,)}
    

    如您所见,一切正常:

    【讨论】:

    • 添加了更多细节。我现在只写它们,所以 1 个线程增加 1 个和 1 个循环。
    【解决方案2】:

    原来缓存管理器正在缓存(GET)请求(复选框)

    取消选中它并且它有效。

    希望这可以帮助任何在编写这些测试时有时间但无法弄清楚为什么以下 (GET) 请求没有被执行的人。

    【讨论】:

      猜你喜欢
      • 2021-01-20
      • 2018-10-21
      • 2011-01-20
      • 2011-09-02
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多