artilleryio / artillery

The complete load testing platform. Everything you need for production-grade load tests. Serverless & distributed. Load test with Playwright. Load test HTTP APIs, GraphQL, WebSocket, and more. Use any Node.js module.
https://www.artillery.io
Mozilla Public License 2.0
8.02k stars 510 forks source link

Bug? Path to processor inside --config file #329

Open ericmacfa opened 7 years ago

ericmacfa commented 7 years ago

Background

Project structure:

project_root
|   package.json
|   example-config.yml
+---tests/
|       example-test.yml
+---util/
|       request-utils.js

Command run: npm run artillery --config example-config.yml tests/example-test.yml

example-config.yml contains processor: './util/request-utils.js' (see end of post for attached files)

Issue

When the command is run, an error occurs: Error: Cannot find module 'project_root/tests/util/request-utils.js'

The filepath specified by processor is interpreted as relative to the script file, instead of relative to the config file.

So, unless all test files are in the same dir as the file specified by processor, the processor property is unusable in a config file

Perhaps the path can be interpreted at the time that the config file is loaded, before the config is passed to the script?

Attached files

hassy commented 7 years ago

Yes I agree that's not intuitive behavior.

banjo commented 3 years ago

Any news on this? Still seem to be problems when using the --config flag.