/jmeter-dsl

Primary LanguageJavaScript

JMeter DSL

Example usage

import com.github.lion7.jmeter.dsl.JMeterDsl.Companion.jMeter
import org.junit.jupiter.api.Test
import java.net.URI

internal class JMeterDslTest {

    @Test
    fun simpleTestPlan() {
        val testPlan = jMeter {
            testPlan {
                threadGroup {
                    mainController {
                        httpSampler("GET", URI("https://www.google.nl/"))
                    }

                    htmlReport {
                        filename = "jmeter-results.csv"
                        outputDirectory = "jmeter-report/"
                    }
                }
            }
        }
        testPlan.run()
    }
}