com.lazerycode.jmeter.configuration.RemoteArgumentsArrayBuilder Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of jmeter-maven-plugin Show documentation
Show all versions of jmeter-maven-plugin Show documentation
A plugin to allow you to run JMeter tests with Maven.
package com.lazerycode.jmeter.configuration;
import com.lazerycode.jmeter.properties.ConfigurationFiles;
import com.lazerycode.jmeter.properties.PropertiesMapping;
import java.util.ArrayList;
import java.util.List;
import java.util.Map;
import java.util.Map.Entry;
import java.util.Properties;
public class RemoteArgumentsArrayBuilder {
/**
* Make constructor private as this is a non-instantiable helper classes
*/
RemoteArgumentsArrayBuilder() throws InstantiationError {
throw new InstantiationError("This class is non-instantiable.");
}
public static List buildRemoteArgumentsArray(Map propertiesMap) {
List result = new ArrayList<>();
for (Entry entry : propertiesMap.entrySet()) {
Properties properties = entry.getValue().getPropertiesFile().getProperties();
switch (entry.getKey()) {
case SYSTEM_PROPERTIES:
result.addAll(buildTypedPropertiesForContainer(JMeterCommandLineArguments.SYSTEM_PROPERTY, properties));
break;
case GLOBAL_PROPERTIES:
result.addAll(buildTypedPropertiesForContainer(JMeterCommandLineArguments.JMETER_GLOBAL_PROP, properties));
break;
default:
break;
}
}
return result;
}
private static List buildTypedPropertiesForContainer(JMeterCommandLineArguments cmdLineArg, Properties props) {
List result = new ArrayList<>();
for (Entry
© 2015 - 2025 Weber Informatics LLC | Privacy Policy