Skip to content

Commit

Permalink
Merge pull request #4 from infracloudio/jmeterd-readme
Browse files Browse the repository at this point in the history
Update README file for Jmeterd
  • Loading branch information
parauliya authored Sep 12, 2023
2 parents afccd30 + 8c38ea7 commit 79225ea
Showing 1 changed file with 45 additions and 4 deletions.
49 changes: 45 additions & 4 deletions contrib/executor/jmeterd/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,19 +4,20 @@
[![Go Reference](https://pkg.go.dev/badge/github.com/kubeshop/testkube-executor-jmeter.svg)](https://pkg.go.dev/github.com/kubeshop/testkube-executor-jmeter)
[![License](https://img.shields.io/github/license/kubeshop/testkube-executor-jmeter)]()

# JMeter Executor
# Distributed JMeter Executor
An extension of Jmeter Executor which can run the Jmeter Tests in distributed environment.

## What is an Executor?

Executor is nothing more than a program wrapped into Docker container which gets JSON (testube.Execution) OpenAPI based document as an input and returns a stream of JSON output lines (testkube.ExecutorOutput),
where each output line is simply wrapped in this JSON, similar to the structured logging idea.


## Intro

It's basic JMeter executor able to run simple JMeter scenarios writer in JMX format.
It's basic Distributed JMeter executor which is able to run simple JMeter scenarios in distributed environments.
Please define your JMeter file as file (string, or git file).

Project directory is not implemented yet.

## Plugins

Expand Down Expand Up @@ -129,8 +130,48 @@ Testkube should now use the new image for the Executor and you can schedule a Te

1. **MASTER_OVERRIDE_JVM_ARGS / SLAVES_OVERRIDE_JVM_ARGS**: Used to override default memory options for JMeter master/slaves. Example: `MASTER_OVERRIDE_JVM_ARGS=-Xmn256m -Xms512m -Xmx512m`.

2. **SLAVES_COUNT**: Specifies the number of slaves required for distributed JMeter tests. Example: `SLAVES_COUNT=3`.
2. **SLAVES_COUNT**: Specifies the number of slave pods required for Distributed JMeter tests. Example: `SLAVES_COUNT=3`. Default value of `SLAVES_COUNT` is 1.

3. **MASTER_ADDITIONAL_JVM_ARGS / SLAVES_ADDITIONAL_JMETER_ARGS**: Allows exporting additional JVM arguments for slaves/master. Example: `MASTER_ADDITIONAL_JVM_ARGS=-Xmx1024m -Xms512m -XX:MaxMetaspaceSize=256m`.

4. **SLAVES_ADDITIONAL_JMETER_ARGS**: Provides additional JVM arguments for JMeter server / slaves. Example: `SLAVES_ADDITIONAL_JMETER_ARGS=jmeter-server -Jserver.rmi.ssl.disable=true -Dserver_port=60000`.


Below guide will provide you the details about how to run a Jmeter test in distributed environment.

1. File option:

When you provide a test (.jmx) file to `Distributed JMeter ( Jmeter in distributed environment )`, the executor of `Distributed JMeter` will spawn number of slaves pods specified by user through `SLAVES_COUNT` environment variable as desribed above and run the test on all the slave pods.

2. Git Option:
Using Git flow of the executor we can have following benifits of `Distributed JMeter` executor which is not possible with JMeter executor:

- Additional file required by a particular test like a CSV or JSON file can be provided through git repo.
There is an example of using a CSV file by test (.jmx) file in the `example` folder of `Distributed JMeter`.
- Dynamic plugins required for a test by keeping the plugins inside the test folder in a directory named as `plugins` in the git repo.
- Custom values of the paramters present in `user.properties` can be provided by using custom `user.properties` file in the git repo.


For using the Git option and to avail all the above features, user should have the following directory structure in the git repo:

```
github.com/`<username>/<reponame>`/---
|-test1/---
|- testfile1.jmx
|- userdata.csv ( or any other additional file )
|- user.properties
|- plugins/---
|- plugin-manager.jar
|- <jar file of any other required plugins to run test1>
|-test2/---
|- testfile2.jmx
|- userdata.json ( or any other additional file )
|- user.properties
|- plugins/---
|- plugin-manager.jar
|- <jar file of any other required plugins to run test2>
```

0 comments on commit 79225ea

Please sign in to comment.