Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
1.1k views
in Technique[技术] by (71.8m points)

jmeter - Running Multiple execution of Executable with parameterized command via Jemeter

All, i would like some help in resolving this issue.

PROBLEM : NEED The ability to run console APP to be processed but without waiting for that one to finish, execute the others based on number of threads to be run as well as time wait

For example:

Application description: someApp.exe - This app calls with Parameter- Example someApp.exe -I someinputfile -d typeofserveice -r -i <some_input.json> -w This will connect to the service and post it to the service and wait for a response in set amount of wait time before timing out.

What I want to do:

1 Request 5 Request - simultaneous - want the ability to control this say every 15 second spawn that request until you get to 5 concurrent request 8, 16 etc

I don’t want to wait for one request to complete before trying the next request….

I started with OS Process Sampler

Problem here is two folds:

  1. I can’t change the Request ID in the batch file
  2. It is waiting for one Request to finish

What I tried

Multiple Thread Group with same command….. Different batch file for each……

enter image description here

Is it possible to use Beanshell or instead of Running Batch I can pass the same command that is in the batch file via OS PROCESS SAMPLE which I can control the variable names such as requestID etc….

cd C:PFG_CLIENT_APPSOMECLIENTAPPNAMEDebug ClientApp.exe -d appigee -r 61129361 -i test_svc_input.json -w 700

-r

question from:https://stackoverflow.com/questions/65939987/running-multiple-execution-of-executable-with-parameterized-command-via-jemeter

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)

I fail to see how these questions are connected to JMeter, it's all about Windows, command prompt and batch files.

  1. I can’t change the Request ID in the batch file - you don't need to, just replace this 61129361 with %1 in the batch file and you will be able to pass it as a parameter

    enter image description here

  2. It is waiting for one Request to finish You can amend your command to contain START /W, in this case it will start your batch file in a new window and wait for its termination. To suppress waiting on JMeter side you can set the timeout to a low value like 1 second (or whatever time it takes for your script/program to start)

    enter image description here

    The timeout will cause the sampler to fail, if you would rather like to have it as passed - add a Response Assertion as a child of this request and configure it like:

    enter image description here

More information: How to Run External Commands and Programs Locally and Remotely from JMeter


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...