use of org.apache.jmeter.reporters.ResultCollector in project jmeter by apache.
the class AbstractVisualizer method configure.
/* Overrides AbstractJMeterGuiComponent.configure(TestElement) */
@Override
public void configure(TestElement el) {
super.configure(el);
setFile(el.getPropertyAsString(ResultCollector.FILENAME));
ResultCollector rc = (ResultCollector) el;
errorLogging.setSelected(rc.isErrorLogging());
successOnlyLogging.setSelected(rc.isSuccessOnlyLogging());
if (collector == null) {
collector = new ResultCollector();
}
collector.setSaveConfig((SampleSaveConfiguration) rc.getSaveConfig().clone());
}
use of org.apache.jmeter.reporters.ResultCollector in project jmeter by apache.
the class PreCompiler method addNode.
/** {@inheritDoc} */
@Override
public void addNode(Object node, HashTree subTree) {
if (isRemote && node instanceof ResultCollector) {
try {
replacer.replaceValues((TestElement) node);
} catch (InvalidVariableException e) {
log.error("invalid variables", e);
}
}
if (isRemote) {
return;
}
if (node instanceof TestElement) {
try {
replacer.replaceValues((TestElement) node);
} catch (InvalidVariableException e) {
log.error("invalid variables", e);
}
}
if (node instanceof TestPlan) {
//A hack to make user-defined variables in the testplan element more dynamic
((TestPlan) node).prepareForPreCompile();
Map<String, String> args = ((TestPlan) node).getUserDefinedVariables();
replacer.setUserDefinedVariables(args);
JMeterVariables vars = new JMeterVariables();
vars.putAll(args);
JMeterContextService.getContext().setVariables(vars);
}
if (node instanceof Arguments) {
((Arguments) node).setRunningVersion(true);
Map<String, String> args = ((Arguments) node).getArgumentsAsMap();
replacer.addVariables(args);
JMeterContextService.getContext().getVariables().putAll(args);
}
}
use of org.apache.jmeter.reporters.ResultCollector in project jmeter by apache.
the class MailerVisualizer method createTestElement.
/**
* Makes MailerVisualizer storable.
*/
@Override
public TestElement createTestElement() {
ResultCollector model = getModel();
if (model == null) {
model = new MailerResultCollector();
setModel(model);
}
modifyTestElement(model);
return model;
}
Aggregations