Reputation: 663
I have a program I wrote that gets two parameters and set some files to be upload, and I want to know if I can run it from Jmeter before performing the HTTP upload requests.
Upvotes: 4
Views: 810
Reputation: 168072
You can execute any program using JSR223 Sampler and Groovy language. If you don't want this execution to appear in the .jtl results file you can use i.e. JSR223 PreProcessor instead.
The relevant code will be as simple as:
"your_command".execute()
If you need the command output, you can amend it as:
"your_command".execute().text
The approach works on any operating system. See Groovy is the New Black article to learn what else could be done with Groovy.
Upvotes: 0
Reputation: 4358
You can use OS Process Sampler to invoke the .exe
file of your C# program.
Upvotes: 4