Blazemeter / taurus

Automation-friendly framework for Continuous Testing by
http://gettaurus.org
Apache License 2.0
1.97k stars 461 forks source link

Gatling "Empty results" issue due for we set group for request #1729

Open BrightSummer opened 1 year ago

BrightSummer commented 1 year ago

Hi, We are try to use Taurus do gatling testing, and the yaml look like:

execution:
  - executor: gatling
    scenario: sample
scenarios:
  sample:
    script: build/libs/abc.jar
    simulation: test.TestSimulation

in TestSimilation we use 'io.gatling.javaapi.core.group', code look like:

scenario("ScenarioName")
                .exec(session -> session.setAll(Map.of("timeStamp", nlocalDateTime, "baseUrl", BASE_URL)))
                .group("abc")
                .on(exec(login.doLogin)
                        .exec(access.doAccess).pause(1000, 5000)
                );    

Then we found gatling works fine with result like:

================================================================================
2023-06-02 03:51:27                                           5s elapsed
---- Requests ------------------------------------------------------------------
> Global                                                   (OK=2      KO=0     )
> abc / Login... (OK=1      KO=0     )
> abc / Access... (OK=1      KO=0     )

---- Requisition Simulation ----------------------------------------------------
[--                                                                        ]  0%
          waiting: 60     / active: 1      / done: 0     
================================================================================

But Taurus get error: ERROR: Child Process Error: Empty results, most likely sample (GatlingExecutor) failed. Actual reason for this can be found in logs under /tmp/artifacts By looking the source code, we can see if we set ".group("abc")" in scenario, the 'req_hierarchy' in below will be always not none and '__parse_request' always return None, could we know if there any reason doesn't support 'req_hierarchy'?

       req_hierarchy = fields[0].split(',')[0]
        if req_hierarchy:
            if error:
                self._group_errors[req_hierarchy].add(error)
            return None

https://github.com/Blazemeter/taurus/blob/2ce9dbe71e280c2e1549b327657bc051ac0b7d35/bzt/modules/gatling.py#L603

ckrams commented 6 months ago

what is the version of taurus used; appears not latest and outdated per above source link