Gatling version: 3.11.5 (must be up to date)
Gatling flavor: java kotlin scala javascript typescript
Gatling build tool: maven gradle sbt bundle npm
I read the guidelines and how to ask a question topics.
I copied output I observe, and explain what I think should be.
I have a scenario of performance tests where I need to sign my requests with aws4 package.
Sadly I get errors for the NodeJS build in modules like crypto, url, querystring.
This is my code:
const aws4 = require(“aws4”);
aws4.sign(params, {
accessKeyId: accessKeyId,
secretAccessKey: secretAccessKey,
});
This is the output from the test:
npx gatling run --simulation order
GraalVM Community Edition 23.0.0 already installed at
.gatling/graalvm/23.0.0
Coursier 2.1.12 already installed at .gatling/coursier/2.1.12/cs
Resolving dependencies with Coursier
Bundling a Gatling simulation with options:
-
sourcesFolder: src
-
bundleFile: target/bundle.js
-
typescript: false
X [ERROR] Could not resolve “url”node_modules/.pnpm/aws4@1.13.2/node_modules/aws4/aws4.js:2:18:
2 │ url = require(‘url’),
╵ ~~~~~
The package “url” wasn’t found on the file system but is built into node. Are you trying to bundle
for node? You can use “platform: ‘node’” to do that, which will remove this error.
I have the same for queryString and crypto.
Have tried js and ts - it is the same error for both.
Is there a way to make this work in my project?