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

Cannot find module 'artillery-engine-processor' #2570

Open
poponuts opened this issue Mar 13, 2024 · 3 comments
Open

Cannot find module 'artillery-engine-processor' #2570

poponuts opened this issue Mar 13, 2024 · 3 comments

Comments

@poponuts
Copy link

Version info:

Artillery: 2.0.7
Node.js:   v19.9.0
OS:        darwin

I have multiple node versions but currently points to v19.9.0

Installed artillery globally too.

Running this command:
artillery run hello-world.yml

I expected to see this happen:
There shouldn't be any errors

Instead, this happened:
I get the error:

WARNING: engine processor specified but module artillery-engine-processor could not be loaded
Error: Cannot find module 'artillery-engine-processor'
Require stack:
- /Users/nnn/.nvm/versions/node/v19.9.0/lib/node_modules/artillery/node_modules/@artilleryio/int-core/lib/runner.js
- /Users/nnn/.nvm/versions/node/v19.9.0/lib/node_modules/artillery/node_modules/@artilleryio/int-core/index.js
- /Users/nnn/.nvm/versions/node/v19.9.0/lib/node_modules/artillery/lib/artillery-global.js
- /Users/nnn/.nvm/versions/node/v19.9.0/lib/node_modules/artillery/lib/platform/local/worker.js
    at Module._resolveFilename (node:internal/modules/cjs/loader:1090:15)
    at Module._load (node:internal/modules/cjs/loader:934:27)
    at Module.require (node:internal/modules/cjs/loader:1157:19)
    at require (node:internal/modules/helpers:119:18)

Files being used:

config:
  target: https://www.artillery.io
  engines:
    playwright: {}
    processor: './tests/load/helloWorld.spec.ts'
scenarios:
  - engine: playwright
    testFunction: 'helloFlow'
import { type Page } from '@playwright/test';
async function helloFlow(page: Page) {
  await page.goto('https://www.artillery.io/');
}
@bernardobridge
Copy link
Contributor

Hello @poponuts 👋

processor should not be under engines, otherwise Artillery will try to use an engine with that name. It should be under the root of config (i.e. config.processor).

@poponuts
Copy link
Author

Thanks for swift response. Sorry for the ignorance but I’m a bit confused on this as I just installed artillery globally as per instructions. Then on my project’s root directory, I run artillery via the yaml file.

@bernardobridge
Copy link
Contributor

Thanks for swift response. Sorry for the ignorance but I’m a bit confused on this as I just installed artillery globally as per instructions. Then on my project’s root directory, I run artillery via the yaml file.

No problem @poponuts ! Just to confirm, this is what your YAML file should look like:

config:
  target: https://www.artillery.io
  processor: './tests/load/helloWorld.spec.ts'
  engines:
    playwright: {}

scenarios:
  - engine: playwright
    testFunction: 'helloFlow'

And the .ts processor file you point to:

import { type Page } from '@playwright/test';

export async function helloFlow(page: Page) {
  await page.goto('https://www.artillery.io/');
}

Let me know if that works for you!

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

2 participants