Artillery: report is not working

Created on 27 Mar 2019  路  1Comment  路  Source: artilleryio/artillery

Artillery: 1.6.0-27
Artillery Pro: not installed
Node.js: v10.14.1
OS: win32/x64

artillery run .\test.json is working

Started phase 0, duration: 2s @ 10:21:59(+0900) 2019-03-27
Report @ 10:22:02(+0900) 2019-03-27
Elapsed time: 3 seconds
  Scenarios launched:  4
  Scenarios completed: 4
  Requests completed:  4
  RPS sent: 1.99
  Request latency:
    min: 116.4
    max: 434.3
    median: 177.7
    p95: 434.3
    p99: 434.3
  Codes:
    200: 4

All virtual users finished
Summary report @ 10:22:02(+0900) 2019-03-27
  Scenarios launched:  4
  Scenarios completed: 4
  Requests completed:  4
  RPS sent: 1.98
  Request latency:
    min: 116.4
    max: 434.3
    median: 177.7
    p95: 434.3
    p99: 434.3
  Scenario counts:
    test: 4 (100%)
  Codes:
    200: 4

test.json

{
    "config": {
        "target": "url",
        "phases": [
            {
                "duration": 2,
                "arrivalRate": 2
            }
        ],
        "defaults": {
            "headers": {
                "User-Agent": "Artillery",
                "Authorization" : "",
                "Content-Type" : "application/x-www-form-urlencoded"

            }
        }
    },
    "scenarios": [
        {
            "name": "test",
            "flow": [
                {"post":
                    {
                        "url": "/path"
                    }
                }
            ]
        }
    ]
}

artillery report .\test.json

C:\Users\Wang\AppData\Roaming\npm\node_modules\artillery\lib\commands\report.js:37
  data.intermediate.forEach(o => delete o.latencies);
                    ^

TypeError: Cannot read property 'forEach' of undefined
    at Command.report (C:\Users\Wang\AppData\Roaming\npm\node_modules\artillery\lib\commands\report.js:37:21)
    at Command.listener (C:\Users\Wang\AppData\Roaming\npm\node_modules\artillery\node_modules\commander\index.js:301:8)
    at Command.emit (events.js:182:13)
    at Command.parseArgs (C:\Users\Wang\AppData\Roaming\npm\node_modules\artillery\node_modules\commander\index.js:615:12)
    at Command.parse (C:\Users\Wang\AppData\Roaming\npm\node_modules\artillery\node_modules\commander\index.js:458:21)
    at Object.<anonymous> (C:\Users\Wang\AppData\Roaming\npm\node_modules\artillery\bin\artillery:72:9)
    at Module._compile (internal/modules/cjs/loader.js:688:30)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:699:10)
    at Module.load (internal/modules/cjs/loader.js:598:32)
    at tryModuleLoad (internal/modules/cjs/loader.js:537:12)

Any options needed here? or other problem?

Most helpful comment

A report is produced from a JSON log file of a test run, so in your case something like this:

artillery run -o log.json test.json
artillery report log.json

>All comments

A report is produced from a JSON log file of a test run, so in your case something like this:

artillery run -o log.json test.json
artillery report log.json
Was this page helpful?
0 / 5 - 0 ratings