tilln / jmeter-iso8583

ISO8583 Plugin for JMeter
MIT License
62 stars 32 forks source link

Using single jmeter instance to generate request and response #82

Closed mehrdad2000 closed 3 months ago

mehrdad2000 commented 3 months ago

Hi Is it possible to create message and send, then generate response with single jmeter instance (play role of client and server)? E.x. First start server then listen to port 8000 then client start to send requests.

Any idea? Thanks

tilln commented 3 months ago

First of all we should clarify what you mean by client and server:

This plugin support multiple "ISO8583 Connection Configuration" elements, though each ISO8583 Sampler can only be assigned to one of those Config elements. You may be aware of the Request Listener feature where you can specify a Groovy script to respond for incoming messages (incoming to JMeter, from remote test system).

mehrdad2000 commented 3 months ago

@tilln if add two "ISO8583 Connection Configuration" first as server second as client, and start stuck at first one? And run second one after timeout? Or run both them parallel?

Is server stop client request does not get response.

Thanks

tilln commented 3 months ago

The server waits for an incoming connection for a configurable amount of time. If that's "stuck" there may be no connection attempt from your test system. Once the connection is established, they will run in parallel.

mehrdad2000 commented 3 months ago

In the time the server waits, what happened? Client start? Or wait till first ISO8583 Connection Configuration finished?

FYI: both are in single host, single jmeter

tilln commented 3 months ago

It depends on the order of your two config elements. Both are started sequentially before the threads are started that run the test.

mehrdad2000 commented 3 months ago

@tilln if order of configs are like this it will work? 1-Start server, 2-start client FYI: in single thread

tilln commented 3 months ago

order of configs

It shouldn't matter in what order the config elements appear, as they are all initialized before the Thread Groups are started i.e. before any JMeter thread will send samples, including your "client" sampler (presumably; you have not made your test setup very clear).

FYI: in single thread

Not sure what you mean. The configs are traversed by a single thread, but that has nothing to do with the JMeter threads running the test.

mehrdad2000 commented 3 months ago

@tilln is there any sample to generate request 100 and response 110? in single jmeter?

tilln commented 3 months ago

@mehrdad2000 Not sure I understand what you are trying to do. You mean you want your script to generate a 0100 message (via an ISO8583 Sampler) and also generate the 0110 response to the same message (via a Request Listener script in an ISO8583 Connection Configuration)? That does not make much sense to me. Please elaborate.

mehrdad2000 commented 3 months ago

@tilln exactly something like this: https://github.com/adelbs/ISO8583

tilln commented 3 months ago

@mehrdad2000 I don't know exactly what that tool does. So please try to answer my question.

mehrdad2000 commented 3 months ago

@tilln request and response generate on same machine. looking for sample that do this via an ISO8583 Sampler.

tilln commented 3 months ago

You mean you want your script to generate a 0100 message (via an ISO8583 Sampler) and also generate the 0110 response to the same message (via a Request Listener script in an ISO8583 Connection Configuration)?

mehrdad2000 commented 3 months ago

1-request 0100 generate by an ISO8583 Sampler. 2-response 0110 if it is possible (generate by an ISO8583 Sampler) if not by script.

tilln commented 3 months ago

I fail to understand whether you want to respond to the 0100 message from your first step, like a loop-back setup.

mehrdad2000 commented 3 months ago

@tilln yes

tilln commented 3 months ago

I see. Perhaps have a look at the sample attached here?

mehrdad2000 commented 3 months ago

That's exactly what I want. Thanks