1

I have written a java client server application (not http), which i need to load test. However, most tools out there such as jmeter and grinder seem to be targeted to http requests. Any suggestions?

Thanks!

4 Answers 4

1

JMeter allows writing pluginns. If your application uses protocol other than HTTP it seems that the protocol is proprietary, so writing tests requires some custom implementation anyway. JMeter allows this and it is highly recommended.

Sign up to request clarification or add additional context in comments.

Comments

0

since we have no idea what protocol you're using, write your own client in a way easily extendable for load testing.

Comments

0

You could have a look at Soatest which claims to be socket based and should be able to use whichever web protocol you are using (hopefully TCP/UDP).

Comments

0

You can use the JUnit4 or JUnit5 based load runners below which can simply accept your Unit tests and generate load on the target server. These need not be HTTP tests, these could be any tests annotated with @Test

The load configs look like below to ramp up or ramp down your load:

number.of.threads=2
ramp.up.period.in.seconds=10
loop.count=1

Your load test will look like below:

@LoadWith("our_load_config.properties")
@TestMapping(testClass = AnyTestEndPoint.class, testMethod = "anyTestMethod")
@RunWith(ZeroCodeLoadRunner.class)
public class LoadTest {

}

Your JUnit test which is fed to the load generator, The test class looks like below:

import org.junit.Test;

public class AnyTestEndPoint {

    @Test
    public void anyTestMethod() throws Exception {
       ...
       // You can have your client code invoking the target server
       ...
    }
}

Note: You can feed multiple Junit tests too to the load reactor, to generate load on different part of the server logic/apis/processes.

Visit the HelloWorld Examples for more details.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.