Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Provide an alias for multiple expect.equals to distinguish them #3408

Open
ash211 opened this issue Nov 15, 2024 · 0 comments
Open

Provide an alias for multiple expect.equals to distinguish them #3408

ash211 opened this issue Nov 15, 2024 · 0 comments

Comments

@ash211
Copy link

ash211 commented Nov 15, 2024

Version info:

Artillery: 2.0.21
Node.js:   v22.9.0
OS:        darwin

Running this command:

artillery run artillery-load-test.yml

with this config in artillery-load-test.yml:

<snip>
scenarios:
  - flow:
      - function: 'loadPayload'
      - post:
          url: '/my-url'
          json: '{{ payload }}'
          capture:
            - json: "$.executionResult.type"
              as: resultType
            - json: "$.executionResult.success.returnValue.integer"
              as: returnValueInt
          expect:
            - statusCode: 200
            - contentType: json
            - equals:
              - '{{ resultType }}'
              - 'success'
            - equals:
              - '{{ returnValueInt }}'
              - '42'

I'm looking at this response:

plugins.expect.failed: ......................................................... 167216
plugins.expect.failed.contentType: ............................................. 41591
plugins.expect.failed.equals: .................................................. 84034 ***
plugins.expect.failed.statusCode: .............................................. 41591
plugins.expect.ok: ............................................................. 3392
plugins.expect.ok.contentType: ................................................. 1061
plugins.expect.ok.equals: ...................................................... 1270 ***
plugins.expect.ok.statusCode: .................................................. 1061

I have two equals expressions, but they are both counting against the numbers at plugins.expect.failed.equals and plugins.expect.ok.equals. There's no way to tell if these two equals expressions are failing at the same frequency, or different. It would be helpful if there was a way to distinguish between these.

Desired output would be a way to get an output like this:

plugins.expect.failed: ......................................................... 167216
plugins.expect.failed.contentType: ............................................. 41591
plugins.expect.failed.equals.resultType: ....................................... 42017 ***
plugins.expect.failed.equals.returnValueInt: ................................... 42017 ***
plugins.expect.failed.statusCode: .............................................. 41591
plugins.expect.ok: ............................................................. 3392
plugins.expect.ok.contentType: ................................................. 1061
plugins.expect.ok.equals.resultType: ........................................... 635 ***
plugins.expect.ok.equals.returnValueInt: ....................................... 635 ***
plugins.expect.ok.statusCode: .................................................. 1061

where the equals.resultType and equals.returnValueInt are counted independently.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant