diff --git a/docs/_Sidebar.md b/docs/_Sidebar.md index a31c1581..ef857e08 100644 --- a/docs/_Sidebar.md +++ b/docs/_Sidebar.md @@ -1,11 +1,22 @@ # Overview - - [About KLoadGen](about.md#about-kloadgen) - - [KLoadGen architecture](architecture.md#kloadgen-architecture) + - [About KLoadGen](about.md) + - [KLoadGen architecture](architecture.md) # Getting started - [Prerequisites](getting-started.md#prerequisites) - [Quickstart](getting-started.md#quickstart) + +# [Installation](installation.md) + +# Configuration + - [Producer configuration](producer-configuration.md) + - [Consumer configuration](consumer-configuration.md) + - [Schemas](schemas.md) + +# Knowledge content + - [How to run the plugin](how-to-run.md) + - [Example test plan](example-test-plan.md) # Additional information - - [Overview](additional-information.md#additional-information) - - [Release notes](release-notes.md#release-notes) \ No newline at end of file + - [Overview](additional-information.md) + - [Release notes](release-notes.md) \ No newline at end of file diff --git a/docs/example-test-plan.md b/docs/example-test-plan.md new file mode 100644 index 00000000..727457bd --- /dev/null +++ b/docs/example-test-plan.md @@ -0,0 +1,11 @@ +## Example test plan + +The repository includes a [sample file](https://github.com/corunet/kloadgen/blob/master/Example-Test-Plan.jmx) with an example of a JMeter test plan that uses elements defined in this plugin. + +![Example test plan](images/example-test-plan.png) + +This test plan will only inject messages in a Kafka cluster. + +**Note:** Before executing it, you should add the Schema Registry information in order to retrieve the schema and extract the entity structure. + +> In a future we will include support to read AVRO files. \ No newline at end of file diff --git a/docs/how-to-run.md b/docs/how-to-run.md new file mode 100644 index 00000000..20c7de96 --- /dev/null +++ b/docs/how-to-run.md @@ -0,0 +1,26 @@ +# How to run a test plan + +You can create and run test plans for the consumer side, the producer side or both the consumer and the producer sides of the Kafka messages. + +Here you will see how to create and run a test plan that includes both the producer and the consumer sides of the Kafka messages from JMeter. + +1. Create a new test plan in JMeter. +2. Under **Thread Group**, add a **Java Request** sampler. +3. In **Name**, assign a descriptive name for this sampler. +4. (Optional) You may add any description for the sampler under **Comments**. +5. In the dropdown box, choose **net.coru.kloadgen.sampler.KafkaSchemaSampler**. +6. Provide the corresponding values for this sampler, as explained in [Kafka Producer Sampler configuration](producer-configuration.md#kafka-producer-sampler-configuration). +7. Under **Thread Group**, add the configuration elements for this sampler, as seen in [Kafka producer configuration elements](producer-configuration.md#kafka-producer-configuration-elements). +8. In the value and key schema (file) configuration elements, complete the table with the corresponding information regarding **Field Name**, **Field Type**, **Field Length** and **Field Value List**. + **Note:** The values you include in **Field Values List** will be used by the random tool. Instead of creating random values, it will choose the values randomly between the ones included here. +9. (Optional) You can assign sizes to any map or array field ([10] for arrays, [10:] for maps). +10. If you want to assign a sequence to any field, see [Sequences](producer-configuration.md#sequences). +11. Under **Thread Group**, add a new **Java Request sampler**. +12. In **Name**, assign a descriptive name for this sampler. +13. (Optional) You may add any description for the sampler under **Comments**. +14. In the dropdown box, choose **net.coru.kloadgen.sampler.KafkaConsumerSampler**. +15. Provide the corresponding values for this sampler, as explained in [Kafka Consumer Sampler configuration](producer-configuration.md#kafka-consumer-sampler-configuration). +16. Under **Thread Group**, add the configuration elements for this sampler, as seen in [Kafka consumer configuration elements](producer-configuration.md#kafka-consumer-configuration-elements). +17. Save the test plan. +18. Run the test plan. +19. Check your results. \ No newline at end of file diff --git a/docs/images/example-test-plan.png b/docs/images/example-test-plan.png new file mode 100644 index 00000000..0cf4643d Binary files /dev/null and b/docs/images/example-test-plan.png differ