Logging (JEP158) reporter for loadtest4j.
Add this library to your project's pom.xml
:
<dependency>
<groupId>org.loadtest4j.reporters</groupId>
<artifactId>loadtest4j-logger</artifactId>
<scope>test</scope>
</dependency>
Note: Reporters reference the core loadtest4j library in provided
scope. All standard Drivers will provide it automatically. If you are not using a standard Driver, you must add org.loadtest4j:loadtest4j
to your pom.xml
.
<dependencies>
<dependency>
<groupId>org.loadtest4j.drivers</groupId>
<artifactId>loadtest4j-[driver]</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.loadtest4j.reporters</groupId>
<artifactId>loadtest4j-logger</artifactId>
<scope>test</scope>
</dependency>
</dependencies>
Attach the reporter using the LoadTesterDecorator
, or any other method that suits you.
public class PetStoreLT {
private static final LoadTester loadTester = new LoadTesterDecorator()
.add(new ResultLogger())
.decorate(LoadTesterFactory.getLoadTester());
@Test
public void shouldFindPets() {
// ...
}
}