Skip to content

#6295 Document running Kotlin DSL test plans - #6858

Open
orimarko wants to merge 3 commits into
apache:masterfrom
orimarko:gh6295-kotlin-dsl-example
Open

orimarko wants to merge 3 commits into
apache:masterfrom
orimarko:gh6295-kotlin-dsl-example

Conversation

@orimarko

@orimarko orimarko commented Nov 19, 2026 •

Copy link
Copy Markdown
Contributor

Description

Document how to run a Kotlin DSL test plan

Motivation and Context

Part of #6295

Document how to execute a test plan built with the Kotlin DSL and write
sample results to a JTL file. Add a test that builds and runs a plan,
waits for completion, and checks the generated results.

How Has This Been Tested?

./gradlew :src:components:test --tests "*KotlinDslRunTest"

Types of changes

  • New feature (non-breaking change which adds functionality)

Checklist:

  • My code follows the code style of this project.
  • I have updated the documentation accordingly.

@milamberspace milamberspace left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for working on #6295, documenting how to actually run a DSL-built plan is a real gap in this page.

Main points

  1. The new doc section has no code sample. Every other section of this page comes with a <source> block, and the issue reporter explicitly asked for the equivalent of the Java DSL jtlWriter(...) example. As it stands, readers still have to guess configure / runTest / awaitTermination and how to set the JTL path, which is what the issue complained about. See the inline suggestion.
  2. The test largely duplicates OpenModelThreadGroupConfigElementTest (same plan, same scheduleString, same DebugSampler, same engine/await sequence); only the ResultCollector and the JTL check are new. Its main value would be to guarantee that the documented snippet compiles and runs, so I'd suggest keeping the doc snippet and the test code in sync (same code, same idioms). Alternatively, the JTL assertions could be added to the existing test. The threads.openmodel package is also a slightly odd home for a test whose purpose is the DSL usage example.

Minor

  • The JTL check results.contains("Kotlin DSL sample") passes as soon as a single line is written; asserting 5 data lines (plus header) would verify that all samples were persisted.
  • The blank line that used to separate the two sections ended up inside the new section; there's now no blank line between </section> and <section name="Extending Kotlin DSL">.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants