jmeter-java-dsl
jmeter-java-dsl copied to clipboard
Add random choice support for WeightedSwitchController
Random Choice - on each iteration plugin will choose a random item. This check box can not guarantee that actual percent of child elements execution will equals with expected (delta in tests not more than 0.5%)
- Added
isRandomChoice()method to DslWeightedSwitchController to enable random selection of child elements - Added test case to verify random choice functionality
weightedSwitchController() .child(weight1, httpSampler(SAMPLE_1_LABEL, wiremockUri)) .children(httpSampler(SAMPLE_2_LABEL, wiremockUri)) .child(weight2, httpSampler(label3, wiremockUri)) .isRandomChoice()