Is there a way to run a C # program from jmeter?

I have a program I wrote that takes two parameters and sets some files to download, and I want to know if I can run it from Jmeter before making HTTP download requests.

+3


source to share


2 answers


You can use the OS Process Sampler to call .exe

your C # program file .



enter image description here

+3


source


You can run any program using the JSR223 Sampler and Groovy . If you don't want this execution to appear in the .jtl results file, you can use the ie JSR223 PreProcessor instead .

The relevant code would be as simple as:

 "your_command".execute() 

      



If you need the output of the command, you can change it like:

"your_command".execute().text 

      

The approach works on any operating system. See Groovy - This is a New Black article for what else you can do with Groovy.

0


source







All Articles