Reputation: 55
I am using karate 0.9.6, maven gatling plugin - 3.1.0 (tried also with 3.0.2 - same result)
After simulation is finished I see following stats
> 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 )
In this scenario, I should see 60 requests in global (OK + KO) cause that's the amount of requests that were executed but there's only 33 so it looks like failed tests are not considered by gatling. Looking into console I can see failed requests
My scenario looks like
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
Scenario above works perfectly in normal situation.
Important here is that both reusable features call "generic" features where all possible API calls are defined, so the structure is
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)
I created another scenario that contains all calls in it (so without reusing scenarios from other features)
Scenario: Perf test
Given path '/somePath'
When method get
Then match assertions
Given path '/somePath1'
When method post
Then match assertions
and it started working as expected
So, the question is - is it possible to make it work with presented structure? Or do I need change approach/create separate scenario?
Upvotes: 1
Views: 301
Reputation: 58088
We're actively working on the next release, so if you can try that, that would help: https://github.com/intuit/karate/wiki/1.0-upgrade-guide
There's also a recent issue logged that may be related: https://github.com/intuit/karate/issues/1382
So - if you see the same issue in the in-dev version, I request you to follow this process so that we get the simplest way to replicate: https://github.com/intuit/karate/wiki/How-to-Submit-an-Issue - and we can take a look.
Of course if you can pitch in to investigate and contribute code, nothing like it !
Upvotes: 1