简体   繁体   English

jmeter-使用jmeter api 2.11生成jmx文件

[英]jmeter - generate jmx file using jmeter api 2.11

I am trying to build a java app that would read some access files and dynamicaly create some load and/or functional test scenarios. 我正在尝试构建一个Java应用程序,该应用程序将读取一些访问文件并动态创建一些负载和/或功能测试方案。 I am using the jmeter API 2.11. 我正在使用jmeter API 2.11。

The application would run within a CI (jenkins). 该应用程序将在CI(詹金斯)中运行。 Now, I have heard of some Jenkins Plugin for jmeter that executes some predefined test and eventually produces a user friendly graphical report, I didn't get that far though. 现在,我听说了一些用于jmeter的Jenkins插件,该插件执行一些预定义的测试并最终生成一个用户友好的图形报告,但是我的理解还不很广。 First of all I was able to programm a pretty simple test with httpSampler and just one thread/loop. 首先,我能够使用httpSampler和一个线程/循环编程一个非常简单的测试。 I could run it within the application using StandardJMeterEngine functionality configure() & run(). 我可以使用StandardJMeterEngine功能configure()和run()在应用程序中运行它。

Instead, I would like to generate an output jmx file for each test plan so I could use it as an input for the CI test execution/reporting part. 相反,我想为每个测试计划生成一个输出jmx文件,以便可以将其用作CI测试执行/报告部分的输入。

I have found a class org.apache.jmeter.protocol.http.util.accesslog.StandardGenerator that would eventually take over the task. 我发现了一个类org.apache.jmeter.protocol.http.util.accesslog.StandardGenerator最终可以接管任务。 Does anyone had a simmilar task/problem and knows the best approach here? 有没有人有类似的任务/问题,并且知道这里的最佳方法? I would really appreciate any answer. 我真的很感谢任何答案。 Best Redards m. 最佳红葡萄酒m。

我相信您正在寻找不使用JMeter GUI指南就启动JMeter测试的5种方法 ,它包含Jenkins性能插件的链接以及有关如何从.jmx文件调用现有JMeter测试的端到端说明,以及使用JMeter API创建一个新的。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM