reporters

Reporters represent measurements about the samplers for testers to analyze.

example - 1:

HTML reporter creates a JMeter html dashboard You can read more about JMeter’s dashboard here

By default, resulting dashboard will be saved at output/html-report-{current-date %m%d%Y%H%M%S}
from pymeter.api.config import TestPlan, ThreadGroupWithRampUpAndHold
from pymeter.api.reporters import HtmlReporter
from pymeter.api.samplers import HttpSampler


http_sampler = HttpSampler("Echo", "https://postman-echo.com/get?var=1")
thread_group = ThreadGroupWithRampUpAndHold(2, 1, 2, http_sampler)
html_reporter = HtmlReporter()
test_plan = TestPlan(thread_group, html_reporter)
test_plan.run()

example - 2:

You can override the directory in the object’s constructor.

By default, resulting dashboard will be saved at output/html-report-{current-date %m%d%Y%H%M%S}
html_reporter = HtmlReporter("somefolder")
class pymeter.api.reporters.HtmlReporter(directory=None)

Bases: BaseReporter

Reports results to HTML format

Parameters:

directory (Optional[str]) –