You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
i am using artillery for a miniapp which has graphql queries. So far it works fine when i have loaded the mocks when i do yarn start but i have couple of scenario for which i want to use different mocks that changes the response of the scenario.
Currently i have .js file to overwrite the mock file which worked fine in local but it does not work when using docker images.
Version info:
Artillery : 2.0.0-35
Node.js : v16.18.1
Running this command:
Local : yarn performance-test-bff
Jenkins/docker : ./batect performance-test-bff
I expected to see this happen:
Local: overwrite files to use new mock (cannot think any simpler way than this otherwise yarn start is required to take mock effect)
Instead, this happened:
Works fine in local need it the same solution for docker.
use strict";
const fs = require('fs')
fs.writeFileSync("./../pathFile/newMock.json", ./../pathFile/existingMock.json
module.exports = {
#overwriting the mock which is loaded initially in yarn start to take immediate effect of mock
beforeEdgeRequest(requestParams, context, ee, next) {
console.log('Stub Response set '); fs.writeFileSync("./../pathToFile/existingMock", ./../pathFile/newMock.json);
return next();
}
}
Commands in sequence from batect to app/server/package.json
i have added one scenario here but actually there are multiple flows in my actual project. I am using same scenario in the same file and using helper.json to update mocks while running perf. This approach works in local but when i run it in jenkins it used docker.
please ignore indentation and spellings . It is just copy pasted and manually entered from mobile 😭😭
Thanks a lot for your help
The text was updated successfully, but these errors were encountered:
Hi all,
i am using artillery for a miniapp which has graphql queries. So far it works fine when i have loaded the mocks when i do yarn start but i have couple of scenario for which i want to use different mocks that changes the response of the scenario.
Currently i have .js file to overwrite the mock file which worked fine in local but it does not work when using docker images.
Version info:
Artillery : 2.0.0-35
Node.js : v16.18.1
Running this command:
Local : yarn performance-test-bff
Jenkins/docker : ./batect performance-test-bff
I expected to see this happen:
Local: overwrite files to use new mock (cannot think any simpler way than this otherwise yarn start is required to take mock effect)
Instead, this happened:
Works fine in local need it the same solution for docker.
Files being used:
Config.yml
Helper.js
Commands in sequence from batect to app/server/package.json
Batect.yml
Root/package.json
“ performance-test-bff": "yarn workspace server performance-test"
App/server/package.json
i have added one scenario here but actually there are multiple flows in my actual project. I am using same scenario in the same file and using helper.json to update mocks while running perf. This approach works in local but when i run it in jenkins it used docker.
please ignore indentation and spellings . It is just copy pasted and manually entered from mobile 😭😭
Thanks a lot for your help
The text was updated successfully, but these errors were encountered: