Is there a good approach to test upload files (form-data) with artillery? The http-file-uploads plugin inly works with Artillery Pro. I tried the solution given in this thread https://github.com/artilleryio/artillery/issues/320 writing a beforeRequest Js method, but no success.
const formData = {
fileOCR: fs.createReadStream(__dirname + '/files/ocr.png'),
};
requestParams.formData = Object.assign({}, requestParams.formData, formData);
return next();
}
My field in form-data for the file is called 'file'
Based on the previous answer, this worked for me:
then the yaml.