use of kg.apc.jmeter.vizualizers.CorrectedResultCollector in project jmeter-plugins by undera.
the class MergeResultsServiceTest method testMergeSamples_emptyFilename.
@Test
public void testMergeSamples_emptyFilename() throws Exception {
CorrectedResultCollector crc = new CorrectedResultCollector();
crc.getSaveConfig().setAsXml(false);
crc.setFilename("");
MergeResultsService instance = new MergeResultsService();
instance.mergeSamples(crc, SAMPLES);
}
use of kg.apc.jmeter.vizualizers.CorrectedResultCollector in project jmeter-plugins by undera.
the class PageDataExtractorOverTimeGui method configure.
@Override
public void configure(TestElement te) {
super.configure(te);
CorrectedResultCollector rc = (CorrectedResultCollector) te;
JMeterProperty regexpValues = rc.getProperty(REGEXPS_PROPERTY);
if (!(regexpValues instanceof NullProperty)) {
JMeterPluginsUtils.collectionPropertyToTableModelRows((CollectionProperty) regexpValues, tableModel, columnClasses);
regExps = (CollectionProperty) regexpValues;
} else {
log.warn("Received null property instead of collection");
}
}
use of kg.apc.jmeter.vizualizers.CorrectedResultCollector in project jmeter-plugins by undera.
the class PageDataExtractorOverTimeGui method modifyTestElement.
@Override
public void modifyTestElement(TestElement te) {
super.modifyTestElement(te);
if (grid.isEditing()) {
grid.getCellEditor().stopCellEditing();
}
if (te instanceof CorrectedResultCollector) {
CorrectedResultCollector rc = (CorrectedResultCollector) te;
CollectionProperty rows = JMeterPluginsUtils.tableModelRowsToCollectionProperty(tableModel, REGEXPS_PROPERTY);
rc.setProperty(rows);
}
}
use of kg.apc.jmeter.vizualizers.CorrectedResultCollector in project jmeter-plugins by undera.
the class PluginsCMDWorker method doJob.
public int doJob() {
checkParams();
AbstractGraphPanelVisualizer pluginInstance = pluginType;
pluginType.setIgnoreCurrentTestStartTime();
setOptions(pluginInstance);
CorrectedResultCollector rc;
rc = (CorrectedResultCollector) pluginInstance.createTestElement();
rc.setExcludeLabels(excludeLabels);
rc.setIncludeLabels(includeLabels);
rc.setStartOffset(startOffset);
rc.setEndOffset(endOffset);
if (includeSamplesWithRegex >= 0) {
rc.setEnabledIncludeRegex(includeSamplesWithRegex != 0);
}
if (excludeSamplesWithRegex >= 0) {
rc.setEnabledExcludeRegex(excludeSamplesWithRegex != 0);
}
if (successFilter >= 0) {
rc.setErrorLogging(successFilter == 0);
rc.setSuccessOnlyLogging(successFilter != 0);
}
if (pluginType.getStaticLabel().equals(JMeterPluginsUtils.prefixLabel("Merge Results"))) {
mergeResults(pluginInstance, rc);
} else {
log.debug("Using JTL file: " + inputFile);
rc.setFilename(inputFile);
rc.setListener(pluginInstance);
pluginInstance.configure(rc);
// rc.testStarted();
rc.loadExistingFile();
// rc.testEnded();
}
// to handle issue 64 and since it must be cheap - set options again
setOptions(pluginInstance);
if ((exportMode & EXPORT_PNG) == EXPORT_PNG) {
File pngFile = new File(outputPNG);
forceDir(pngFile);
try {
pluginInstance.getGraphPanelChart().saveGraphToPNG(pngFile, graphWidth, graphHeight);
} catch (IOException ex) {
throw new RuntimeException(ex);
}
}
if ((exportMode & EXPORT_CSV) == EXPORT_CSV) {
File csvFile = new File(outputCSV);
forceDir(csvFile);
try {
pluginInstance.getGraphPanelChart().saveGraphToCSV(csvFile);
} catch (IOException ex) {
throw new RuntimeException(ex);
}
}
return 0;
}
use of kg.apc.jmeter.vizualizers.CorrectedResultCollector in project jmeter-plugins by undera.
the class AbstractGraphPanelVisualizerTest method testIncludeExcludeRegex_exclude_only.
@Test
public void testIncludeExcludeRegex_exclude_only() {
CorrectedResultCollector instance = new CorrectedResultCollector();
instance.setProperty(CorrectedResultCollector.EXCLUDE_SAMPLE_LABELS, "P[0-9].*");
instance.setProperty(CorrectedResultCollector.EXCLUDE_REGEX_CHECKBOX_STATE, true);
instance.testStarted();
DebugVisualizer vis = new DebugVisualizer();
instance.setListener(vis);
vis.configure(instance);
vis.lastLabel = null;
SampleResult res = new SampleResult();
res.setSampleLabel("P1_TEST");
instance.sampleOccurred(new SampleEvent(res, "tg"));
assertNull(vis.lastLabel);
vis.lastLabel = null;
SampleResult res1 = new SampleResult();
res1.setSampleLabel("T1_TEST");
instance.sampleOccurred(new SampleEvent(res1, "tg"));
assertEquals("T1_TEST", vis.lastLabel);
}
Aggregations