Skip to content

Latest commit

 

History

History
33 lines (27 loc) · 782 Bytes

README.md

File metadata and controls

33 lines (27 loc) · 782 Bytes

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()
    }
}