Karate 空手道-加特林-请求失败不显示为KO
我正在使用空手道0.9.6,maven gatling插件-3.1.0(也尝试了3.0.2-相同的结果) 模拟完成后,我看到以下统计信息Karate 空手道-加特林-请求失败不显示为KO,karate,Karate,我正在使用空手道0.9.6,maven gatling插件-3.1.0(也尝试了3.0.2-相同的结果) 模拟完成后,我看到以下统计信息 > Global (OK=33 KO=0 ) > POST /token (OK=10 KO=0 ) > POST /en
> Global (OK=33 KO=0 )
> POST /token (OK=10 KO=0 )
> POST /endpoint1 (OK=10 KO=0 )
> POST /endpoint2 (OK=8 KO=0 )
> POST /endpoint3 (OK=3 KO=0 )
> GET /endpoint4 (OK=1 KO=0 )
> POST /endpoint5 (OK=1 KO=0 )
在这个场景中,我应该看到60个全局(OK+KO)请求,因为这是执行的请求量,但只有33个,所以看起来失败的测试不被gatling考虑。查看控制台,我可以看到失败的请求
我的情况看起来像
Scenario: Perf test
Given call read('classpath:some-reusable.feature') {args} #calling first 3 requests (token, endpoint1, endpoint2)
When call read('classpath:another-reusable.feature') {arg} #calling endpoint3 to endpoint5
Then match assertions
上述场景在正常情况下工作正常
这里很重要的一点是,这两个可重用特性都调用“通用”特性,其中定义了所有可能的API调用,因此结构是
scr/java/test
|
|__api
| |_generic1.feature (contains defined paths along with path to requests folder and HTTP methods)
| |_...
| |_genericN.feature
|
|__reusables
| |_resubale1.feature (contains call read('classpath:api/genericN.feature@operation') and some
| basic assertions like match responseStatus == correctStatus)
|
|__scenarios
|_myTest.feature (contains call read('classpath:reusables/reusable1.feature') and other assertions that are required in test)
我创建了另一个场景,其中包含所有调用(因此不需要重用其他功能的场景)
它开始按预期工作
所以,问题是——有没有可能让它在呈现的结构中工作?还是我需要改变方法/创建单独的方案?我们正在积极开发下一个版本,因此如果您可以尝试,这将有助于: 还有一个最近记录的问题可能与此有关: 所以-如果您在开发版本中看到相同的问题,我请求您遵循这个过程,以便我们获得最简单的复制方法:-我们可以看一下
当然,如果你能投入到调查和贡献代码中去,那就没有什么比这更好的了 我认为你链接的问题和我的问题是一样的,所以一旦公关被合并,我会尝试一下
Scenario: Perf test
Given path '/somePath'
When method get
Then match assertions
Given path '/somePath1'
When method post
Then match assertions