API for generating Jmeter test plans?

一个人想着一个人 提交于 2019-12-08 03:38:21

问题


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.


回答1:


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




回答2:


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.



来源:https://stackoverflow.com/questions/17020274/api-for-generating-jmeter-test-plans

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!