Repository navigation
Conversation
milamberspace
left a comment
Contributor
There was a problem hiding this comment.
Thanks for working on #6295, documenting how to actually run a DSL-built plan is a real gap in this page.
Main points
- 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 DSLjtlWriter(...)example. As it stands, readers still have to guessconfigure/runTest/awaitTerminationand how to set the JTL path, which is what the issue complained about. See the inline suggestion. - The test largely duplicates
OpenModelThreadGroupConfigElementTest(same plan, samescheduleString, sameDebugSampler, same engine/await sequence); only theResultCollectorand 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. Thethreads.openmodelpackage 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">.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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
Checklist: