2020-07-16 06:23:41 +02:00
|
|
|
module.exports = { createTestMessageObject };
|
|
|
|
|
|
|
|
function createTestMessageObject(userContext, events, done) {
|
|
|
|
const randomNumber = Math.floor((Math.random() * 10) + 1);
|
|
|
|
const author = "load-test-user-" + randomNumber
|
|
|
|
const data = {
|
|
|
|
author: author,
|
|
|
|
body: "Test 12345. " + randomNumber,
|
2021-02-27 07:14:08 +01:00
|
|
|
type: "CHAT"
|
2020-07-16 06:23:41 +02:00
|
|
|
};
|
|
|
|
// set the "data" variable for the virtual user to use in the subsequent action
|
|
|
|
userContext.vars.data = data;
|
|
|
|
return done();
|
|
|
|
}
|