Skip to content

Error when using ensure with expect metrics #3585

@graytonio

Description

@graytonio

Version info:

Running from github action
docker.io/artilleryio/artillery:latest

Running this command:

run-fargate

I expected to see this happen:

Checks being evaluated and no error message at the end of the run.

Instead, this happened:

Test run completed: ty3x5_k9qb66y6q4py8yjmh8xjfh8fbg8ag_reaf [14:05:54]
Error: Lexical error on line 1. Unrecognized text.
...d4ca727fa9cdd0cff73'.hasProperty/'5f9d02
-----------------------^
    at Parser.parseError (/home/node/artillery/node_modules/artillery-plugin-ensure/node_modules/filtrex/dist/cjs/filtrex.js:1229:19)
    at Object.parseError (/home/node/artillery/node_modules/artillery-plugin-ensure/node_modules/filtrex/dist/cjs/filtrex.js:1434:36)
    at Object.next (/home/node/artillery/node_modules/artillery-plugin-ensure/node_modules/filtrex/dist/cjs/filtrex.js:1576:33)
    at Object.lex (/home/node/artillery/node_modules/artillery-plugin-ensure/node_modules/filtrex/dist/cjs/filtrex.js:1584:30)
    at lex (/home/node/artillery/node_modules/artillery-plugin-ensure/node_modules/filtrex/dist/cjs/filtrex.js:1268:36)
    at Parser.parse (/home/node/artillery/node_modules/artillery-plugin-ensure/node_modules/filtrex/dist/cjs/filtrex.js:1287:34)
    at compileExpression (/home/node/artillery/node_modules/artillery-plugin-ensure/node_modules/filtrex/dist/cjs/filtrex.js:1815:23)
    at /home/node/artillery/node_modules/artillery-plugin-ensure/index.js:168:17
    at Array.forEach (<anonymous>)
    at EnsurePlugin.runChecks (/home/node/artillery/node_modules/artillery-plugin-ensure/index.js:156:25)

Checks:
fail: (plugins.expect.ok.hasProperty/http.requests) * 100 >= 99.9
ok: (vusers.completed-vusers.failed/vusers.created) * 100 >= 99.9
ok: http.response_time.p99 < 300000

Files being used:

Plugins Config:

plugins:
    expect: {}
    ensure:
      thresholds:
        - 'http.response_time.p99': 300000
      conditions:
        - expression: '(vusers.completed-vusers.failed/vusers.created) * 100 >= 99.9'
        - expression: '(plugins.expect.ok.hasProperty/http.requests) * 100 >= 99.9'

Expect Config:

- post:
     expect:
     - contentType: json
     - hasProperty: "data.graph.publishSubgraph.didUpdateGateway"

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions