RemoteJMeterEngineImpl类

RemoteJMeterEngineImpl类

议程-从本地Java类调用远程区域的JMeter

我发现RemoteJMeterEngineImpl类有助于调用远程区域的JMeter

 问题-由于私有构造函数,无法创建RemoteJMeterEngineImpl类的实例

如果有人知道如何玩RemoteJMeterEngineImpl类,请提供帮助

最佳答案

您正在做的事情很奇怪,而且绝对不受支持。通常,您应该启动并运行远程从站,如果您需要以编程方式启动测试,我相信您可以使用DistributedRunner class

示例代码:

List<JMeterEngine> engines = new LinkedList<>();
Properties remoteProps = new Properties();
//set properties you want to send to remote clients here
DistributedRunner distributedRunner=new DistributedRunner(remoteProps);

List<String> hosts = new LinkedList<>();
//add your JMeter slaves here
hosts.add("remote_host_1");
hosts.add("remote_host_2");
distributedRunner.setStdout(System.out);
distributedRunner.setStdErr(System.err);
distributedRunner.init(hosts, testPlanTree);
engines.addAll(distributedRunner.getEngines());
distributedRunner.start();


请参阅Five Ways To Launch a JMeter Test without Using the JMeter GUI文章和jmeter-from-code示例项目,以了解有关JMeter测试的编程创建和执行的更多信息。

关于java - Jmeter中的RemoteJMeterEngineImpl类,如何创建实例并调用rconfigure,我们在Stack Overflow上找到一个类似的问题:https://stackoverflow.com/questions/44826203/

10-08 22:52