0
votes

In my java application there are multiple maven project use and they are dependent on each other. In that 10 thread are run at one time to create a 10 tour plan (one day trip to visit shopkeeper) and other threads are in queue after complete one of the thread execution the waited threads get change. I want to test the load testing of my application whether all thread are working fine or not. I don't know whether it is possible with JMeter or not. If possible then how to execute my application through JMeter.

Please some one suggest me whether my application testing is possible with JMeter, if no then is there any alternative

2

2 Answers

1
votes

JMeter is a load testing tool, which works at protocol layer. It mainly supports Web Applications which uses HTTP/HTTPS protocols, irrespective of the technology used to build the applications such as Java, NodeJS, PHP, ASP.NET etc. JMeter also supports various other protocols such as FTP, SMTP, SOAP / REST Webservices, Database via JDBC, LDAP, TCP, Java Objects etc.


Related to thread simulations for your scenario, use Thread Group where you define number fo threads to run the scripted requests (At protocol layer). If single Thread is not sufficient, you use multiple Thread Groups and run them sequentially (complete one thread group and then only run the second thread group as it depends on the first thread group) or parallelly based on your needs.

References:

  1. http://jmeter.apache.org/
  2. http://jmeter.apache.org/usermanual/component_reference.html
  3. http://jmeter.apache.org/usermanual/get-started.html
0
votes

In general, you do Performance/Load Testing using JMeter. The project/applications that you can test are generally web based (http/https), but there are other protocols available like FTP, REST / SOAP, JDBC, LDAP, JMS, POP3, SMTP, IMAP, TCP, Shell scripts, Java objects etc. Reference link

If you have 10 threads but only one thread is working at a time, then, it will not fall under the category of load testing because you are not really generating load. The good part is you can still test the logic/functionality with JMeter as you can do functional testing using JMeter using assertions.

In your case, the project is a web based application or it's a desktop application with a logic implemented with threads? If it's a web application then you can simply create a HTTP sampler (in JMeter) of the request that triggers the respective thread and it can easily be tested. There are a lot of tutorial on this topic.

But, if you want to specifically want to test a specific Java class, it can be done using "Java Request" sampler. This sampler lets you control a java class that implements the org.apache.jmeter.protocol.java.sampler.JavaSamplerClient interface. Reference link