Open exodia0x opened 1 year ago
@exodia0x This looks like a good use case for processor: extract the bulk of scenario logic from YAML to a JS file, which can be used to construct complicated scenarios or 'chain' multiple scenarios together into one. Hopefully this is helpful.
Example YAML:
config:
target: https://example.com
phases:
- duration: 600
arrivalRate: 10
processor: "./myfilename.js"
scenarios:
- name: "HTTP Request and WebSocket Connection"
flow:
- function: "exportedJSFunction"
Example JS:
const io = require('socket.io-client');
const fetch = require('node-fetch');
module.exports = {exportedJSFunction: async function(context, events, done) {
// WebSocket + HTTP logic for YAML scenario
// Can have multiple HTTP requests etc.
}
};
Hello, I want to config yaml for multiple target Ex. I gonna GET Websocket url in Domain 1 and capture URL list as variable and next scenario connect websocket with target that Get form Domain 1.
Example Code.
Did you guys have any for config and setup it ?