API for generating Jmeter test plans?

2019-06-03 07:23发布

I would like to programmatically generate basic Jmeter test plans from a dynamic set of URLs and form data (not using the Jmeter GUI manually). Can I use the Jmeter API to do this?
Is it already explained somewhere?
I just need point to start from.

Of course I could reverse engineer the test plan XML format and then write my own custom test plan generator, but that's error prone and whenever the format changes my generator needs to be updated.

2条回答
虎瘦雄心在
2楼-- · 2019-06-03 07:40

From what you explain, have a look at CSV DataSet which will read urls from csv file.

This component will Iterate on file and put one line in a set of variables, in your case 1 varirable called "URL" for example.

Then you can use ${URL} in HTTP Sampler and set number of iterations and threads in Thread Group to loop and put the load on different urls.

Use hc31impl or java impl if you hit different hosts.

查看更多
劳资没心,怎么记你
3楼-- · 2019-06-03 07:53

you could also look at gridinit-dsl language for jmeter. It uses ruby to generate the xml.

查看更多
登录 后发表回答