Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

define protocol in AccessLogSampler #14

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
Expand Up @@ -19,6 +19,7 @@
package org.apache.jmeter.protocol.http.sampler;

import org.apache.jmeter.protocol.http.control.CookieManager;
import org.apache.jmeter.protocol.http.util.HTTPConstants;
import org.apache.jmeter.protocol.http.util.accesslog.Filter;
import org.apache.jmeter.protocol.http.util.accesslog.LogParser;
import org.apache.jmeter.samplers.Entry;
Expand Down Expand Up @@ -66,7 +67,7 @@
public class AccessLogSampler extends HTTPSampler implements TestBean,ThreadListener {
private static final Logger log = LoggingManager.getLoggerForClass();

private static final long serialVersionUID = 232L; // Remember to change this when the class changes ...
private static final long serialVersionUID = 233L; // Remember to change this when the class changes ...

public static final String DEFAULT_CLASS = "org.apache.jmeter.protocol.http.util.accesslog.TCLogParser"; // $NON-NLS-1$

Expand Down Expand Up @@ -276,6 +277,24 @@ public String getPortString() {
public void setPortString(String port) {
super.setProperty(HTTPSamplerBase.PORT, port);
}


public void setProtocol(String value) {
setProperty(PROTOCOL, value.toLowerCase(java.util.Locale.ENGLISH));
}

/**
* Gets the protocol, with default.
*
* @return the protocol
*/
public String getProtocol() {
String protocol = getPropertyAsString(PROTOCOL);
if (protocol == null || protocol.length() == 0 ) {
return HTTPConstants.PROTOCOL_HTTP;
}
return protocol;
}

/**
*
Expand Down
Expand Up @@ -43,7 +43,7 @@ public AccessLogSamplerBeanInfo() {
log.debug("Entered access log sampler bean info");
try {
createPropertyGroup("defaults", // $NON-NLS-1$
new String[] { "domain", "portString", "imageParsing" });// $NON-NLS-1$ $NON-NLS-2$ $NON-NLS-3$
new String[] { "protocol", "domain", "portString", "imageParsing" });// $NON-NLS-1$ $NON-NLS-2$ $NON-NLS-3$ $NON-NLS-4$

createPropertyGroup("plugins", // $NON-NLS-1$
new String[] { "parserClassName", "filterClassName" }); // $NON-NLS-1$ $NON-NLS-2$ $NON-NLS-3$
Expand Down Expand Up @@ -81,6 +81,10 @@ public AccessLogSamplerBeanInfo() {
p.setValue(NOT_UNDEFINED, Boolean.TRUE);
p.setValue(DEFAULT, "");

p = property("protocol"); // $NON-NLS-1$
p.setValue(NOT_UNDEFINED, Boolean.TRUE);
p.setValue(DEFAULT, "http");

p = property("portString"); // $NON-NLS-1$
p.setValue(NOT_UNDEFINED, Boolean.TRUE);
p.setValue(DEFAULT, ""); // $NON-NLS-1$
Expand Down
Expand Up @@ -25,6 +25,8 @@ filterClassName.displayName=Filter (Optional)
filterClassName.shortDescription=Choose a filter implementation to filter your log file entries (optional).
domain.displayName=Server
domain.shortDescription=Host name of the server to test against
protocol.displayName=Protocole
protocol.shortDescription=Protocole to test against
portString.displayName=Port
portString.shortDescription=Port Number to test against
imageParsing.displayName=Parse Images
Expand Down
Expand Up @@ -19,6 +19,8 @@ defaults.displayName=Valeurs par d\u00E9faut du test
displayName=Echantillon Journal d'acc\u00E8s
domain.displayName=Serveur
domain.shortDescription=Nom d'h\u00F4te du serveur de test
protocol.displayName=Protocole
protocol.shortDescription=Protocole du serveur de test
filterClassName.displayName=Filtre (Optionnel)
filterClassName.shortDescription=Choisir une impl\u00E9mentation de filtre pour filtrer vos entr\u00E9es de fichier de journal (optionnel).
imageParsing.displayName=Analyser les images
Expand Down