diff --git a/performance/processor.js b/performance/processor.js new file mode 100644 index 0000000..42331fd --- /dev/null +++ b/performance/processor.js @@ -0,0 +1,13 @@ +const moviesData = require('../tmdb_movies.json'); + +function myBeforeScenarioHandler(context, ee, next) { + const randomMovie = moviesData[Math.floor(Math.random() * moviesData.length)]; + + context.vars.movieId = randomMovie.id; + + next(); +}; + +module.exports = { + myBeforeScenarioHandler +} \ No newline at end of file