Skip to content

Repository files navigation

Write Jmeter tests as code.

An API that give access to full Jmeter feature as code, All designed object in GUI can be written as code.

Build & TestAuditCoverageLines of CodeSecurity RatingReliability RatingMaintainability Rating

Maven Centraljavadoc

Where to start

If you are new with Jmeter as code, try examples project and see documentation website.

A basic script example:
TestPlanWrappertestPlan = TestPlanWrapper.builder()
.addThread(ThreadGroupWrapper.builder()
.addSampler(
HTTPSamplerProxyWrapper.builder()
.withName("Home")
.withDomain("https://github.com")
.withProtocol("https")
.withPath("/anasoid")
.build())
.build())
.build();
ApplicationTestapplicationTest = newApplicationTest(testPlanWrapper);
applicationTest.run();
//ORapplicationTest.toJmx(newFile("mytest.jmx"));
A basic script example using template:
TestPlanWrappertestPlan = TestPlanWrapper.builder()
.addThread(ThreadGroupWrapper.builder()
.addSampler(newHomePage())
.build())
.build();
ApplicationTestapplicationTest = newApplicationTest(testPlanWrapper);
applicationTest.run();
//ORapplicationTest.toJmx(newFile("mytest.jmx"));
classHomePageextendsAbstractJmcTemplate<HTTPSamplerProxyWrapper, HTTPSamplerProxyWrapperBuilder<?, ?>> {
@OverrideprotectedvoidprepareBuilder(HTTPSamplerProxyWrapperBuilder<?, ?> builder) {
super.prepareBuilder(builder);
builder.withName("Home")
.withDomain("https://github.com")
.withProtocol("https")
.withPath("/anasoid");
}
@OverrideprotectedJmcWrapperBuilder<?> init() {
returnHTTPSamplerProxyWrapper.builder();
}
}

About

Jmeter as code is the easy way to write jmeter test as code.

Topics

Resources

Code of conduct

Stars

39 stars

Watchers

4 watching

Forks

Releases

Packages

Used by

Contributors

Languages