Search in sources :

Example 1 with AbstractTestElement

use of org.apache.jmeter.testelement.AbstractTestElement in project jmeter by apache.

the class HttpDefaultsGui method configure.

@Override
public void configure(TestElement el) {
    super.configure(el);
    AbstractTestElement samplerBase = (AbstractTestElement) el;
    urlConfigGui.configure(el);
    retrieveEmbeddedResources.setSelected(samplerBase.getPropertyAsBoolean(HTTPSamplerBase.IMAGE_PARSER));
    concurrentDwn.setSelected(samplerBase.getPropertyAsBoolean(HTTPSamplerBase.CONCURRENT_DWN));
    concurrentPool.setText(samplerBase.getPropertyAsString(HTTPSamplerBase.CONCURRENT_POOL));
    useMD5.setSelected(samplerBase.getPropertyAsBoolean(HTTPSamplerBase.MD5, false));
    //$NON-NLS-1$
    embeddedRE.setText(samplerBase.getPropertyAsString(HTTPSamplerBase.EMBEDDED_URL_RE, ""));
    //$NON-NLS-1$
    sourceIpAddr.setText(samplerBase.getPropertyAsString(HTTPSamplerBase.IP_SOURCE));
    sourceIpType.setSelectedIndex(samplerBase.getPropertyAsInt(HTTPSamplerBase.IP_SOURCE_TYPE, HTTPSamplerBase.SOURCE_TYPE_DEFAULT));
    proxyHost.setText(samplerBase.getPropertyAsString(HTTPSamplerBase.PROXYHOST));
    proxyPort.setText(samplerBase.getPropertyAsString(HTTPSamplerBase.PROXYPORT));
    proxyUser.setText(samplerBase.getPropertyAsString(HTTPSamplerBase.PROXYUSER));
    proxyPass.setText(samplerBase.getPropertyAsString(HTTPSamplerBase.PROXYPASS));
    httpImplementation.setSelectedItem(samplerBase.getPropertyAsString(HTTPSamplerBase.IMPLEMENTATION));
    connectTimeOut.setText(samplerBase.getPropertyAsString(HTTPSamplerBase.CONNECT_TIMEOUT));
    responseTimeOut.setText(samplerBase.getPropertyAsString(HTTPSamplerBase.RESPONSE_TIMEOUT));
}
Also used : AbstractTestElement(org.apache.jmeter.testelement.AbstractTestElement)

Example 2 with AbstractTestElement

use of org.apache.jmeter.testelement.AbstractTestElement in project jmeter by apache.

the class ResultSaverGui method modifyTestElement.

/**
     * Modifies a given TestElement to mirror the data in the gui components.
     *
     * @see org.apache.jmeter.gui.JMeterGUIComponent#modifyTestElement(TestElement)
     */
@Override
public void modifyTestElement(TestElement te) {
    super.configureTestElement(te);
    te.setProperty(ResultSaver.FILENAME, filename.getText());
    te.setProperty(ResultSaver.ERRORS_ONLY, errorsOnly.isSelected());
    te.setProperty(ResultSaver.SKIP_AUTO_NUMBER, skipAutoNumber.isSelected());
    te.setProperty(ResultSaver.SKIP_SUFFIX, skipSuffix.isSelected());
    te.setProperty(ResultSaver.SUCCESS_ONLY, successOnly.isSelected());
    te.setProperty(ResultSaver.ADD_TIMESTAMP, addTimestamp.isSelected(), false);
    AbstractTestElement at = (AbstractTestElement) te;
    //$NON-NLS-1$
    at.setProperty(ResultSaver.VARIABLE_NAME, variableName.getText(), "");
    //$NON-NLS-1$
    at.setProperty(ResultSaver.NUMBER_PAD_LENGTH, numberPadLength.getText(), "");
}
Also used : AbstractTestElement(org.apache.jmeter.testelement.AbstractTestElement)

Aggregations

AbstractTestElement (org.apache.jmeter.testelement.AbstractTestElement)2