An API that give access to full Jmeter feature as code, All designed object in GUI can be written as code.
If you are new with Jmeter as code, try examples project and see documentation website.
TestPlanWrapper testPlan = TestPlanWrapper.builder()
.addThread(ThreadGroupWrapper.builder()
.addSampler(
HTTPSamplerProxyWrapper.builder()
.withName("Home")
.withDomain("https://github.com")
.withProtocol("https")
.withPath("/anasoid")
.build())
.build())
.build();
ApplicationTest applicationTest = new ApplicationTest(testPlanWrapper);
applicationTest.run();
//OR
applicationTest.toJmx(new File("mytest.jmx"));
TestPlanWrapper testPlan = TestPlanWrapper.builder()
.addThread(ThreadGroupWrapper.builder()
.addSampler(new HomePage())
.build())
.build();
ApplicationTest applicationTest = new ApplicationTest(testPlanWrapper);
applicationTest.run();
//OR
applicationTest.toJmx(new File("mytest.jmx"));
class HomePage extends
AbstractJmcTemplate<HTTPSamplerProxyWrapper, HTTPSamplerProxyWrapperBuilder<?, ?>> {
@Override
protected void prepareBuilder(HTTPSamplerProxyWrapperBuilder<?, ?> builder) {
super.prepareBuilder(builder);
builder.withName("Home")
.withDomain("https://github.com")
.withProtocol("https")
.withPath("/anasoid");
}
@Override
protected JmcWrapperBuilder<?> init() {
return HTTPSamplerProxyWrapper.builder();
}
}