2

i have a javascript code written in node.js (VS Code), how to place it in jsr223 post processer.

Narendra Sai
  • 57
  • 1
  • 7
  • can i add some node.js jar in lib/ext and run the script, please share links to jar files. @Blazemeter are you planning on some code convertors like beanshell to groovy or javascript to groovy – Narendra Sai Jul 30 '19 at 10:39

1 Answers1

2

Java and Node.js are different beasts and cannot be easily integrated.

The options are in:

  1. Execute your Node.js scripts using OS Process Sampler like you would do from a terminal/command prompt
  2. Re-write your Node.js code in Groovy as it's the only recommended scripting language for JMeter as of now
  3. Consider using J2V8 for your code invocation if it's complex and either cannot be easily converted to Groovy or suitable for command-line execution.
Dmitri T
  • 159,985
  • 5
  • 83
  • 133