View | Details | Raw Unified | Return to bug 19128
Collapse All | Expand All

(-)test/src/org/apache/jmeter/protocol/http/proxy/TestHttpRequestHdr.java (-3 / +5 lines)
Lines 29-34 Link Here
29
import org.apache.jmeter.junit.JMeterTestCase;
29
import org.apache.jmeter.junit.JMeterTestCase;
30
import org.apache.jmeter.protocol.http.sampler.HTTPSamplerBase;
30
import org.apache.jmeter.protocol.http.sampler.HTTPSamplerBase;
31
import org.apache.jmeter.protocol.http.util.HTTPArgument;
31
import org.apache.jmeter.protocol.http.util.HTTPArgument;
32
import org.apache.jmeter.protocol.http.util.HTTPFileArg;
32
33
33
public class TestHttpRequestHdr  extends JMeterTestCase {
34
public class TestHttpRequestHdr  extends JMeterTestCase {
34
    public TestHttpRequestHdr(String name) {
35
    public TestHttpRequestHdr(String name) {
Lines 465-473 Link Here
465
        // Check arguments
466
        // Check arguments
466
        Arguments arguments = s.getArguments();
467
        Arguments arguments = s.getArguments();
467
        assertEquals(0, arguments.getArgumentCount());
468
        assertEquals(0, arguments.getArgumentCount());
468
        assertEquals(fileFieldValue, s.getFileField());
469
        HTTPFileArg file = s.getFirstHTTPFileArg();
469
        assertEquals(fileName, s.getFilename());
470
        assertEquals(fileFieldValue, file.getParamName());
470
        assertEquals(mimeType, s.getMimetype());
471
        assertEquals(fileName, file.getPath());
472
        assertEquals(mimeType, file.getMimeType());
471
    }        
473
    }        
472
474
473
    private String createMultipartFormBody(String titleValue, String descriptionValue, String contentEncoding, boolean includeExtraHeaders, String boundary, String endOfLine) {
475
    private String createMultipartFormBody(String titleValue, String descriptionValue, String contentEncoding, boolean includeExtraHeaders, String boundary, String endOfLine) {
(-)test/src/org/apache/jmeter/protocol/http/sampler/TestHTTPSamplersAgainstHttpMirrorServer.java (-4 / +3 lines)
Lines 33-38 Link Here
33
import org.apache.jmeter.protocol.http.control.TestHTTPMirrorThread;
33
import org.apache.jmeter.protocol.http.control.TestHTTPMirrorThread;
34
import org.apache.jmeter.protocol.http.util.EncoderCache;
34
import org.apache.jmeter.protocol.http.util.EncoderCache;
35
import org.apache.jmeter.protocol.http.util.HTTPArgument;
35
import org.apache.jmeter.protocol.http.util.HTTPArgument;
36
import org.apache.jmeter.protocol.http.util.HTTPFileArg;
36
import org.apache.jmeter.testelement.TestPlan;
37
import org.apache.jmeter.testelement.TestPlan;
37
import org.apache.jmeter.threads.JMeterContextService;
38
import org.apache.jmeter.threads.JMeterContextService;
38
import org.apache.jmeter.threads.JMeterVariables;
39
import org.apache.jmeter.threads.JMeterVariables;
Lines 1096-1110 Link Here
1096
    		String titleValue,
1097
    		String titleValue,
1097
    		String descriptionField,
1098
    		String descriptionField,
1098
    		String descriptionValue,
1099
    		String descriptionValue,
1099
    		String fileField,
1100
    		String paramName,
1100
    		File fileValue,
1101
    		File fileValue,
1101
    		String fileMimeType) {
1102
    		String fileMimeType) {
1102
    	// Set the form data
1103
    	// Set the form data
1103
    	setupFormData(httpSampler, isEncoded, titleField, titleValue, descriptionField, descriptionValue);
1104
    	setupFormData(httpSampler, isEncoded, titleField, titleValue, descriptionField, descriptionValue);
1104
    	// Set the file upload data
1105
    	// Set the file upload data
1105
    	httpSampler.setFileField(fileField);
1106
    	httpSampler.addHTTPFileArg(new HTTPFileArg(fileValue.getAbsolutePath(), paramName, fileMimeType));
1106
    	httpSampler.setFilename(fileValue.getAbsolutePath());
1107
    	httpSampler.setMimetype(fileMimeType);    	
1108
    }
1107
    }
1109
1108
1110
    /**
1109
    /**
(-)test/src/org/apache/jmeter/protocol/http/sampler/PostWriterTest.java (-9 / +6 lines)
Lines 36-41 Link Here
36
36
37
import org.apache.jmeter.config.Arguments;
37
import org.apache.jmeter.config.Arguments;
38
import org.apache.jmeter.protocol.http.util.HTTPArgument;
38
import org.apache.jmeter.protocol.http.util.HTTPArgument;
39
import org.apache.jmeter.protocol.http.util.HTTPFileArg;
39
import org.apache.jorphan.logging.LoggingManager;
40
import org.apache.jorphan.logging.LoggingManager;
40
import org.apache.log.Logger;
41
import org.apache.log.Logger;
41
42
Lines 586-600 Link Here
586
     * 
587
     * 
587
     * @param httpSampler
588
     * @param httpSampler
588
     */
589
     */
589
    private void setupFilepart(HTTPSampler httpSampler, String fileField, File file, String mimeType) {
590
    private void setupFilepart(HTTPSampler httpSampler, String paramName, File file, String mimeType) {
590
        httpSampler.setFileField(fileField);
591
        String path = (file != null)
591
        if(file != null) {
592
            ? file.getAbsolutePath()
592
            httpSampler.setFilename(file.getAbsolutePath());
593
            : "";
593
        }
594
         httpSampler.setHTTPFileArg(new HTTPFileArg(path, paramName, mimeType));
594
        else {
595
            httpSampler.setFilename("");
596
        }
597
        httpSampler.setMimetype(mimeType);
598
    }
595
    }
599
596
600
    /**
597
    /**
(-)test/src/org/apache/jmeter/protocol/http/sampler/PutWriterTest.java (+48 lines)
Line 0 Link Here
1
/*
2
 * Licensed to the Apache Software Foundation (ASF) under one or more
3
 * contributor license agreements.	See the NOTICE file distributed with
4
 * this work for additional information regarding copyright ownership.
5
 * The ASF licenses this file to You under the Apache License, Version 2.0
6
 * (the "License"); you may not use this file except in compliance with
7
 * the License.	 You may obtain a copy of the License at
8
 *
9
 *	 http://www.apache.org/licenses/LICENSE-2.0
10
 *
11
 * Unless required by applicable law or agreed to in writing, software
12
 * distributed under the License is distributed on an "AS IS" BASIS,
13
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14
 * See the License for the specific language governing permissions and
15
 * limitations under the License.
16
 *
17
 */
18
19
package org.apache.jmeter.protocol.http.sampler;
20
21
import java.net.URLConnection;
22
import junit.framework.TestCase;
23
24
import org.apache.jmeter.protocol.http.util.HTTPFileArg;
25
import org.apache.jmeter.protocol.http.util.HTTPConstants;
26
27
/**
28
 * @author Erhan Kesken
29
 */
30
public class PutWriterTest extends TestCase {
31
32
	public PutWriterTest(String name) {
33
		super(name);
34
	}
35
36
	public void testSetHeaders() throws Exception {
37
		URLConnection uc = new NullURLConnection();
38
		HTTPSampler sampler = new HTTPNullSampler();
39
		sampler.setHTTPFileArg(new HTTPFileArg("file1", null, "mime1"));
40
		PutWriter pw = new PutWriter();
41
		pw.setHeaders(uc, sampler);
42
		assertEquals("mime1", uc.getRequestProperty(HTTPConstants.HEADER_CONTENT_TYPE));
43
		uc = new NullURLConnection();
44
		sampler.setHTTPFileArg(new HTTPFileArg("file2", "param2", "mime2"));
45
		pw.setHeaders(uc, sampler);
46
		assertEquals("mime2", uc.getRequestProperty(HTTPConstants.HEADER_CONTENT_TYPE));
47
	}
48
}
(-)test/src/org/apache/jmeter/protocol/http/sampler/TestHTTPSamplers.java (-13 / +140 lines)
Lines 13-25 Link Here
13
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14
 * See the License for the specific language governing permissions and
14
 * See the License for the specific language governing permissions and
15
 * limitations under the License.
15
 * limitations under the License.
16
 * 
16
 *
17
 */
17
 */
18
18
19
package org.apache.jmeter.protocol.http.sampler;
19
package org.apache.jmeter.protocol.http.sampler;
20
20
21
import org.apache.jmeter.config.Argument;
21
import org.apache.jmeter.config.Argument;
22
import org.apache.jmeter.config.Arguments;
22
import org.apache.jmeter.config.Arguments;
23
import org.apache.jmeter.protocol.http.util.HTTPFileArg;
24
import org.apache.jmeter.protocol.http.util.HTTPFileArgs;
23
25
24
import junit.framework.TestCase;
26
import junit.framework.TestCase;
25
27
Lines 34-47 Link Here
34
        HTTPSamplerBase sampler = new HTTPNullSampler();
36
        HTTPSamplerBase sampler = new HTTPNullSampler();
35
        Arguments args;
37
        Arguments args;
36
        Argument arg;
38
        Argument arg;
37
        
39
        HTTPFileArgs files;
40
        HTTPFileArg file;
41
38
        args = sampler.getArguments();
42
        args = sampler.getArguments();
39
        assertEquals(0,args.getArgumentCount());
43
        assertEquals(0,args.getArgumentCount());
40
        
44
        files = sampler.getHTTPFileArgs();
45
        assertEquals(0,files.getHTTPFileArgCount());
46
41
        sampler.parseArguments("");
47
        sampler.parseArguments("");
42
        args = sampler.getArguments();
48
        args = sampler.getArguments();
43
        assertEquals(0,args.getArgumentCount());
49
        assertEquals(0,args.getArgumentCount());
44
        
50
        files = sampler.getHTTPFileArgs();
51
        assertEquals(0,files.getHTTPFileArgCount());
52
45
        sampler.parseArguments("name1");
53
        sampler.parseArguments("name1");
46
        args = sampler.getArguments();
54
        args = sampler.getArguments();
47
        assertEquals(1,args.getArgumentCount());
55
        assertEquals(1,args.getArgumentCount());
Lines 49-55 Link Here
49
        assertEquals("name1",arg.getName());
57
        assertEquals("name1",arg.getName());
50
        assertEquals("",arg.getMetaData());
58
        assertEquals("",arg.getMetaData());
51
        assertEquals("",arg.getValue());
59
        assertEquals("",arg.getValue());
52
        
60
        files = sampler.getHTTPFileArgs();
61
        assertEquals(0,files.getHTTPFileArgCount());
62
53
        sampler.parseArguments("name2=");
63
        sampler.parseArguments("name2=");
54
        args = sampler.getArguments();
64
        args = sampler.getArguments();
55
        assertEquals(2,args.getArgumentCount());
65
        assertEquals(2,args.getArgumentCount());
Lines 57-63 Link Here
57
        assertEquals("name2",arg.getName());
67
        assertEquals("name2",arg.getName());
58
        assertEquals("=",arg.getMetaData());
68
        assertEquals("=",arg.getMetaData());
59
        assertEquals("",arg.getValue());
69
        assertEquals("",arg.getValue());
60
        
70
        files = sampler.getHTTPFileArgs();
71
        assertEquals(0,files.getHTTPFileArgCount());
72
61
        sampler.parseArguments("name3=value3");
73
        sampler.parseArguments("name3=value3");
62
        args = sampler.getArguments();
74
        args = sampler.getArguments();
63
        assertEquals(3,args.getArgumentCount());
75
        assertEquals(3,args.getArgumentCount());
Lines 65-71 Link Here
65
        assertEquals("name3",arg.getName());
77
        assertEquals("name3",arg.getName());
66
        assertEquals("=",arg.getMetaData());
78
        assertEquals("=",arg.getMetaData());
67
        assertEquals("value3",arg.getValue());
79
        assertEquals("value3",arg.getValue());
68
        
80
        files = sampler.getHTTPFileArgs();
81
        assertEquals(0,files.getHTTPFileArgCount());
69
    }
82
    }
70
83
71
    // Parse arguments all at once
84
    // Parse arguments all at once
Lines 73-101 Link Here
73
        HTTPSamplerBase sampler = new HTTPNullSampler();
86
        HTTPSamplerBase sampler = new HTTPNullSampler();
74
        Arguments args;
87
        Arguments args;
75
        Argument arg;
88
        Argument arg;
76
        
89
        HTTPFileArgs files;
90
        HTTPFileArg file;
91
77
        args = sampler.getArguments();
92
        args = sampler.getArguments();
78
        assertEquals(0,args.getArgumentCount());
93
        assertEquals(0,args.getArgumentCount());
79
        
94
        files = sampler.getHTTPFileArgs();
95
        assertEquals(0,files.getHTTPFileArgCount());
96
80
        sampler.parseArguments("&name1&name2=&name3=value3");
97
        sampler.parseArguments("&name1&name2=&name3=value3");
81
        args = sampler.getArguments();
98
        args = sampler.getArguments();
82
        assertEquals(3,args.getArgumentCount());
99
        assertEquals(3,args.getArgumentCount());
83
        
100
        files = sampler.getHTTPFileArgs();
101
        assertEquals(0,files.getHTTPFileArgCount());
102
84
        arg=args.getArgument(0);
103
        arg=args.getArgument(0);
85
        assertEquals("name1",arg.getName());
104
        assertEquals("name1",arg.getName());
86
        assertEquals("",arg.getMetaData());
105
        assertEquals("",arg.getMetaData());
87
        assertEquals("",arg.getValue());
106
        assertEquals("",arg.getValue());
88
        
107
        files = sampler.getHTTPFileArgs();
108
        assertEquals(0,files.getHTTPFileArgCount());
109
89
        arg=args.getArgument(1);
110
        arg=args.getArgument(1);
90
        assertEquals("name2",arg.getName());
111
        assertEquals("name2",arg.getName());
91
        assertEquals("=",arg.getMetaData());
112
        assertEquals("=",arg.getMetaData());
92
        assertEquals("",arg.getValue());
113
        assertEquals("",arg.getValue());
93
        
114
        files = sampler.getHTTPFileArgs();
115
        assertEquals(0,files.getHTTPFileArgCount());
116
94
        arg=args.getArgument(2);
117
        arg=args.getArgument(2);
95
        assertEquals("name3",arg.getName());
118
        assertEquals("name3",arg.getName());
96
        assertEquals("=",arg.getMetaData());
119
        assertEquals("=",arg.getMetaData());
97
        assertEquals("value3",arg.getValue());
120
        assertEquals("value3",arg.getValue());
98
        
121
        files = sampler.getHTTPFileArgs();
122
        assertEquals(0,files.getHTTPFileArgCount());
99
    }
123
    }
100
124
101
        public void testArgumentWithoutEquals() throws Exception {
125
        public void testArgumentWithoutEquals() throws Exception {
Lines 212-215 Link Here
212
            config.setDomain("www.apache.org");
236
            config.setDomain("www.apache.org");
213
            assertEquals("http://www.apache.org/index.html", config.getUrl().toString());
237
            assertEquals("http://www.apache.org/index.html", config.getUrl().toString());
214
        }
238
        }
239
240
        public void testAddSetGetHTTPFileArgForUpload() {
241
            HTTPSamplerBase sampler = new HTTPNullSampler();
242
            sampler.addHTTPFileArg(new HTTPFileArg("file1"));
243
            sampler.addHTTPFileArg(new HTTPFileArg("file2"));
244
            HTTPFileArgs files = sampler.getHTTPFileArgs();
245
            assertEquals(2, files.getHTTPFileArgCount());
246
            HTTPFileArg file = files.getHTTPFileArg(0);
247
            assertEquals("file1", file.getPath());
248
            file = files.getHTTPFileArg(1);
249
            assertEquals("file2", file.getPath());
250
            file = sampler.getFirstHTTPFileArg();
251
            assertEquals("file1", file.getPath());
252
253
            sampler.setHTTPFileArg(new HTTPFileArg("file3", "param3", "mime3"));
254
            files = sampler.getHTTPFileArgs();
255
            assertEquals(1, files.getHTTPFileArgCount());
256
            HTTPFileArg hfile = (HTTPFileArg) files.getHTTPFileArg(0);
257
            assertEquals("file3", hfile.getPath());
258
            assertEquals("param3", hfile.getParamName());
259
            assertEquals("mime3", hfile.getMimeType());
260
261
            HTTPFileArgs files2 = new HTTPFileArgs();
262
            files2.addHTTPFileArg(new HTTPFileArg("file1"));
263
            files2.addHTTPFileArg(new HTTPFileArg("file2"));
264
            sampler.setHTTPFileArgs(files2);
265
            files = sampler.getHTTPFileArgs();
266
            assertEquals(2, files.getHTTPFileArgCount());
267
            file = files.getHTTPFileArg(0);
268
            assertEquals("file1", file.getPath());
269
            file = files.getHTTPFileArg(1);
270
            assertEquals("file2", file.getPath());
271
        }
272
273
        public void testGetSendHTTPFileArgAsPostBody() {
274
            HTTPSamplerBase sampler = new HTTPNullSampler();
275
            assertFalse(sampler.getSendFileAsPostBody());
276
            sampler.addHTTPFileArg(new HTTPFileArg("file1"));
277
            assertTrue(sampler.getSendFileAsPostBody());
278
            sampler.addHTTPFileArg(new HTTPFileArg("file2"));
279
            assertFalse(sampler.getSendFileAsPostBody());
280
            sampler.setHTTPFileArg(new HTTPFileArg("file", null, "mime"));
281
            assertTrue(sampler.getSendFileAsPostBody());
282
            sampler.setHTTPFileArg(new HTTPFileArg("file", "param", "mime"));
283
            assertFalse(sampler.getSendFileAsPostBody());
284
        }
285
286
        public void testSetAndGetFileField() {
287
            HTTPSamplerBase sampler = new HTTPNullSampler();
288
            sampler.setFileField("param");
289
            assertEquals("param", sampler.getPropertyAsString(HTTPSamplerBase.FILE_FIELD));
290
            HTTPFileArg file = sampler.getFirstHTTPFileArg();
291
            assertEquals("param", file.getParamName());
292
293
            sampler.setFileField("param2");
294
            assertEquals("param2", sampler.getPropertyAsString(HTTPSamplerBase.FILE_FIELD));
295
            file = sampler.getFirstHTTPFileArg();
296
            assertEquals("param2", file.getParamName());
297
298
            sampler.addHTTPFileArg(new HTTPFileArg("path", "param3", null));
299
            sampler.setFileField("param4");
300
            assertEquals("param4", sampler.getPropertyAsString(HTTPSamplerBase.FILE_FIELD));
301
            file = sampler.getFirstHTTPFileArg();
302
            assertEquals("param4", file.getParamName());
303
        }
304
305
        public void testSetAndGetFilename() {
306
            HTTPSamplerBase sampler = new HTTPNullSampler();
307
            sampler.setFilename("name");
308
            assertEquals("name", sampler.getPropertyAsString(HTTPSamplerBase.FILE_NAME));
309
            HTTPFileArg file = sampler.getFirstHTTPFileArg();
310
            assertEquals("name", file.getPath());
311
312
            sampler.setFilename("name2");
313
            assertEquals("name2", sampler.getPropertyAsString(HTTPSamplerBase.FILE_NAME));
314
            file = sampler.getFirstHTTPFileArg();
315
            assertEquals("name2", file.getPath());
316
317
            sampler.addHTTPFileArg(new HTTPFileArg("name3", null, null));
318
            sampler.setFilename("name4");
319
            assertEquals("name4", sampler.getPropertyAsString(HTTPSamplerBase.FILE_NAME));
320
            file = sampler.getFirstHTTPFileArg();
321
            assertEquals("name4", file.getPath());
322
        }
323
324
        public void testSetAndGetMimetype() {
325
            HTTPSamplerBase sampler = new HTTPNullSampler();
326
            sampler.setMimetype("mime");
327
            assertEquals("mime", sampler.getPropertyAsString(HTTPSamplerBase.MIMETYPE));
328
            HTTPFileArg file = sampler.getFirstHTTPFileArg();
329
            assertEquals("mime", file.getMimeType());
330
331
            sampler.setMimetype("mime2");
332
            assertEquals("mime2", sampler.getPropertyAsString(HTTPSamplerBase.MIMETYPE));
333
            file = sampler.getFirstHTTPFileArg();
334
            assertEquals("mime2", file.getMimeType());
335
336
            sampler.addHTTPFileArg(new HTTPFileArg("name", null, "mime3"));
337
            sampler.setMimetype("mime4");
338
            assertEquals("mime4", sampler.getPropertyAsString(HTTPSamplerBase.MIMETYPE));
339
            file = sampler.getFirstHTTPFileArg();
340
            assertEquals("mime4", file.getMimeType());
341
        }
215
}
342
}
(-)test/src/org/apache/jmeter/protocol/http/sampler/NullURLConnection.java (+55 lines)
Line 0 Link Here
1
/*
2
 * Licensed to the Apache Software Foundation (ASF) under one or more
3
 * contributor license agreements.  See the NOTICE file distributed with
4
 * this work for additional information regarding copyright ownership.
5
 * The ASF licenses this file to You under the Apache License, Version 2.0
6
 * (the "License"); you may not use this file except in compliance with
7
 * the License.  You may obtain a copy of the License at
8
 *
9
 *   http://www.apache.org/licenses/LICENSE-2.0
10
 *
11
 * Unless required by applicable law or agreed to in writing, software
12
 * distributed under the License is distributed on an "AS IS" BASIS,
13
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14
 * See the License for the specific language governing permissions and
15
 * limitations under the License.
16
 *
17
 */
18
19
package org.apache.jmeter.protocol.http.sampler;
20
21
import java.net.URL;
22
import java.net.URLConnection;
23
import java.net.MalformedURLException;
24
import java.util.Map;
25
import java.util.Properties;
26
27
/**
28
 * Dummy URLConnection class for use by classes that need an
29
 * URLConnection for junit tests.
30
 *
31
 * @author Erhan Kesken
32
 */
33
public final class NullURLConnection extends URLConnection {
34
35
	private Map data = new Properties();
36
37
	public NullURLConnection() throws MalformedURLException {
38
		this(new URL("http://localhost"));
39
	}
40
41
	public NullURLConnection(URL url) {
42
		super(url);
43
	}
44
45
	public void connect() {
46
	}
47
48
	public void setRequestProperty(String name, String value) {
49
		data.put(name, value);
50
	}
51
52
	public String getRequestProperty(String name) {
53
		return (String) data.get(name);
54
	}
55
}
(-)test/src/org/apache/jmeter/protocol/http/sampler/HTTPNullSampler.java (-1 / +1 lines)
Lines 24-30 Link Here
24
 * Dummy HTTPSampler class for use by classes that need an HTTPSampler, but that
24
 * Dummy HTTPSampler class for use by classes that need an HTTPSampler, but that
25
 * don't need an actual sampler, e.g. for Parsing testing.
25
 * don't need an actual sampler, e.g. for Parsing testing.
26
 */
26
 */
27
public final class HTTPNullSampler extends HTTPSamplerBase {
27
public final class HTTPNullSampler extends HTTPSampler {
28
28
29
	/*
29
	/*
30
	 * (non-Javadoc)
30
	 * (non-Javadoc)
(-)test/src/org/apache/jmeter/protocol/http/gui/TestHTTPFileArgsPanel.java (+186 lines)
Line 0 Link Here
1
/*
2
 * Licensed to the Apache Software Foundation (ASF) under one or more
3
 * contributor license agreements.  See the NOTICE file distributed with
4
 * this work for additional information regarding copyright ownership.
5
 * The ASF licenses this file to You under the Apache License, Version 2.0
6
 * (the "License"); you may not use this file except in compliance with
7
 * the License.  You may obtain a copy of the License at
8
 *
9
 *   http://www.apache.org/licenses/LICENSE-2.0
10
 *
11
 * Unless required by applicable law or agreed to in writing, software
12
 * distributed under the License is distributed on an "AS IS" BASIS,
13
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14
 * See the License for the specific language governing permissions and
15
 * limitations under the License.
16
 *
17
 */
18
19
package org.apache.jmeter.protocol.http.gui;
20
21
import java.util.Collection;
22
import java.awt.Color;
23
import java.awt.event.ActionEvent;
24
25
import javax.swing.JButton;
26
import javax.swing.JPanel;
27
import javax.swing.JLabel;
28
import javax.swing.JTable;
29
30
import junit.framework.TestCase;
31
32
import org.apache.jorphan.gui.ObjectTableModel;
33
import org.apache.jmeter.util.JMeterUtils;
34
import org.apache.jmeter.protocol.http.util.HTTPFileArg;
35
import org.apache.jmeter.protocol.http.util.HTTPFileArgs;
36
import org.apache.jmeter.testelement.TestElement;
37
38
/**
39
 * @author Erhan Kesken
40
 */
41
public class TestHTTPFileArgsPanel extends TestCase {
42
43
	/**
44
	 * Create a new test.
45
	 *
46
	 * @param name
47
	 *            the name of the test
48
	 */
49
	public TestHTTPFileArgsPanel(String name) {
50
		super(name);
51
		JMeterUtils.getProperties("testfiles/jmetertest.properties");
52
	}
53
54
	/**
55
	 * Test constructors.
56
	 *
57
	 * @throws Exception
58
	 *             if an exception occurred during the test
59
	 */
60
	public void testConstructors() throws Exception {
61
		HTTPFileArgsPanel panel = new HTTPFileArgsPanel();
62
		assertEquals(JMeterUtils.getResString("user_defined_variables"), panel.getTableLabel().getText());
63
		panel = new HTTPFileArgsPanel("hede");
64
		assertEquals("hede", panel.getTableLabel().getText());
65
		panel = new HTTPFileArgsPanel("hede", null);
66
		assertEquals("hede", panel.getTableLabel().getText());
67
		assertTrue("HTTPFileArgsPanel Functor", HTTPFileArgsPanel.testFunctors());
68
	}
69
70
	public void testGetLabelResource() throws Exception {
71
		HTTPFileArgsPanel panel = new HTTPFileArgsPanel();
72
		assertEquals("user_defined_variables", panel.getLabelResource());
73
	}
74
75
	public void testGetMenuCategories() throws Exception {
76
		HTTPFileArgsPanel panel = new HTTPFileArgsPanel();
77
		Collection menu = panel.getMenuCategories();
78
		assertEquals(1, menu.size());
79
		assertEquals("[menu_config_element]", menu.toString());
80
	}
81
82
	public void testCreateTestElement() throws Exception {
83
		HTTPFileArgsPanel panel = new HTTPFileArgsPanel();
84
		TestElement te = panel.createTestElement();
85
		assertEquals("", te.toString());
86
		assertEquals("User Defined Variables", te.getName());
87
		assertEquals("", te.getComment());
88
	}
89
90
	public void testModifyTestElement() throws Exception {
91
		HTTPFileArgs files = new HTTPFileArgs();
92
		files.addHTTPFileArg("file1");
93
		HTTPFileArgsPanel panel = new HTTPFileArgsPanel();
94
		panel.modifyTestElement(files);
95
		assertEquals("User Defined Variables", files.getName());
96
		assertEquals("", files.getComment());
97
	}
98
99
	public void testConfigure() throws Exception {
100
		HTTPFileArgsPanel panel = new HTTPFileArgsPanel();
101
		HTTPFileArgs files = new HTTPFileArgs();
102
		files.addHTTPFileArg(new HTTPFileArg("file1", "param1", "mime1"));
103
		panel.configure(files);
104
		JButton delete = panel.getDeleteButton();
105
		assertTrue(delete.isEnabled());
106
		ObjectTableModel tableModel = (ObjectTableModel) panel.getTable().getModel();
107
		assertEquals(1, tableModel.getRowCount());
108
		HTTPFileArg file = (HTTPFileArg) tableModel.iterator().next();
109
		assertEquals("file1", file.getPath());
110
		assertEquals("param1", file.getParamName());
111
		assertEquals("mime1", file.getMimeType());
112
113
		files = new HTTPFileArgs();
114
		panel.configure(files);
115
		delete = panel.getDeleteButton();
116
		assertFalse(delete.isEnabled());
117
		tableModel = (ObjectTableModel) panel.getTable().getModel();
118
		assertEquals(0, tableModel.getRowCount());
119
	}
120
121
	public void testClear() throws Exception {
122
		HTTPFileArgsPanel panel = new HTTPFileArgsPanel();
123
		HTTPFileArgs files = new HTTPFileArgs();
124
		files.addHTTPFileArg("file1");
125
		panel.configure(files);
126
		ObjectTableModel tableModel = (ObjectTableModel) panel.getTable().getModel();
127
		assertEquals(1, tableModel.getRowCount());
128
		panel.clear();
129
		tableModel = (ObjectTableModel) panel.getTable().getModel();
130
		assertEquals(0, tableModel.getRowCount());
131
	}
132
133
	public void testClearGui() throws Exception {
134
		HTTPFileArgsPanel panel = new HTTPFileArgsPanel();
135
		HTTPFileArgs files = new HTTPFileArgs();
136
		files.addHTTPFileArg("file1");
137
		panel.configure(files);
138
		assertEquals("", panel.getName());
139
		ObjectTableModel tableModel = (ObjectTableModel) panel.getTable().getModel();
140
		assertEquals(1, tableModel.getRowCount());
141
		panel.clearGui();
142
		assertEquals("User Defined Variables", panel.getName());
143
		tableModel = (ObjectTableModel) panel.getTable().getModel();
144
		assertEquals(0, tableModel.getRowCount());
145
	}
146
147
	public void testMakeLabelPanel() throws Exception {
148
		HTTPFileArgsPanel panel = new HTTPFileArgsPanel("hede", Color.GRAY);
149
		JPanel lpanel = (JPanel) panel.makeLabelPanel();
150
		assertEquals(Color.GRAY, lpanel.getBackground());
151
		JLabel label = (JLabel) lpanel.getComponent(0);
152
		assertEquals("hede", label.getText());
153
	}
154
155
	public void testAddDeleteFile() throws Exception {
156
		HTTPFileArgsPanel panel = new HTTPFileArgsPanel();
157
		panel.addFile("");
158
		JTable table = panel.getTable();
159
		ObjectTableModel tableModel = (ObjectTableModel) table.getModel();
160
		JButton delete = panel.getDeleteButton();
161
		ActionEvent ev = new ActionEvent(panel, 0, "delete");
162
		assertTrue(delete.isEnabled());
163
		assertEquals(1, tableModel.getRowCount());
164
		table.setRowSelectionInterval(0, 0);
165
		panel.actionPerformed(ev);
166
		assertFalse(table.isEditing());
167
		assertFalse(delete.isEnabled());
168
		assertEquals(0, tableModel.getRowCount());
169
170
		panel.addFile(""); panel.addFile(""); panel.addFile("");
171
		assertEquals(3, tableModel.getRowCount());
172
		table.setRowSelectionInterval(1, 1);
173
		panel.actionPerformed(ev);
174
		assertFalse(table.isEditing());
175
		assertEquals(2, tableModel.getRowCount());
176
		assertEquals(1, table.getSelectedRow());
177
178
		panel.addFile("");
179
		assertEquals(3, tableModel.getRowCount());
180
		table.setRowSelectionInterval(2, 2);
181
		panel.actionPerformed(ev);
182
		assertFalse(table.isEditing());
183
		assertEquals(2, tableModel.getRowCount());
184
		assertEquals(1, table.getSelectedRow());
185
	}
186
}
(-)test/src/org/apache/jmeter/protocol/http/config/MultipartUrlConfigTest.java (+130 lines)
Line 0 Link Here
1
/*
2
 * Licensed to the Apache Software Foundation (ASF) under one or more
3
 * contributor license agreements.  See the NOTICE file distributed with
4
 * this work for additional information regarding copyright ownership.
5
 * The ASF licenses this file to You under the Apache License, Version 2.0
6
 * (the "License"); you may not use this file except in compliance with
7
 * the License.  You may obtain a copy of the License at
8
 *
9
 *   http://www.apache.org/licenses/LICENSE-2.0
10
 *
11
 * Unless required by applicable law or agreed to in writing, software
12
 * distributed under the License is distributed on an "AS IS" BASIS,
13
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14
 * See the License for the specific language governing permissions and
15
 * limitations under the License.
16
 *
17
 */
18
19
package org.apache.jmeter.protocol.http.config;
20
21
import junit.framework.TestCase;
22
23
import org.apache.jmeter.config.Argument;
24
import org.apache.jmeter.config.Arguments;
25
import org.apache.jmeter.protocol.http.util.HTTPFileArg;
26
import org.apache.jmeter.protocol.http.util.HTTPFileArgs;
27
28
/**
29
 * @author Erhan Kesken
30
 */
31
public class MultipartUrlConfigTest extends TestCase {
32
33
	public MultipartUrlConfigTest(String name) {
34
		super(name);
35
	}
36
37
	public void testConstructors() {
38
		MultipartUrlConfig muc = new MultipartUrlConfig();
39
		assertEquals(0, muc.getArguments().getArgumentCount());
40
		assertEquals(0, muc.getHTTPFileArgs().getHTTPFileArgCount());
41
		muc = new MultipartUrlConfig("boundary");
42
		assertEquals(0, muc.getArguments().getArgumentCount());
43
		assertEquals(0, muc.getHTTPFileArgs().getHTTPFileArgCount());
44
		assertEquals("boundary", muc.getBoundary());
45
	}
46
47
	public void testAddGetHTTPFileArgs() {
48
		MultipartUrlConfig muc = new MultipartUrlConfig();
49
		muc.addHTTPFileArg("file1", "param1", "mime1");
50
		HTTPFileArgs files = muc.getHTTPFileArgs();
51
		assertEquals(1, files.getHTTPFileArgCount());
52
		HTTPFileArg file = (HTTPFileArg) files.iterator().next().getObjectValue();
53
		assertEquals("file1", file.getPath());
54
		assertEquals("param1", file.getParamName());
55
		assertEquals("mime1", file.getMimeType());
56
	}
57
58
	public void testSetGetFilename() {
59
		MultipartUrlConfig muc = new MultipartUrlConfig();
60
		muc.setFilename("file");
61
		assertEquals("file", muc.getFilename());
62
		muc.addHTTPFileArg("file1", null, null);
63
		muc.addHTTPFileArg("file2", null, null);
64
		muc.setFilename("file3");
65
		assertEquals("file3", muc.getFilename());
66
		assertEquals(1, muc.getHTTPFileArgs().getHTTPFileArgCount());
67
	}
68
69
	public void testSetGetMimeType() {
70
		MultipartUrlConfig muc = new MultipartUrlConfig();
71
		muc.setMimeType("mime");
72
		assertEquals("mime", muc.getMimeType());
73
		muc.setHTTPFileArg(new HTTPFileArg("file1", "param1", null));
74
		muc.addHTTPFileArg("file2", "param2", null);
75
		muc.setMimeType("mime3");
76
		assertEquals("file1", muc.getFilename());
77
		assertEquals("mime3", muc.getMimeType());
78
		assertEquals(1, muc.getHTTPFileArgs().getHTTPFileArgCount());
79
	}
80
81
	public void testSetGetFileFieldName() {
82
		MultipartUrlConfig muc = new MultipartUrlConfig();
83
		muc.setFileFieldName("param");
84
		assertEquals("param", muc.getFileFieldName());
85
		muc.setHTTPFileArg(new HTTPFileArg("file1", "param1", null));
86
		muc.addHTTPFileArg("file2", "param2", null);
87
		muc.setFileFieldName("param3");
88
		assertEquals("file1", muc.getFilename());
89
		assertEquals("param3", muc.getFileFieldName());
90
		assertEquals(1, muc.getHTTPFileArgs().getHTTPFileArgCount());
91
	}
92
93
	public void testParseArguments() {
94
		String queryString
95
			= "Content-Disposition: form-data; name=\"aa\"\n"
96
			+ "Content-Type: text/plain; charset=ISO-8859-1\n"
97
			+ "Content-Transfer-Encoding: 8bit\n"
98
			+ "\n"
99
			+ "aa\n"
100
			+ "--7d159c1302d0y0\n"
101
			+ "Content-Disposition: form-data; name=\"xx\"\n"
102
			+ "Content-Type: text/plain; charset=ISO-8859-1\n"
103
			+ "Content-Transfer-Encoding: 8bit\n"
104
			+ "\n"
105
			+ "xx\n"
106
			+ "--7d159c1302d0y0\n"
107
			+ "Content-Disposition: form-data; name=\"param1\"; filename=\"file1\"\n"
108
			+ "Content-Type: text/plain\n"
109
			+ "Content-Transfer-Encoding: binary\n"
110
			+ "\n"
111
			+ "file content\n"
112
			+ "\n";
113
		MultipartUrlConfig muc = new MultipartUrlConfig("7d159c1302d0y0");
114
		muc.parseArguments(queryString);
115
		HTTPFileArgs files = muc.getHTTPFileArgs();
116
		assertEquals(1, files.getHTTPFileArgCount());
117
		HTTPFileArg file = (HTTPFileArg) files.iterator().next().getObjectValue();
118
		assertEquals("file1", file.getPath());
119
		assertEquals("param1", file.getParamName());
120
		assertEquals("text/plain", file.getMimeType());
121
		Arguments args = muc.getArguments();
122
		assertEquals(2, args.getArgumentCount());
123
		Argument arg = args.getArgument(0);
124
		assertEquals("aa", arg.getName());
125
		assertEquals("aa", arg.getValue());
126
		arg = args.getArgument(1);
127
		assertEquals("xx", arg.getName());
128
		assertEquals("xx", arg.getValue());
129
	}
130
}
(-)test/src/org/apache/jmeter/protocol/http/util/TestHTTPFileArg.java (+69 lines)
Line 0 Link Here
1
/*
2
 * Licensed to the Apache Software Foundation (ASF) under one or more
3
 * contributor license agreements.  See the NOTICE file distributed with
4
 * this work for additional information regarding copyright ownership.
5
 * The ASF licenses this file to You under the Apache License, Version 2.0
6
 * (the "License"); you may not use this file except in compliance with
7
 * the License.  You may obtain a copy of the License at
8
 *
9
 *   http://www.apache.org/licenses/LICENSE-2.0
10
 *
11
 * Unless required by applicable law or agreed to in writing, software
12
 * distributed under the License is distributed on an "AS IS" BASIS,
13
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14
 * See the License for the specific language governing permissions and
15
 * limitations under the License.
16
 *
17
 */
18
19
package org.apache.jmeter.protocol.http.util;
20
21
import junit.framework.TestCase;
22
23
/**
24
 * @author Erhan Kesken
25
 */
26
public class TestHTTPFileArg extends TestCase {
27
	public TestHTTPFileArg(String name) {
28
		super(name);
29
	}
30
31
	public void testConstructors() throws Exception {
32
		HTTPFileArg file = new HTTPFileArg();
33
		assertEquals("no parameter failure", "", file.getPath());
34
		assertEquals("no parameter failure", "", file.getParamName());
35
		assertEquals("no parameter failure", "", file.getMimeType());
36
		file = new HTTPFileArg("path");
37
		assertEquals("single parameter failure", "path", file.getPath());
38
		assertEquals("single parameter failure", null, file.getParamName());
39
		assertEquals("single parameter failure", null, file.getMimeType());
40
		file = new HTTPFileArg("path", "param", "mimetype");
41
		assertEquals("two parameter failure", "path", file.getPath());
42
		assertEquals("two parameter failure", "param", file.getParamName());
43
		assertEquals("two parameter failure", "mimetype", file.getMimeType());
44
		HTTPFileArg file2 = new HTTPFileArg(file);
45
		assertEquals("copy constructor failure", "path", file2.getPath());
46
		assertEquals("copy constructor failure", "param", file2.getParamName());
47
		assertEquals("copy constructor failure", "mimetype", file2.getMimeType());
48
	}
49
50
	public void testGettersSetters() throws Exception {
51
		HTTPFileArg file = new HTTPFileArg();
52
		assertEquals("", file.getPath());
53
		assertEquals("", file.getParamName());
54
		assertEquals("", file.getMimeType());
55
		file.setPath("path");
56
		file.setParamName("param");
57
		file.setMimeType("mimetype");
58
		file.setHeader("header");
59
		assertEquals("path", file.getPath());
60
		assertEquals("param", file.getParamName());
61
		assertEquals("mimetype", file.getMimeType());
62
		assertEquals("header", file.getHeader());
63
	}
64
65
	public void testToString() throws Exception {
66
		HTTPFileArg file = new HTTPFileArg("path1", "param1", "mimetype1");
67
		assertEquals("path:'path1'|param:'param1'|mimetype:'mimetype1'", file.toString());
68
	}
69
}
(-)test/src/org/apache/jmeter/protocol/http/util/TestHTTPFileArgs.java (+121 lines)
Line 0 Link Here
1
/*
2
 * Licensed to the Apache Software Foundation (ASF) under one or more
3
 * contributor license agreements.  See the NOTICE file distributed with
4
 * this work for additional information regarding copyright ownership.
5
 * The ASF licenses this file to You under the Apache License, Version 2.0
6
 * (the "License"); you may not use this file except in compliance with
7
 * the License.  You may obtain a copy of the License at
8
 *
9
 *   http://www.apache.org/licenses/LICENSE-2.0
10
 *
11
 * Unless required by applicable law or agreed to in writing, software
12
 * distributed under the License is distributed on an "AS IS" BASIS,
13
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14
 * See the License for the specific language governing permissions and
15
 * limitations under the License.
16
 *
17
 */
18
19
package org.apache.jmeter.protocol.http.util;
20
21
import java.util.List;
22
import java.util.LinkedList;
23
import junit.framework.TestCase;
24
25
import org.apache.jmeter.testelement.property.PropertyIterator;
26
27
/**
28
 * @author Erhan Kesken
29
 */
30
public class TestHTTPFileArgs extends TestCase {
31
	public TestHTTPFileArgs(String name) {
32
		super(name);
33
	}
34
35
	public void testConstructors() throws Exception {
36
		HTTPFileArgs files = new HTTPFileArgs();
37
		assertEquals(0, files.getHTTPFileArgCount());
38
	}
39
40
	public void testAdding() throws Exception {
41
		HTTPFileArgs files = new HTTPFileArgs();
42
		assertEquals(0, files.getHTTPFileArgCount());
43
		files.addHTTPFileArg("hede");
44
		assertEquals(1, files.getHTTPFileArgCount());
45
		assertEquals("hede", ((HTTPFileArg) files.iterator().next().getObjectValue()).getPath());
46
		HTTPFileArg file = new HTTPFileArg("hodo");
47
		files.addHTTPFileArg(file);
48
		assertEquals(2, files.getHTTPFileArgCount());
49
		PropertyIterator iter = files.iterator();
50
		assertEquals("hede", ((HTTPFileArg) iter.next().getObjectValue()).getPath());
51
		assertEquals("hodo", ((HTTPFileArg) iter.next().getObjectValue()).getPath());
52
		files.addEmptyHTTPFileArg();
53
		assertEquals(3, files.getHTTPFileArgCount());
54
		iter = files.iterator();
55
		assertEquals("hede", ((HTTPFileArg) iter.next().getObjectValue()).getPath());
56
		assertEquals("hodo", ((HTTPFileArg) iter.next().getObjectValue()).getPath());
57
		assertEquals("", ((HTTPFileArg) iter.next().getObjectValue()).getPath());
58
	}
59
60
	public void testSetHTTPFileArgs() throws Exception {
61
		List newHTTPFileArgs = new LinkedList();
62
		newHTTPFileArgs.add(new HTTPFileArg("hede"));
63
		HTTPFileArgs files = new HTTPFileArgs();
64
		files.setHTTPFileArgs((List) newHTTPFileArgs);
65
		assertEquals(1, files.getHTTPFileArgCount());
66
		assertEquals("hede", ((HTTPFileArg) files.iterator().next().getObjectValue()).getPath());
67
	}
68
69
	public void testRemoving() throws Exception {
70
		HTTPFileArgs files = new HTTPFileArgs();
71
		assertEquals(0, files.getHTTPFileArgCount());
72
		files.addHTTPFileArg("hede");
73
		assertEquals(1, files.getHTTPFileArgCount());
74
		files.clear();
75
		assertEquals(0, files.getHTTPFileArgCount());
76
		files.addHTTPFileArg("file1");
77
		files.addHTTPFileArg("file2");
78
		files.addHTTPFileArg("file3");
79
		HTTPFileArg file = new HTTPFileArg("file4");
80
		files.addHTTPFileArg(file);
81
		files.addHTTPFileArg("file5");
82
		files.addHTTPFileArg("file6");
83
		assertEquals(6, files.getHTTPFileArgCount());
84
		files.removeHTTPFileArg("file3");
85
		assertEquals(5, files.getHTTPFileArgCount());
86
		PropertyIterator iter = files.iterator();
87
		assertEquals("file1", ((HTTPFileArg) iter.next().getObjectValue()).getPath());
88
		assertEquals("file2", ((HTTPFileArg) iter.next().getObjectValue()).getPath());
89
		assertEquals("file4", ((HTTPFileArg) iter.next().getObjectValue()).getPath());
90
		assertEquals("file5", ((HTTPFileArg) iter.next().getObjectValue()).getPath());
91
		assertEquals("file6", ((HTTPFileArg) iter.next().getObjectValue()).getPath());
92
		files.removeHTTPFileArg(file);
93
		assertEquals(4, files.getHTTPFileArgCount());
94
		iter = files.iterator();
95
		assertEquals("file1", ((HTTPFileArg) iter.next().getObjectValue()).getPath());
96
		assertEquals("file2", ((HTTPFileArg) iter.next().getObjectValue()).getPath());
97
		assertEquals("file5", ((HTTPFileArg) iter.next().getObjectValue()).getPath());
98
		assertEquals("file6", ((HTTPFileArg) iter.next().getObjectValue()).getPath());
99
		files.removeHTTPFileArg(new HTTPFileArg("file5"));
100
		assertEquals(3, files.getHTTPFileArgCount());
101
		iter = files.iterator();
102
		assertEquals("file1", ((HTTPFileArg) iter.next().getObjectValue()).getPath());
103
		assertEquals("file2", ((HTTPFileArg) iter.next().getObjectValue()).getPath());
104
		assertEquals("file6", ((HTTPFileArg) iter.next().getObjectValue()).getPath());
105
		files.removeHTTPFileArg(1);
106
		assertEquals(2, files.getHTTPFileArgCount());
107
		iter = files.iterator();
108
		assertEquals("file1", ((HTTPFileArg) iter.next().getObjectValue()).getPath());
109
		assertEquals("file6", ((HTTPFileArg) iter.next().getObjectValue()).getPath());
110
		files.removeAllHTTPFileArgs();
111
		assertEquals(0, files.getHTTPFileArgCount());
112
	}
113
114
	public void testToString() throws Exception {
115
		HTTPFileArgs files = new HTTPFileArgs();
116
		files.addHTTPFileArg("file1");
117
		files.addHTTPFileArg("file2");
118
		files.addHTTPFileArg("file3");
119
		assertEquals("file1&file2&file3", files.toString());
120
	}
121
}
(-)src/protocol/http/org/apache/jmeter/protocol/http/proxy/HttpRequestHdr.java (-3 / +1 lines)
Lines 418-426 Link Here
418
                // Set the form data
418
                // Set the form data
419
                sampler.setArguments(urlConfig.getArguments());
419
                sampler.setArguments(urlConfig.getArguments());
420
                // Set the file uploads
420
                // Set the file uploads
421
                sampler.setFileField(urlConfig.getFileFieldName());
421
                sampler.setHTTPFileArgs(urlConfig.getHTTPFileArgs());
422
                sampler.setFilename(urlConfig.getFilename());
423
                sampler.setMimetype(urlConfig.getMimeType());
424
            } else if (postData.trim().startsWith("<?")) {
422
            } else if (postData.trim().startsWith("<?")) {
425
                // Not sure if this is needed anymore. I assume these requests
423
                // Not sure if this is needed anymore. I assume these requests
426
                // do not have HTTPConstants.APPLICATION_X_WWW_FORM_URLENCODED as content type,
424
                // do not have HTTPConstants.APPLICATION_X_WWW_FORM_URLENCODED as content type,
(-)src/protocol/http/org/apache/jmeter/protocol/http/sampler/PutWriter.java (-5 / +11 lines)
Lines 25-30 Link Here
25
25
26
import org.apache.jmeter.protocol.http.util.HTTPArgument;
26
import org.apache.jmeter.protocol.http.util.HTTPArgument;
27
import org.apache.jmeter.protocol.http.util.HTTPConstants;
27
import org.apache.jmeter.protocol.http.util.HTTPConstants;
28
import org.apache.jmeter.protocol.http.util.HTTPFileArg;
28
import org.apache.jmeter.testelement.property.PropertyIterator;
29
import org.apache.jmeter.testelement.property.PropertyIterator;
29
30
30
/**
31
/**
Lines 54-71 Link Here
54
        String contentTypeHeader = connection.getRequestProperty(HTTPConstants.HEADER_CONTENT_TYPE);
55
        String contentTypeHeader = connection.getRequestProperty(HTTPConstants.HEADER_CONTENT_TYPE);
55
        boolean hasContentTypeHeader = contentTypeHeader != null && contentTypeHeader.length() > 0; 
56
        boolean hasContentTypeHeader = contentTypeHeader != null && contentTypeHeader.length() > 0; 
56
57
58
        HTTPFileArg file = sampler.getFirstHTTPFileArg();
57
        // If there are no arguments, we can send a file as the body of the request
59
        // If there are no arguments, we can send a file as the body of the request
60
        // TODO: needs a multiple file upload scenerio
58
        if(sampler.getArguments() != null && sampler.getArguments().getArgumentCount() == 0 && sampler.getSendFileAsPostBody()) {
61
        if(sampler.getArguments() != null && sampler.getArguments().getArgumentCount() == 0 && sampler.getSendFileAsPostBody()) {
62
            // If getSendFileAsPostBody returned true, it's sure that file is not null
59
            hasPutBody = true;
63
            hasPutBody = true;
60
            if(!hasContentTypeHeader) {
64
            if(!hasContentTypeHeader) {
61
                // Allow the mimetype of the file to control the content type
65
                // Allow the mimetype of the file to control the content type
62
                if(sampler.getMimetype() != null && sampler.getMimetype().length() > 0) {
66
                if(file.getMimeType() != null && file.getMimeType().length() > 0) {
63
                    connection.setRequestProperty(HTTPConstants.HEADER_CONTENT_TYPE, sampler.getMimetype());
67
                    connection.setRequestProperty(HTTPConstants.HEADER_CONTENT_TYPE, file.getMimeType());
64
                }
68
                }
65
            }
69
            }
66
70
67
            // Create the content length we are going to write
71
            // Create the content length we are going to write
68
            File inputFile = new File(sampler.getFilename());
72
            File inputFile = new File(file.getPath());
69
            contentLength = inputFile.length();
73
            contentLength = inputFile.length();
70
        }
74
        }
71
        else if(sampler.getSendParameterValuesAsPostBody()) {
75
        else if(sampler.getSendParameterValuesAsPostBody()) {
Lines 73-80 Link Here
73
            // Allow the mimetype of the file to control the content type
77
            // Allow the mimetype of the file to control the content type
74
            // This is not obvious in GUI if you are not uploading any files,
78
            // This is not obvious in GUI if you are not uploading any files,
75
            // but just sending the content of nameless parameters
79
            // but just sending the content of nameless parameters
76
            if(!hasContentTypeHeader && sampler.getMimetype() != null && sampler.getMimetype().length() > 0) {
80
            // TODO: needs a multiple file upload scenerio
77
                connection.setRequestProperty(HTTPConstants.HEADER_CONTENT_TYPE, sampler.getMimetype());
81
            if(!hasContentTypeHeader && sampler.getHTTPFileArgCount() == 1
82
               && file != null && file.getMimeType() != null && file.getMimeType().length() > 0) {
83
                connection.setRequestProperty(HTTPConstants.HEADER_CONTENT_TYPE, file.getMimeType());
78
            }
84
            }
79
85
80
            // We create the post body content now, so we know the size
86
            // We create the post body content now, so we know the size
(-)src/protocol/http/org/apache/jmeter/protocol/http/sampler/PostWriter.java (-41 / +64 lines)
Lines 30-36 Link Here
30
30
31
import org.apache.jmeter.protocol.http.util.HTTPArgument;
31
import org.apache.jmeter.protocol.http.util.HTTPArgument;
32
import org.apache.jmeter.protocol.http.util.HTTPConstants;
32
import org.apache.jmeter.protocol.http.util.HTTPConstants;
33
import org.apache.jmeter.protocol.http.util.HTTPFileArg;
33
import org.apache.jmeter.testelement.property.PropertyIterator;
34
import org.apache.jmeter.testelement.property.PropertyIterator;
35
import org.apache.jmeter.testelement.property.CollectionProperty;
34
36
35
/**
37
/**
36
 * Class for setting the necessary headers for a POST request, and sending the
38
 * Class for setting the necessary headers for a POST request, and sending the
Lines 52-59 Link Here
52
    protected byte[] formDataUrlEncoded;    
54
    protected byte[] formDataUrlEncoded;    
53
    /** The form data that is going to be sent in post body */
55
    /** The form data that is going to be sent in post body */
54
    protected byte[] formDataPostBody;
56
    protected byte[] formDataPostBody;
55
    /** The start of the file multipart to be sent */
56
    private byte[] formDataFileStartMultipart;
57
    /** The boundary string for multipart */
57
    /** The boundary string for multipart */
58
    private final String boundary;
58
    private final String boundary;
59
    
59
    
Lines 84-90 Link Here
84
	public String sendPostData(URLConnection connection, HTTPSampler sampler) throws IOException {
84
	public String sendPostData(URLConnection connection, HTTPSampler sampler) throws IOException {
85
        // Buffer to hold the post body, except file content
85
        // Buffer to hold the post body, except file content
86
        StringBuffer postedBody = new StringBuffer(1000);
86
        StringBuffer postedBody = new StringBuffer(1000);
87
        
87
        CollectionProperty files = sampler.getHTTPFileArgsCollection();
88
88
        // Check if we should do a multipart/form-data or an
89
        // Check if we should do a multipart/form-data or an
89
        // application/x-www-form-urlencoded post request
90
        // application/x-www-form-urlencoded post request
90
        if(sampler.getUseMultipartForPost()) {
91
        if(sampler.getUseMultipartForPost()) {
Lines 98-121 Link Here
98
            postedBody.append(new String(formDataPostBody, "UTF-8")); // $NON-NLS-1$
99
            postedBody.append(new String(formDataPostBody, "UTF-8")); // $NON-NLS-1$
99
            
100
            
100
            // Add any files
101
            // Add any files
101
            if(sampler.hasUploadableFiles()) {
102
            if(files.size() > 0) {
102
                // First write the start multipart file
103
                PropertyIterator iter = files.iterator();
103
                out.write(formDataFileStartMultipart);
104
                while (iter.hasNext()) {
104
                // We get the posted bytes as UTF-8, since java is using UTF-8
105
                    HTTPFileArg file = (HTTPFileArg) iter.next().getObjectValue();
105
                postedBody.append(new String(formDataFileStartMultipart, "UTF-8")); // $NON-NLS-1$
106
                    // First write the start multipart file
106
                
107
                    byte[] header = file.getHeader().getBytes();
107
                // Write the actual file content
108
                    out.write(header);
108
                writeFileToStream(sampler.getFilename(), out);
109
                    // We get the posted bytes as UTF-8, since java is using UTF-8
109
                // We just add placeholder text for file content
110
                    postedBody.append(new String(header, "UTF-8")); // $NON-NLS-1$
110
                postedBody.append("<actual file content, not shown here>"); // $NON-NLS-1$
111
                    // Write the actual file content
111
112
                    writeFileToStream(file.getPath(), out);
112
                // Write the end of multipart file
113
                    // We just add placeholder text for file content
113
                byte[] fileMultipartEndDivider = getFileMultipartEndDivider(); 
114
                    postedBody.append("<actual file content, not shown here>"); // $NON-NLS-1$
114
                out.write(fileMultipartEndDivider);
115
                    // Write the end of multipart file
115
                // We get the posted bytes as UTF-8, since java is using UTF-8
116
                    byte[] fileMultipartEndDivider = getFileMultipartEndDivider();
116
                postedBody.append(new String(fileMultipartEndDivider, "UTF-8")); // $NON-NLS-1$
117
                    out.write(fileMultipartEndDivider);
118
                    // We get the posted bytes as UTF-8, since java is using UTF-8
119
                    postedBody.append(new String(fileMultipartEndDivider, "UTF-8")); // $NON-NLS-1$
120
                    if(iter.hasNext()) {
121
                        out.write(CRLF);
122
                        postedBody.append(new String(CRLF, "UTF-8"));
123
                    }
124
                }
117
            }
125
            }
118
119
            // Write end of multipart
126
            // Write end of multipart
120
            byte[] multipartEndDivider = getMultipartEndDivider(); 
127
            byte[] multipartEndDivider = getMultipartEndDivider(); 
121
            out.write(multipartEndDivider);
128
            out.write(multipartEndDivider);
Lines 129-135 Link Here
129
            // If there are no arguments, we can send a file as the body of the request
136
            // If there are no arguments, we can send a file as the body of the request
130
            if(sampler.getArguments() != null && !sampler.hasArguments() && sampler.getSendFileAsPostBody()) {
137
            if(sampler.getArguments() != null && !sampler.hasArguments() && sampler.getSendFileAsPostBody()) {
131
                OutputStream out = connection.getOutputStream();
138
                OutputStream out = connection.getOutputStream();
132
                writeFileToStream(sampler.getFilename(), out);
139
                // we're sure that there is one file because of
140
                // getSendFileAsPostBody method's return value.
141
                HTTPFileArg file = sampler.getFirstHTTPFileArg();
142
                writeFileToStream(file.getPath(), out);
133
                out.flush();
143
                out.flush();
134
                out.close();
144
                out.close();
135
145
Lines 158-164 Link Here
158
            contentEncoding = ENCODING;
168
            contentEncoding = ENCODING;
159
        }
169
        }
160
        long contentLength = 0L;
170
        long contentLength = 0L;
161
    	
171
        CollectionProperty files = sampler.getHTTPFileArgsCollection();
172
162
        // Check if we should do a multipart/form-data or an
173
        // Check if we should do a multipart/form-data or an
163
        // application/x-www-form-urlencoded post request
174
        // application/x-www-form-urlencoded post request
164
        if(sampler.getUseMultipartForPost()) {
175
        if(sampler.getUseMultipartForPost()) {
Lines 199-217 Link Here
199
            // Now we just construct any multipart for the files
210
            // Now we just construct any multipart for the files
200
            // We only construct the file multipart start, we do not write
211
            // We only construct the file multipart start, we do not write
201
            // the actual file content
212
            // the actual file content
202
            if(sampler.hasUploadableFiles()) {
213
            if(files.size() > 0) {
203
                bos = new ByteArrayOutputStream();
214
                PropertyIterator iter = files.iterator();
204
                // Write multipart for file
215
                while (iter.hasNext()) {
205
                writeStartFileMultipart(bos, sampler.getFilename(), sampler.getFileField(), sampler.getMimetype());
216
                    HTTPFileArg file = (HTTPFileArg) iter.next().getObjectValue();
206
                bos.flush();
217
                    // Write multipart for file
207
                formDataFileStartMultipart = bos.toByteArray();
218
                    bos = new ByteArrayOutputStream();
208
                bos.close();
219
                    writeStartFileMultipart(bos, file.getPath(), file.getParamName(), file.getMimeType());
209
                contentLength += formDataFileStartMultipart.length;
220
                    bos.flush();
210
                // Add also the length of the file content
221
                    String header = bos.toString();
211
                File uploadFile = new File(sampler.getFilename());
222
                    file.setHeader(header);
212
                contentLength += uploadFile.length();
223
                    bos.close();
213
                // And the end of the file multipart
224
                    contentLength += header.length();
214
                contentLength += getFileMultipartEndDivider().length;
225
                    // Add also the length of the file content
226
                    File uploadFile = new File(file.getPath());
227
                    contentLength += uploadFile.length();
228
                    // And the end of the file multipart
229
                    contentLength += getFileMultipartEndDivider().length;
230
                    if(iter.hasNext()) {
231
                        contentLength += CRLF.length;
232
                    }
233
                }
215
            }
234
            }
216
235
217
            // Add the end of multipart
236
            // Add the end of multipart
Lines 232-249 Link Here
232
            
251
            
233
            // If there are no arguments, we can send a file as the body of the request
252
            // If there are no arguments, we can send a file as the body of the request
234
            if(sampler.getArguments() != null && sampler.getArguments().getArgumentCount() == 0 && sampler.getSendFileAsPostBody()) {
253
            if(sampler.getArguments() != null && sampler.getArguments().getArgumentCount() == 0 && sampler.getSendFileAsPostBody()) {
254
                // we're sure that there is one file because of
255
                // getSendFileAsPostBody method's return value.
256
                HTTPFileArg file = sampler.getFirstHTTPFileArg();
235
                if(!hasContentTypeHeader) {
257
                if(!hasContentTypeHeader) {
236
                    // Allow the mimetype of the file to control the content type
258
                    // Allow the mimetype of the file to control the content type
237
                    if(sampler.getMimetype() != null && sampler.getMimetype().length() > 0) {
259
                    if(file.getMimeType() != null && file.getMimeType().length() > 0) {
238
                        connection.setRequestProperty(HTTPConstants.HEADER_CONTENT_TYPE, sampler.getMimetype());
260
                        connection.setRequestProperty(HTTPConstants.HEADER_CONTENT_TYPE, file.getMimeType());
239
                    }
261
                    }
240
                    else {
262
                    else {
241
                        connection.setRequestProperty(HTTPConstants.HEADER_CONTENT_TYPE, HTTPConstants.APPLICATION_X_WWW_FORM_URLENCODED);
263
                        connection.setRequestProperty(HTTPConstants.HEADER_CONTENT_TYPE, HTTPConstants.APPLICATION_X_WWW_FORM_URLENCODED);
242
                    }
264
                    }
243
                }
265
                }
244
                
245
                // Create the content length we are going to write
266
                // Create the content length we are going to write
246
                File inputFile = new File(sampler.getFilename());
267
                File inputFile = new File(file.getPath());
247
                contentLength = inputFile.length();
268
                contentLength = inputFile.length();
248
            }
269
            }
249
            else {
270
            else {
Lines 266-274 Link Here
266
                    // Allow the mimetype of the file to control the content type
287
                    // Allow the mimetype of the file to control the content type
267
                    // This is not obvious in GUI if you are not uploading any files,
288
                    // This is not obvious in GUI if you are not uploading any files,
268
                    // but just sending the content of nameless parameters
289
                    // but just sending the content of nameless parameters
290
                    // TODO: needs a multiple file upload scenerio
269
                    if(!hasContentTypeHeader) {
291
                    if(!hasContentTypeHeader) {
270
                        if(sampler.getMimetype() != null && sampler.getMimetype().length() > 0) {
292
                        HTTPFileArg file = sampler.getFirstHTTPFileArg();
271
                            connection.setRequestProperty(HTTPConstants.HEADER_CONTENT_TYPE, sampler.getMimetype());
293
                        if(file != null && file.getMimeType() != null && file.getMimeType().length() > 0) {
294
                            connection.setRequestProperty(HTTPConstants.HEADER_CONTENT_TYPE, file.getMimeType());
272
                        }
295
                        }
273
                        else {
296
                        else {
274
                            // TODO: is this the correct default?
297
                            // TODO: is this the correct default?
(-)src/protocol/http/org/apache/jmeter/protocol/http/sampler/HTTPSampler2.java (-13 / +23 lines)
Lines 71-76 Link Here
71
import org.apache.jmeter.protocol.http.control.HeaderManager;
71
import org.apache.jmeter.protocol.http.control.HeaderManager;
72
import org.apache.jmeter.protocol.http.util.EncoderCache;
72
import org.apache.jmeter.protocol.http.util.EncoderCache;
73
import org.apache.jmeter.protocol.http.util.HTTPArgument;
73
import org.apache.jmeter.protocol.http.util.HTTPArgument;
74
import org.apache.jmeter.protocol.http.util.HTTPFileArg;
74
import org.apache.jmeter.protocol.http.util.LoopbackHttpClientSocketFactory;
75
import org.apache.jmeter.protocol.http.util.LoopbackHttpClientSocketFactory;
75
import org.apache.jmeter.protocol.http.util.SlowHttpClientSocketFactory;
76
import org.apache.jmeter.protocol.http.util.SlowHttpClientSocketFactory;
76
import org.apache.jmeter.testelement.property.CollectionProperty;
77
import org.apache.jmeter.testelement.property.CollectionProperty;
Lines 287-296 Link Here
287
            }
288
            }
288
            
289
            
289
            // Add any files
290
            // Add any files
290
            if(hasUploadableFiles()) {
291
            PropertyIterator files = getHTTPFileArgsCollection().iterator();
291
                File inputFile = new File(getFilename());
292
            while (files.hasNext()) {
293
                HTTPFileArg file = (HTTPFileArg) files.next().getObjectValue();
294
                File inputFile = new File(file.getPath());
292
                // We do not know the char set of the file to be uploaded, so we set it to null
295
                // We do not know the char set of the file to be uploaded, so we set it to null
293
                ViewableFilePart filePart = new ViewableFilePart(getFileField(), inputFile, getMimetype(), null);
296
                ViewableFilePart filePart = new ViewableFilePart(file.getParamName(), inputFile, file.getMimeType(), null);
294
                filePart.setCharSet(null); // We do not know what the char set of the file is
297
                filePart.setCharSet(null); // We do not know what the char set of the file is
295
                parts[partNo++] = filePart;
298
                parts[partNo++] = filePart;
296
            }
299
            }
Lines 338-357 Link Here
338
            // This allows the user to specify his own content-type for a POST request
341
            // This allows the user to specify his own content-type for a POST request
339
            Header contentTypeHeader = post.getRequestHeader(HEADER_CONTENT_TYPE);
342
            Header contentTypeHeader = post.getRequestHeader(HEADER_CONTENT_TYPE);
340
            boolean hasContentTypeHeader = contentTypeHeader != null && contentTypeHeader.getValue() != null && contentTypeHeader.getValue().length() > 0; 
343
            boolean hasContentTypeHeader = contentTypeHeader != null && contentTypeHeader.getValue() != null && contentTypeHeader.getValue().length() > 0; 
341
344
            HTTPFileArg file = getFirstHTTPFileArg();
342
            // If there are no arguments, we can send a file as the body of the request
345
            // If there are no arguments, we can send a file as the body of the request
346
            // TODO: needs a multiple file upload scenerio
343
            if(!hasArguments() && getSendFileAsPostBody()) {
347
            if(!hasArguments() && getSendFileAsPostBody()) {
348
                // If getSendFileAsPostBody returned true, it's sure that file is not null
344
                if(!hasContentTypeHeader) {
349
                if(!hasContentTypeHeader) {
345
                    // Allow the mimetype of the file to control the content type
350
                    // Allow the mimetype of the file to control the content type
346
                    if(getMimetype() != null && getMimetype().length() > 0) {
351
                    if(file.getMimeType() != null && file.getMimeType().length() > 0) {
347
                        post.setRequestHeader(HEADER_CONTENT_TYPE, getMimetype());
352
                        post.setRequestHeader(HEADER_CONTENT_TYPE, file.getMimeType());
348
                    }
353
                    }
349
                    else {
354
                    else {
350
                        post.setRequestHeader(HEADER_CONTENT_TYPE, APPLICATION_X_WWW_FORM_URLENCODED);
355
                        post.setRequestHeader(HEADER_CONTENT_TYPE, APPLICATION_X_WWW_FORM_URLENCODED);
351
                    }
356
                    }
352
                }
357
                }
353
                
358
354
                FileRequestEntity fileRequestEntity = new FileRequestEntity(new File(getFilename()),null); 
359
                FileRequestEntity fileRequestEntity = new FileRequestEntity(new File(file.getPath()),null);
355
                post.setRequestEntity(fileRequestEntity);
360
                post.setRequestEntity(fileRequestEntity);
356
                
361
                
357
                // We just add placeholder text for file content
362
                // We just add placeholder text for file content
Lines 376-384 Link Here
376
                    // Allow the mimetype of the file to control the content type
381
                    // Allow the mimetype of the file to control the content type
377
                    // This is not obvious in GUI if you are not uploading any files,
382
                    // This is not obvious in GUI if you are not uploading any files,
378
                    // but just sending the content of nameless parameters
383
                    // but just sending the content of nameless parameters
384
                    // TODO: needs a multiple file upload scenerio
379
                    if(!hasContentTypeHeader) {
385
                    if(!hasContentTypeHeader) {
380
                        if(getMimetype() != null && getMimetype().length() > 0) {
386
                        if(file != null && file.getMimeType() != null && file.getMimeType().length() > 0) {
381
                            post.setRequestHeader(HEADER_CONTENT_TYPE, getMimetype());
387
                            post.setRequestHeader(HEADER_CONTENT_TYPE, file.getMimeType());
382
                        }
388
                        }
383
                        else {
389
                        else {
384
                        	 // TODO - is this the correct default?
390
                        	 // TODO - is this the correct default?
Lines 918-929 Link Here
918
        // This allows the user to specify his own content-type for a POST request
924
        // This allows the user to specify his own content-type for a POST request
919
        Header contentTypeHeader = put.getRequestHeader(HEADER_CONTENT_TYPE);
925
        Header contentTypeHeader = put.getRequestHeader(HEADER_CONTENT_TYPE);
920
        boolean hasContentTypeHeader = contentTypeHeader != null && contentTypeHeader.getValue() != null && contentTypeHeader.getValue().length() > 0; 
926
        boolean hasContentTypeHeader = contentTypeHeader != null && contentTypeHeader.getValue() != null && contentTypeHeader.getValue().length() > 0; 
927
        HTTPFileArg file = getFirstHTTPFileArg();
921
928
922
        // If there are no arguments, we can send a file as the body of the request
929
        // If there are no arguments, we can send a file as the body of the request
930
        // TODO: needs a multiple file upload scenerio
923
        if(!hasArguments() && getSendFileAsPostBody()) {
931
        if(!hasArguments() && getSendFileAsPostBody()) {
924
            hasPutBody = true;
932
            hasPutBody = true;
925
                
933
                
926
            FileRequestEntity fileRequestEntity = new FileRequestEntity(new File(getFilename()),null); 
934
            // If getSendFileAsPostBody returned true, it's sure that file is not null
935
            FileRequestEntity fileRequestEntity = new FileRequestEntity(new File(file.getPath()),null);
927
            put.setRequestEntity(fileRequestEntity);
936
            put.setRequestEntity(fileRequestEntity);
928
                
937
                
929
            // We just add placeholder text for file content
938
            // We just add placeholder text for file content
Lines 982-989 Link Here
982
                // Allow the mimetype of the file to control the content type
991
                // Allow the mimetype of the file to control the content type
983
                // This is not obvious in GUI if you are not uploading any files,
992
                // This is not obvious in GUI if you are not uploading any files,
984
                // but just sending the content of nameless parameters
993
                // but just sending the content of nameless parameters
985
                if(getMimetype() != null && getMimetype().length() > 0) {
994
                // TODO: needs a multiple file upload scenerio
986
                    put.setRequestHeader(HEADER_CONTENT_TYPE, getMimetype());
995
                if(file != null && file.getMimeType() != null && file.getMimeType().length() > 0) {
996
                    put.setRequestHeader(HEADER_CONTENT_TYPE, file.getMimeType());
987
                }
997
                }
988
            }
998
            }
989
            // Set the content length
999
            // Set the content length
(-)src/protocol/http/org/apache/jmeter/protocol/http/sampler/HTTPSamplerBase.java (-10 / +165 lines)
Lines 46-51 Link Here
46
import org.apache.jmeter.protocol.http.parser.HTMLParser;
46
import org.apache.jmeter.protocol.http.parser.HTMLParser;
47
import org.apache.jmeter.protocol.http.util.EncoderCache;
47
import org.apache.jmeter.protocol.http.util.EncoderCache;
48
import org.apache.jmeter.protocol.http.util.HTTPArgument;
48
import org.apache.jmeter.protocol.http.util.HTTPArgument;
49
import org.apache.jmeter.protocol.http.util.HTTPFileArg;
50
import org.apache.jmeter.protocol.http.util.HTTPFileArgs;
49
import org.apache.jmeter.protocol.http.util.HTTPConstantsInterface;
51
import org.apache.jmeter.protocol.http.util.HTTPConstantsInterface;
50
import org.apache.jmeter.samplers.AbstractSampler;
52
import org.apache.jmeter.samplers.AbstractSampler;
51
import org.apache.jmeter.samplers.Entry;
53
import org.apache.jmeter.samplers.Entry;
Lines 58-63 Link Here
58
import org.apache.jmeter.testelement.property.JMeterProperty;
60
import org.apache.jmeter.testelement.property.JMeterProperty;
59
import org.apache.jmeter.testelement.property.PropertyIterator;
61
import org.apache.jmeter.testelement.property.PropertyIterator;
60
import org.apache.jmeter.testelement.property.StringProperty;
62
import org.apache.jmeter.testelement.property.StringProperty;
63
import org.apache.jmeter.testelement.property.CollectionProperty;
61
import org.apache.jmeter.testelement.property.TestElementProperty;
64
import org.apache.jmeter.testelement.property.TestElementProperty;
62
import org.apache.jmeter.util.JMeterUtils;
65
import org.apache.jmeter.util.JMeterUtils;
63
import org.apache.jorphan.logging.LoggingManager;
66
import org.apache.jorphan.logging.LoggingManager;
Lines 78-89 Link Here
78
81
79
	public static final String ARGUMENTS = "HTTPsampler.Arguments"; // $NON-NLS-1$
82
	public static final String ARGUMENTS = "HTTPsampler.Arguments"; // $NON-NLS-1$
80
83
84
	public final static String FILE_ARGS = "HTTPsampler.Files"; // $NON-NLS-1$
85
81
	public static final String AUTH_MANAGER = "HTTPSampler.auth_manager"; // $NON-NLS-1$
86
	public static final String AUTH_MANAGER = "HTTPSampler.auth_manager"; // $NON-NLS-1$
82
87
83
	public static final String COOKIE_MANAGER = "HTTPSampler.cookie_manager"; // $NON-NLS-1$
88
	public static final String COOKIE_MANAGER = "HTTPSampler.cookie_manager"; // $NON-NLS-1$
84
89
85
	public static final String HEADER_MANAGER = "HTTPSampler.header_manager"; // $NON-NLS-1$
90
	public static final String HEADER_MANAGER = "HTTPSampler.header_manager"; // $NON-NLS-1$
86
91
92
	//TODO: kept MIMETYPE for backward compatibility with old test
93
	//plans, can be removed after enough time.
87
	public static final String MIMETYPE = "HTTPSampler.mimetype"; // $NON-NLS-1$
94
	public static final String MIMETYPE = "HTTPSampler.mimetype"; // $NON-NLS-1$
88
95
89
	public static final String DOMAIN = "HTTPSampler.domain"; // $NON-NLS-1$
96
	public static final String DOMAIN = "HTTPSampler.domain"; // $NON-NLS-1$
Lines 129-140 Link Here
129
    
136
    
130
	public static final String USE_KEEPALIVE = "HTTPSampler.use_keepalive"; // $NON-NLS-1$
137
	public static final String USE_KEEPALIVE = "HTTPSampler.use_keepalive"; // $NON-NLS-1$
131
138
139
	//TODO: kept FILE_NAME for backward compatibility with old test
140
	//plans, can be removed after enough time.
132
	public static final String FILE_NAME = "HTTPSampler.FILE_NAME"; // $NON-NLS-1$
141
	public static final String FILE_NAME = "HTTPSampler.FILE_NAME"; // $NON-NLS-1$
133
    
142
    
134
    public static final String DO_MULTIPART_POST = "HTTPSampler.DO_MULTIPART_POST"; // $NON-NLS-1$
143
    public static final String DO_MULTIPART_POST = "HTTPSampler.DO_MULTIPART_POST"; // $NON-NLS-1$
135
144
136
    /* Shown as Parameter Name on the GUI */
145
    /* Shown as Parameter Name on the GUI */
137
	public static final String FILE_FIELD = "HTTPSampler.FILE_FIELD"; // $NON-NLS-1$
146
	public static final String FILE_FIELD = "HTTPSampler.FILE_FIELD"; // $NON-NLS-1$
147
	//TODO: kept FILE_FIELD for backward compatibility with old test
148
	//plans, can be removed after enough time.
138
149
139
//	public static final String FILE_DATA = "HTTPSampler.FILE_DATA"; // $NON-NLS-1$
150
//	public static final String FILE_DATA = "HTTPSampler.FILE_DATA"; // $NON-NLS-1$
140
151
Lines 225-258 Link Here
225
    
236
    
226
    public HTTPSamplerBase() {
237
    public HTTPSamplerBase() {
227
		setArguments(new Arguments());
238
		setArguments(new Arguments());
239
		setHTTPFileArgs(new HTTPFileArgs());
228
	}
240
	}
229
241
230
    /**
242
    /**
231
     * The name parameter to be applied to the file
243
     * The name parameter to be applied to the file
232
     */
244
     */
233
	public void setFileField(String value) {
245
	public void setFileField(String value) {
234
		setProperty(FILE_FIELD, value);
246
		setHTTPFileArg("HTTPSamplerBase.setFileField", null, value, null);
247
		setProperty(FILE_FIELD, value); //kept this line to let it possible to create
248
										//backward compatible test plans
235
	}
249
	}
236
250
237
    /**
251
    /**
238
     * The name parameter to be applied to the file
252
     * The name parameter to be applied to the file
239
     */
253
     */
240
	public String getFileField() {
254
	public String getFileField() {
241
		return getPropertyAsString(FILE_FIELD);
255
		HTTPFileArg file = getFirstHTTPFileArg("HTTPSamplerBase.getFileField");
256
		return file != null ? file.getParamName() : null;
242
	}
257
	}
243
258
244
    /**
259
    /**
245
     * The actual name of the file to POST
260
     * The actual name of the file to POST
246
     */
261
     */
247
	public void setFilename(String value) {
262
	public void setFilename(String value) {
248
		setProperty(FILE_NAME, value);
263
		setHTTPFileArg("HTTPSamplerBase.setFilename", value, null, null);
264
		setProperty(FILE_NAME, value); //kept this line to let it
265
									   //possible to create backward
266
									   //compatible test plans
249
	}
267
	}
250
268
251
    /**
269
    /**
252
     * The actual name of the file to POST
270
     * The actual name of the file to POST
253
     */
271
     */
254
	public String getFilename() {
272
	public String getFilename() {
255
		return getPropertyAsString(FILE_NAME);
273
		HTTPFileArg file = getFirstHTTPFileArg("HTTPSamplerBase.getFilename");
274
		return file != null ? file.getPath() : null;
256
	}
275
	}
257
276
258
	/**
277
	/**
Lines 263-272 Link Here
263
	 * i.e. FileField is blank
282
	 * i.e. FileField is blank
264
	 */
283
	 */
265
	public boolean getSendFileAsPostBody() {
284
	public boolean getSendFileAsPostBody() {
266
        // If no file field is specified, the file is sent as post body
285
		// If there is one file with no parameter name, the file will
267
		return getFileField().length()== 0 && getFilename().length() > 0;
286
		// be sent as post body.
287
		HTTPFileArg file = getFirstHTTPFileArg();
288
		return (getHTTPFileArgCount() == 1)
289
			&& (file.getPath() != null && file.getPath().length() > 0)
290
			&& (file.getParamName() == null || file.getParamName().length() == 0);
291
		// NOTE: this method is kept for backward compatibility with
292
		// old file parameter panel. it maybe better to remove this
293
		// future.
268
	}
294
	}
269
    
295
296
	/**
297
	 * adds a new file to be post.
298
	 *
299
	 * @param file
300
	 *			 the new HTTPFileArg object
301
	 */
302
	public void addHTTPFileArg(HTTPFileArg file) {
303
		this.getHTTPFileArgs().addHTTPFileArg(file);
304
	}
305
306
	/**
307
	 * resets files list and adds given HTTPFileArg to the new list.
308
	 *
309
	 * @param file
310
	 *			 the new HTTPFileArg object
311
	 */
312
	public void setHTTPFileArg(HTTPFileArg file) {
313
		HTTPFileArgs files = new HTTPFileArgs();
314
		files.addHTTPFileArg(file);
315
		setHTTPFileArgs(files);
316
	}
317
318
	/**
319
	 * checks file count attached to http request, if there are
320
	 * multiple files logs a warning with given method name, changes
321
	 * first attached file's information with given non null
322
	 * parameters, and removes other files; if there is no file
323
	 * attached, replaces file information with given non null
324
	 * parameters.
325
	 *
326
	 * @param method
327
	 *		method name needed for warning log.
328
	 * @param filePath
329
	 *		give null not to change path information of http file
330
	 *		argument.
331
	 * @param paramName
332
	 *		give null not to change parameter name of http file
333
	 *		argument.
334
	 * @param mimeType
335
	 *		give null not to change mime type of http file
336
	 *		argument.
337
	 */
338
	private void setHTTPFileArg(String method, String filePath, String paramName, String mimeType) {
339
		int fileCount = getHTTPFileArgCount();
340
		if (fileCount > 1) {
341
			logOldMethodCallForMultipleFiles(method);
342
		}
343
		HTTPFileArg file = (fileCount == 0)
344
			? new HTTPFileArg()
345
			: getFirstHTTPFileArg();
346
		if (filePath != null) { file.setPath(filePath); }
347
		if (paramName != null) { file.setParamName(paramName); }
348
		if (mimeType != null) { file.setMimeType(mimeType); }
349
		setHTTPFileArg(file);
350
	}
351
270
    /**
352
    /**
271
     * Determine if none of the parameters have a name, and if that
353
     * Determine if none of the parameters have a name, and if that
272
     * is the case, it means that the parameter values should be sent
354
     * is the case, it means that the parameter values should be sent
Lines 615-620 Link Here
615
		return (Arguments) getProperty(ARGUMENTS).getObjectValue();
697
		return (Arguments) getProperty(ARGUMENTS).getObjectValue();
616
	}
698
	}
617
699
700
	/**
701
	 * Method to set files list to be uploaded.
702
	 *
703
	 * @param value
704
	 *	 HTTPFileArgs object that stores file list to be uploaded.
705
	 */
706
	public void setHTTPFileArgs(HTTPFileArgs value) {
707
		setProperty(new TestElementProperty(FILE_ARGS, value));
708
	}
709
710
	/**
711
	 * Method to get files list to be uploaded.
712
	 */
713
	public HTTPFileArgs getHTTPFileArgs() {
714
		return (HTTPFileArgs) getProperty(FILE_ARGS).getObjectValue();
715
	}
716
618
	public void setAuthManager(AuthManager value) {
717
	public void setAuthManager(AuthManager value) {
619
		AuthManager mgr = getAuthManager();
718
		AuthManager mgr = getAuthManager();
620
		if (mgr != null) {
719
		if (mgr != null) {
Lines 652-662 Link Here
652
	}
751
	}
653
752
654
	public void setMimetype(String value) {
753
	public void setMimetype(String value) {
655
		setProperty(MIMETYPE, value);
754
		setHTTPFileArg("HTTPSamplerBase.setMimetype", null, null, value);
755
		setProperty(MIMETYPE, value); //kept this line to let it
756
									  //possible to create backward
757
									  //compatible test plans
656
	}
758
	}
657
759
658
	public String getMimetype() {
760
	public String getMimetype() {
659
		return getPropertyAsString(MIMETYPE);
761
		HTTPFileArg file = getFirstHTTPFileArg("HTTPSamplerBase.getMimetype");
762
		return file != null ? file.getMimeType() : null;
660
	}
763
	}
661
764
662
	public boolean isImageParser() {
765
	public boolean isImageParser() {
Lines 1321-1329 Link Here
1321
     * Method to tell if the request has any files to be uploaded
1424
     * Method to tell if the request has any files to be uploaded
1322
     */
1425
     */
1323
    protected boolean hasUploadableFiles() {
1426
    protected boolean hasUploadableFiles() {
1324
        return getFilename() != null && getFilename().trim().length() > 0;        
1427
        return getHTTPFileArgCount() > 0;
1325
    }
1428
    }
1326
1429
1430
    /**
1431
     * count of files to be uploaded.
1432
     */
1433
    protected int getHTTPFileArgCount() {
1434
        return getHTTPFileArgsCollection().size();
1435
    }
1436
1437
    /**
1438
     * Method to tell if the request has only one file to upload.
1439
     *
1440
     * @return false for zero or multiple files, true for one file.
1441
     */
1442
    protected boolean hasSingleFileArgument() {
1443
        return getHTTPFileArgCount() == 1;
1444
    }
1445
1446
    /**
1447
     * Method to get files collection to be uploaded.
1448
     */
1449
    protected CollectionProperty getHTTPFileArgsCollection() {
1450
        return this.getHTTPFileArgs().getHTTPFileArgsCollection();
1451
    }
1452
1453
    /**
1454
     * Method to get the first file to be uploaded.
1455
     *
1456
     * @return HTTPFileArg object if there exists any file, null
1457
     * otherwise.
1458
     */
1459
    public HTTPFileArg getFirstHTTPFileArg() {
1460
        return this.getHTTPFileArgs().getHTTPFileArg(0);
1461
    }
1462
1463
    /**
1464
     * Method to get the first file to be uploaded, prints a warning
1465
     * message with given method name if multiple files exist.
1466
     *
1467
     * @return HTTPFileArg object if there exists any file, null
1468
     * otherwise.
1469
     */
1470
    private HTTPFileArg getFirstHTTPFileArg(String method) {
1471
        if (getHTTPFileArgCount() > 1) {
1472
            logOldMethodCallForMultipleFiles(method);
1473
        }
1474
        return getFirstHTTPFileArg();
1475
    }
1476
1477
    private void logOldMethodCallForMultipleFiles(String method) {
1478
            log.warn(method + " method is called "
1479
                     + "while there are multiple files");
1480
    }
1481
1327
    public static String[] getValidMethodsAsArray(){
1482
    public static String[] getValidMethodsAsArray(){
1328
        return (String[]) METHODLIST.toArray(new String[0]);
1483
        return (String[]) METHODLIST.toArray(new String[0]);
1329
    }
1484
    }
(-)src/protocol/http/org/apache/jmeter/protocol/http/sampler/AjpSampler.java (-13 / +9 lines)
Lines 30-35 Link Here
30
import org.apache.jmeter.protocol.http.control.CookieManager;
30
import org.apache.jmeter.protocol.http.control.CookieManager;
31
import org.apache.jmeter.protocol.http.control.Header;
31
import org.apache.jmeter.protocol.http.control.Header;
32
import org.apache.jmeter.protocol.http.control.HeaderManager;
32
import org.apache.jmeter.protocol.http.control.HeaderManager;
33
import org.apache.jmeter.protocol.http.util.HTTPFileArg;
33
import org.apache.jmeter.testelement.property.CollectionProperty;
34
import org.apache.jmeter.testelement.property.CollectionProperty;
34
import org.apache.jmeter.testelement.property.JMeterProperty;
35
import org.apache.jmeter.testelement.property.JMeterProperty;
35
import org.apache.jmeter.testelement.property.PropertyIterator;
36
import org.apache.jmeter.testelement.property.PropertyIterator;
Lines 131-137 Link Here
131
    private void setupConnection(URL url, 
132
    private void setupConnection(URL url, 
132
                 String method,
133
                 String method,
133
                 HTTPSampleResult res) throws IOException {
134
                 HTTPSampleResult res) throws IOException {
134
135
        String host = url.getHost();
135
        String host = url.getHost();
136
        int port = url.getPort();
136
        int port = url.getPort();
137
        if(port <= 0 || port == url.getDefaultPort()) {
137
        if(port <= 0 || port == url.getDefaultPort()) {
Lines 185-196 Link Here
185
        AuthManager auth = getAuthManager();
185
        AuthManager auth = getAuthManager();
186
        int hsz = 1; // Host always
186
        int hsz = 1; // Host always
187
        if(method.equals(POST)) {
187
        if(method.equals(POST)) {
188
            String fn = getFilename();
188
            hsz += (2 + getHTTPFileArgCount());
189
            if(fn != null && fn.trim().length() > 0) {
190
                hsz += 3;
191
            } else {
192
                hsz += 2;
193
            }
194
        }
189
        }
195
        if(headers != null) {
190
        if(headers != null) {
196
            hsz += headers.size();
191
            hsz += headers.size();
Lines 236-250 Link Here
236
        }
231
        }
237
        if(method.equals(POST)) {
232
        if(method.equals(POST)) {
238
            int cl = -1;
233
            int cl = -1;
239
            String fn = getFilename();
234
            //TODO: make it compatible with multiple file upload.
240
            if(fn != null && fn.trim().length() > 0) {
235
            HTTPFileArg file = getFirstHTTPFileArg();
241
                File input = new File(fn);
236
            if(file != null) {
237
                File input = new File(file.getPath());
242
                cl = (int)input.length();
238
                cl = (int)input.length();
243
                body = new FileInputStream(input);
239
                body = new FileInputStream(input);
244
                setString(HEADER_CONTENT_DISPOSITION);
240
                setString(HEADER_CONTENT_DISPOSITION);
245
                setString("form-data; name=\""+encode(getFileField())+
241
                setString("form-data; name=\""+encode(file.getParamName())+
246
                      "\"; filename=\"" + encode(fn) +"\""); //$NON-NLS-1$ //$NON-NLS-2$
242
                      "\"; filename=\"" + encode(file.getPath()) +"\""); //$NON-NLS-1$ //$NON-NLS-2$
247
                String mt = getMimetype();
243
                String mt = file.getMimeType();
248
                hbuf.append(HEADER_CONTENT_TYPE).append(COLON_SPACE).append(mt).append(NEWLINE);
244
                hbuf.append(HEADER_CONTENT_TYPE).append(COLON_SPACE).append(mt).append(NEWLINE);
249
                setInt(0xA007); // content-type
245
                setInt(0xA007); // content-type
250
                setString(mt);
246
                setString(mt);
(-)src/protocol/http/org/apache/jmeter/protocol/http/gui/HTTPFileArgsPanel.java (+536 lines)
Line 0 Link Here
1
/*
2
 * Licensed to the Apache Software Foundation (ASF) under one or more
3
 * contributor license agreements.  See the NOTICE file distributed with
4
 * this work for additional information regarding copyright ownership.
5
 * The ASF licenses this file to You under the Apache License, Version 2.0
6
 * (the "License"); you may not use this file except in compliance with
7
 * the License.  You may obtain a copy of the License at
8
 *
9
 *   http://www.apache.org/licenses/LICENSE-2.0
10
 *
11
 * Unless required by applicable law or agreed to in writing, software
12
 * distributed under the License is distributed on an "AS IS" BASIS,
13
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14
 * See the License for the specific language governing permissions and
15
 * limitations under the License.
16
 *
17
 */
18
19
package org.apache.jmeter.protocol.http.gui;
20
21
import java.io.File;
22
import java.awt.BorderLayout;
23
import java.awt.Color;
24
import java.awt.Component;
25
import java.awt.FlowLayout;
26
import java.awt.event.ActionEvent;
27
import java.awt.event.ActionListener;
28
import java.util.Collection;
29
import java.util.Iterator;
30
31
import javax.swing.JFileChooser;
32
import javax.swing.BorderFactory;
33
import javax.swing.Box;
34
import javax.swing.JButton;
35
import javax.swing.JLabel;
36
import javax.swing.JPanel;
37
import javax.swing.JTable;
38
import javax.swing.ListSelectionModel;
39
import javax.swing.table.TableCellEditor;
40
import javax.swing.table.TableColumn;
41
42
import org.apache.jmeter.config.gui.AbstractConfigGui;
43
import org.apache.jmeter.protocol.http.util.HTTPFileArg;
44
import org.apache.jmeter.protocol.http.util.HTTPFileArgs;
45
import org.apache.jmeter.testelement.TestElement;
46
import org.apache.jmeter.testelement.property.PropertyIterator;
47
import org.apache.jmeter.util.JMeterUtils;
48
import org.apache.jorphan.gui.ObjectTableModel;
49
import org.apache.jmeter.gui.util.FileDialoger;
50
import org.apache.jorphan.reflect.Functor;
51
52
/**
53
 * A GUI panel allowing the user to enter file information for http
54
 * upload.
55
 *
56
 * @author Erhan Kesken
57
 */
58
public class HTTPFileArgsPanel extends AbstractConfigGui implements ActionListener {
59
60
	/** The title label for this component. */
61
	private JLabel tableLabel;
62
63
	/** The table containing the list of files. */
64
	private transient JTable table;
65
66
	/** The model for the files table. */
67
	protected transient ObjectTableModel tableModel;
68
69
	/** A button for adding new files to the table. */
70
	private JButton add;
71
72
	/** A button for browsing file system to set path of selected row in table. */
73
	private JButton browse;
74
75
	/** A button for removing files from the table. */
76
	private JButton delete;
77
78
	/**
79
	 * Added background support for reporting tool
80
	 */
81
	private Color background;
82
83
	/**
84
	 * Boolean indicating whether this component is a standalone component or it
85
	 * is intended to be used as a subpanel for another component.
86
	 */
87
	private boolean standalone = true;
88
89
	/** Command for adding a row to the table. */
90
	private static final String ADD = "add"; // $NON-NLS-1$
91
92
	/** Command for browsing filesystem to set path of selected row in table. */
93
	private static final String BROWSE = "browse"; // $NON-NLS-1$
94
95
	/** Command for removing a row from the table. */
96
	private static final String DELETE = "delete"; // $NON-NLS-1$
97
98
	public static final String FILEPATH = JMeterUtils.getResString("send_file_filename_label"); // $NON-NLS-1$
99
100
	/** The parameter name column title of file table. */
101
	private static final String PARAMNAME = JMeterUtils.getResString("send_file_param_name_label"); //$NON-NLS-1$
102
103
	/** The mime type column title of file table. */
104
	private static final String MIMETYPE = JMeterUtils.getResString("send_file_mime_label"); //$NON-NLS-1$
105
106
	/**
107
	 * Standalone Constructor.
108
	 *
109
	 * Sets panel title to the string matches with
110
	 * user_defined_variables resource.
111
	 */
112
	public HTTPFileArgsPanel() {
113
		tableLabel = new JLabel(JMeterUtils.getResString("user_defined_variables")); // $NON-NLS-1$
114
		standalone = true;
115
		init();
116
	}
117
118
	/**
119
	 * Create a new HTTPFileArgsPanel as an embedded component, using the
120
	 * specified title.
121
	 *
122
	 * @param label
123
	 *	the title for the component.
124
	 */
125
	public HTTPFileArgsPanel(String label) {
126
		tableLabel = new JLabel(label);
127
		standalone = false;
128
		init();
129
	}
130
131
	/**
132
	 * Create a new HTTPFileArgsPanel with a border and color background.
133
	 *
134
	 * @param label text for label
135
	 * @param bkg background colour
136
	 */
137
	public HTTPFileArgsPanel(String label, Color bkg) {
138
		tableLabel = new JLabel(label);
139
		this.background = bkg;
140
		standalone = false;
141
		init();
142
	}
143
144
	/**
145
	 * This is the list of menu categories this gui component will be
146
	 * available under.
147
	 *
148
	 * @return a Collection of Strings, where each element is one of the
149
	 *	constants defined in MenuFactory
150
	 */
151
	public Collection getMenuCategories() {
152
		if (standalone) {
153
			return super.getMenuCategories();
154
		}
155
		return null;
156
	}
157
158
	public String getLabelResource() {
159
		return "user_defined_variables";
160
		// TODO: need to edit
161
		// 'xdocs/usermanual/component_reference.xml' first to be able
162
		// to use a specific label resource without breaking unit
163
		// tests.
164
	}
165
166
	/**
167
	 * Initialize the table model used for the http files table.
168
	 */
169
	protected void initializeTableModel() {
170
		tableModel = new ObjectTableModel(new String[] {
171
				FILEPATH, PARAMNAME, MIMETYPE},
172
			HTTPFileArg.class,
173
			new Functor[] {
174
				new Functor("getPath"), //$NON-NLS-1$
175
				new Functor("getParamName"), //$NON-NLS-1$
176
				new Functor("getMimeType")}, //$NON-NLS-1$
177
			new Functor[] {
178
				new Functor("setPath"), //$NON-NLS-1$
179
				new Functor("setParamName"), //$NON-NLS-1$
180
				new Functor("setMimeType")}, //$NON-NLS-1$
181
			new Class[] {String.class, String.class, String.class});
182
	}
183
184
	public static boolean testFunctors(){
185
		HTTPFileArgsPanel instance = new HTTPFileArgsPanel();
186
		instance.initializeTableModel();
187
		return instance.tableModel.checkFunctors(null,instance.getClass());
188
	}
189
190
	/**
191
	 * Resize the table columns to appropriate widths.
192
	 *
193
	 * @param table
194
	 *	the table to resize columns for
195
	 */
196
	protected void sizeColumns(JTable table) {
197
		int resizeMode = table.getAutoResizeMode();
198
		table.setAutoResizeMode(JTable.AUTO_RESIZE_OFF);
199
		fixSize(table.getColumn(PARAMNAME));
200
		fixSize(table.getColumn(MIMETYPE));
201
		table.setAutoResizeMode(resizeMode);
202
	}
203
204
	/**
205
	 * Resize the table column to a fixed size.
206
	 *
207
	 * @param column
208
	 *	the column whose size will be fixed
209
	 */
210
	private void fixSize(TableColumn column) {
211
		column.sizeWidthToFit();
212
		column.setMaxWidth((int) (column.getWidth() * 2));
213
		column.setWidth(column.getMaxWidth());
214
		column.setResizable(false);
215
	}
216
217
	/* Implements JMeterGUIComponent.createTestElement() */
218
	public TestElement createTestElement() {
219
		stopTableEditing();
220
		Iterator modelData = tableModel.iterator();
221
		HTTPFileArgs files = new HTTPFileArgs();
222
		while (modelData.hasNext()) {
223
			HTTPFileArg file = (HTTPFileArg) modelData.next();
224
			files.addHTTPFileArg(file);
225
		}
226
		this.modifyTestElement(files);
227
		return (TestElement) files.clone();
228
	}
229
230
	/* Implements JMeterGUIComponent.modifyTestElement(TestElement) */
231
	public void modifyTestElement(TestElement args) {
232
		this.configureTestElement(args);
233
	}
234
235
	/**
236
	 * A newly created component can be initialized with the contents of a Test
237
	 * Element object by calling this method. The component is responsible for
238
	 * querying the Test Element object for the relevant information to display
239
	 * in its GUI.
240
	 *
241
	 * @param el
242
	 *	the TestElement to configure
243
	 */
244
	public void configure(TestElement el) {
245
		super.configure(el);
246
		if(el instanceof HTTPFileArgs) {
247
			tableModel.clearData();
248
			PropertyIterator iter = ((HTTPFileArgs) el).getHTTPFileArgsCollection().iterator();
249
			while (iter.hasNext()) {
250
				HTTPFileArg file = (HTTPFileArg) iter.next().getObjectValue();
251
				tableModel.addRow(file);
252
			}
253
		}
254
		checkDeleteAndBrowseStatus();
255
	}
256
257
	/**
258
	 * Get the table used to enter files.
259
	 *
260
	 * @return the table used to enter files
261
	 */
262
	protected JTable getTable() {
263
		return table;
264
	}
265
266
	/**
267
	 * Get the title label for this component.
268
	 *
269
	 * @return the title label displayed with the table
270
	 */
271
	protected JLabel getTableLabel() {
272
		return tableLabel;
273
	}
274
275
	/**
276
	 * Get the button used to delete rows from the table.
277
	 *
278
	 * @return the button used to delete rows from the table
279
	 */
280
	protected JButton getDeleteButton() {
281
		return delete;
282
	}
283
284
	/**
285
	 * Get the button used to add rows to the table.
286
	 *
287
	 * @return the button used to add rows to the table
288
	 */
289
	protected JButton getAddButton() {
290
		return add;
291
	}
292
293
	/**
294
	 * Get the button used to browse file system to select a file to
295
	 * set selected row's path.
296
	 *
297
	 * @return the button used to add rows to the table
298
	 */
299
	protected JButton getBrowseButton() {
300
		return browse;
301
	}
302
303
	/**
304
	 * Enable or disable the delete button depending on whether or not there is
305
	 * a row to be deleted.
306
	 */
307
	protected void checkDeleteAndBrowseStatus() {
308
		// Disable DELETE and BROWSE buttons if there are no rows in
309
		// the table to delete.
310
		if (tableModel.getRowCount() == 0) {
311
			browse.setEnabled(false);
312
			delete.setEnabled(false);
313
		} else {
314
			browse.setEnabled(true);
315
			delete.setEnabled(true);
316
		}
317
	}
318
319
	public void clearGui(){
320
		super.clearGui();
321
		clear();
322
	}
323
324
	/**
325
	 * Clear all rows from the table.
326
	 */
327
	public void clear() {
328
		stopTableEditing();
329
		tableModel.clearData();
330
	}
331
332
	/**
333
	 * Invoked when an action occurs. This implementation supports the add and
334
	 * delete buttons.
335
	 *
336
	 * @param e
337
	 *	the event that has occurred
338
	 */
339
	public void actionPerformed(ActionEvent e) {
340
		String action = e.getActionCommand();
341
		if (action.equals(ADD)) {
342
			addFile("");
343
		}
344
		runCommandOnSelectedFile(action);
345
	}
346
347
	/**
348
	 * runs specified command on currently selected file.
349
	 *
350
	 * @param command specifies which process will be done on selected
351
	 * file. it's coming from action command currently catched by
352
	 * action listener.
353
	 *
354
	 * @see runCommandOnRow
355
	 */
356
	private void runCommandOnSelectedFile(String command) {
357
		// If a table cell is being edited, we must cancel the editing before
358
		// deleting the row
359
		if (table.isEditing()) {
360
			TableCellEditor cellEditor = table.getCellEditor(table.getEditingRow(), table.getEditingColumn());
361
			cellEditor.cancelCellEditing();
362
		}
363
		int rowSelected = table.getSelectedRow();
364
		if (rowSelected >= 0) {
365
			runCommandOnRow(command, rowSelected);
366
			tableModel.fireTableDataChanged();
367
			// Disable DELETE and BROWSE if there are no rows in the table to delete.
368
			checkDeleteAndBrowseStatus();
369
			// Table still contains one or more rows, so highlight (select)
370
			// the appropriate one.
371
			if (tableModel.getRowCount() != 0) {
372
				int rowToSelect = rowSelected;
373
				if (rowSelected >= tableModel.getRowCount()) {
374
					rowToSelect = rowSelected - 1;
375
				}
376
				table.setRowSelectionInterval(rowToSelect, rowToSelect);
377
			}
378
		}
379
	}
380
381
	/**
382
	 * runs specified command on currently selected table row.
383
	 *
384
	 * @param command specifies which process will be done on selected
385
	 * file. it's coming from action command currently catched by
386
	 * action listener.
387
	 *
388
	 * @param rowSelected index of selected row.
389
	 */
390
	private void runCommandOnRow(String command, int rowSelected) {
391
		if (DELETE.equals(command)) {
392
			tableModel.removeRow(rowSelected);
393
		} else if (BROWSE.equals(command)) {
394
			String path = browseAndGetFilePath();
395
			tableModel.setValueAt(path, rowSelected, 0);
396
		}
397
	}
398
399
	/**
400
	 * Add a new file row to the table.
401
	 */
402
	protected void addFile(String path) {
403
		// If a table cell is being edited, we should accept the current value
404
		// and stop the editing before adding a new row.
405
		stopTableEditing();
406
407
		tableModel.addRow(new HTTPFileArg(path));
408
409
		// Enable DELETE (which may already be enabled, but it won't hurt)
410
		delete.setEnabled(true);
411
		browse.setEnabled(true);
412
413
		// Highlight (select) the appropriate row.
414
		int rowToSelect = tableModel.getRowCount() - 1;
415
		table.setRowSelectionInterval(rowToSelect, rowToSelect);
416
	}
417
418
	/**
419
	 * opens a dialog box to choose a file and returns selected file's
420
	 * path.
421
	 *
422
	 * @return a new File object
423
	 */
424
	private String browseAndGetFilePath() {
425
		String path = "";
426
		JFileChooser chooser = FileDialoger.promptToOpenFile();
427
		if (chooser != null) {
428
			File file = chooser.getSelectedFile();
429
			if (file != null) {
430
				path = file.getPath();
431
			}
432
		}
433
		return path;
434
	}
435
436
	/**
437
	 * Stop any editing that is currently being done on the table. This will
438
	 * save any changes that have already been made.
439
	 */
440
	protected void stopTableEditing() {
441
		if (table.isEditing()) {
442
			TableCellEditor cellEditor = table.getCellEditor(table.getEditingRow(), table.getEditingColumn());
443
			cellEditor.stopCellEditing();
444
		}
445
	}
446
447
	/**
448
	 * Create the main GUI panel which contains the file table.
449
	 *
450
	 * @return the main GUI panel
451
	 */
452
	private Component makeMainPanel() {
453
		initializeTableModel();
454
		table = new JTable(tableModel);
455
		table.setSelectionMode(ListSelectionModel.SINGLE_SELECTION);
456
		if (this.background != null) {
457
			table.setBackground(this.background);
458
		}
459
		return makeScrollPane(table);
460
	}
461
462
	/**
463
	 * Create a panel containing the title label for the table.
464
	 *
465
	 * @return a panel containing the title label
466
	 */
467
	protected Component makeLabelPanel() {
468
		JPanel labelPanel = new JPanel(new FlowLayout(FlowLayout.CENTER));
469
		labelPanel.add(tableLabel);
470
		if (this.background != null) {
471
			labelPanel.setBackground(this.background);
472
		}
473
		return labelPanel;
474
	}
475
476
	/**
477
	 * Create a panel containing the add and delete buttons.
478
	 *
479
	 * @return a GUI panel containing the buttons
480
	 */
481
	private JPanel makeButtonPanel() {
482
		add = new JButton(JMeterUtils.getResString("add")); // $NON-NLS-1$
483
		add.setActionCommand(ADD);
484
		add.setEnabled(true);
485
486
		browse = new JButton(JMeterUtils.getResString("browse")); // $NON-NLS-1$
487
		browse.setActionCommand(BROWSE);
488
489
		delete = new JButton(JMeterUtils.getResString("delete")); // $NON-NLS-1$
490
		delete.setActionCommand(DELETE);
491
492
		checkDeleteAndBrowseStatus();
493
494
		JPanel buttonPanel = new JPanel();
495
		buttonPanel.setBorder(BorderFactory.createEmptyBorder(0, 10, 0, 10));
496
		if (this.background != null) {
497
			buttonPanel.setBackground(this.background);
498
		}
499
		add.addActionListener(this);
500
		browse.addActionListener(this);
501
		delete.addActionListener(this);
502
		buttonPanel.add(add);
503
		buttonPanel.add(browse);
504
		buttonPanel.add(delete);
505
		return buttonPanel;
506
	}
507
508
	/**
509
	 * Initialize the components and layout of this component.
510
	 */
511
	private void init() {
512
		JPanel p = this;
513
514
		if (standalone) {
515
			setLayout(new BorderLayout(0, 5));
516
			setBorder(makeBorder());
517
			add(makeTitlePanel(), BorderLayout.NORTH);
518
			p = new JPanel();
519
		}
520
521
		p.setLayout(new BorderLayout());
522
523
		p.add(makeLabelPanel(), BorderLayout.NORTH);
524
		p.add(makeMainPanel(), BorderLayout.CENTER);
525
		// Force a minimum table height of 70 pixels
526
		p.add(Box.createVerticalStrut(70), BorderLayout.WEST);
527
		p.add(makeButtonPanel(), BorderLayout.SOUTH);
528
529
		if (standalone) {
530
			add(p, BorderLayout.CENTER);
531
		}
532
533
		table.revalidate();
534
		sizeColumns(table);
535
	}
536
}
(-)src/protocol/http/org/apache/jmeter/protocol/http/config/gui/MultipartUrlConfigGui.java (-94 / +41 lines)
Lines 21-27 Link Here
21
import java.awt.BorderLayout;
21
import java.awt.BorderLayout;
22
import java.awt.event.ActionEvent;
22
import java.awt.event.ActionEvent;
23
import java.awt.event.ActionListener;
23
import java.awt.event.ActionListener;
24
import java.io.File;
25
24
26
import javax.swing.BorderFactory;
25
import javax.swing.BorderFactory;
27
import javax.swing.BoxLayout;
26
import javax.swing.BoxLayout;
Lines 31-59 Link Here
31
import javax.swing.JPanel;
30
import javax.swing.JPanel;
32
import javax.swing.JTextField;
31
import javax.swing.JTextField;
33
32
34
import org.apache.jmeter.gui.util.FileDialoger;
35
import org.apache.jmeter.gui.util.VerticalPanel;
33
import org.apache.jmeter.gui.util.VerticalPanel;
36
import org.apache.jmeter.protocol.http.sampler.HTTPSamplerBase;
34
import org.apache.jmeter.protocol.http.sampler.HTTPSamplerBase;
35
import org.apache.jmeter.protocol.http.util.HTTPFileArg;
36
import org.apache.jmeter.protocol.http.util.HTTPFileArgs;
37
import org.apache.jmeter.protocol.http.gui.HTTPFileArgsPanel;
37
import org.apache.jmeter.testelement.TestElement;
38
import org.apache.jmeter.testelement.TestElement;
39
import org.apache.jmeter.testelement.property.TestElementProperty;
38
import org.apache.jmeter.util.JMeterUtils;
40
import org.apache.jmeter.util.JMeterUtils;
39
41
40
public class MultipartUrlConfigGui extends UrlConfigGui implements ActionListener {
42
public class MultipartUrlConfigGui extends UrlConfigGui implements ActionListener {
41
43
42
	private JTextField filenameField;
44
	/**
45
	 * Files panel that holds file informations to be uploaded by
46
	 * http request.
47
	 */
48
	protected HTTPFileArgsPanel filesPanel;
43
49
44
	private JTextField paramNameField;
45
46
	private JTextField mimetypeField;
47
48
	// TODO these are used as names for the GUI elements - are they needed? are they NLS?
49
	private static final String FILENAME = "filename";
50
51
	private static final String BROWSE = "browse";  // $NON-NLS-1$ used as an ActionName locally
52
53
	private static final String PARAMNAME = "paramname";
54
55
	private static final String MIMETYPE = "mimetype";
56
57
	public MultipartUrlConfigGui() {
50
	public MultipartUrlConfigGui() {
58
		super();
51
		super();
59
		init();
52
		init();
Lines 66-76 Link Here
66
59
67
	public TestElement createTestElement() {
60
	public TestElement createTestElement() {
68
		TestElement ce = super.createTestElement();
61
		TestElement ce = super.createTestElement();
69
70
		configureTestElement(ce);
62
		configureTestElement(ce);
71
		ce.setProperty(HTTPSamplerBase.MIMETYPE, mimetypeField.getText());
63
		HTTPFileArgs files = (HTTPFileArgs) filesPanel.createTestElement();
72
		ce.setProperty(HTTPSamplerBase.FILE_NAME, filenameField.getText());
64
		ce.setProperty(new TestElementProperty(HTTPSamplerBase.FILE_ARGS, files));
73
		ce.setProperty(HTTPSamplerBase.FILE_FIELD, paramNameField.getText());
65
		// following lines are for letting it possible to create
66
		// backward compatible test plans.
67
		//TODO: remove backward compatibility stuff after enough time.
68
		HTTPFileArg file = files.getHTTPFileArg(0);
69
		if (file != null) {
70
			ce.setProperty(HTTPSamplerBase.FILE_NAME, file.getPath());
71
			ce.setProperty(HTTPSamplerBase.FILE_FIELD, file.getParamName());
72
			ce.setProperty(HTTPSamplerBase.MIMETYPE, file.getMimeType());
73
		}
74
		return ce;
74
		return ce;
75
	}
75
	}
76
76
Lines 85-93 Link Here
85
85
86
	public void configure(TestElement el) {
86
	public void configure(TestElement el) {
87
		super.configure(el);
87
		super.configure(el);
88
		mimetypeField.setText(el.getPropertyAsString(HTTPSamplerBase.MIMETYPE));
88
		//kept backward compatibility with test plans prepared
89
		filenameField.setText(el.getPropertyAsString(HTTPSamplerBase.FILE_NAME));
89
		//by old versions of jmeter.
90
		paramNameField.setText(el.getPropertyAsString(HTTPSamplerBase.FILE_FIELD));
90
		//TODO: remove backward compatibility stuff after enough time.
91
		String fileName = el.getPropertyAsString(HTTPSamplerBase.FILE_NAME);
92
		String paramName = el.getPropertyAsString(HTTPSamplerBase.FILE_FIELD);
93
		String mimeType = el.getPropertyAsString(HTTPSamplerBase.MIMETYPE);
94
		if(!"".equals(fileName) || !"".equals(paramName) || !"".equals(mimeType)) {
95
			// if any file information is saved previously.
96
			HTTPFileArg file = new HTTPFileArg(fileName, paramName, mimeType);
97
			HTTPFileArgs files = new HTTPFileArgs();
98
			files.addHTTPFileArg(file);
99
			filesPanel.configure(files);
100
			//convert old properties to new all-in-one property
101
			el.setProperty(new TestElementProperty(HTTPSamplerBase.FILE_ARGS, files));
102
		}
103
		filesPanel.configure((TestElement) el.getProperty(HTTPSamplerBase.FILE_ARGS).getObjectValue());
91
	}
104
	}
92
105
93
	public String getLabelResource() {
106
	public String getLabelResource() {
Lines 98-117 Link Here
98
	}
111
	}
99
112
100
	public void actionPerformed(ActionEvent e) {
113
	public void actionPerformed(ActionEvent e) {
101
		String name = e.getActionCommand();
102
103
		if (name.equals(BROWSE)) {
104
			JFileChooser chooser = FileDialoger.promptToOpenFile();
105
106
			if (chooser == null) {
107
				return;
108
			}
109
			File file = chooser.getSelectedFile();
110
111
			if (file != null) {
112
				filenameField.setText(file.getPath());
113
			}
114
		}
115
	}
114
	}
116
115
117
	private void init() {// called from ctor, so must not be overridable
116
	private void init() {// called from ctor, so must not be overridable
Lines 140-206 Link Here
140
139
141
		webRequestPanel.add(northPanel, BorderLayout.NORTH);
140
		webRequestPanel.add(northPanel, BorderLayout.NORTH);
142
		webRequestPanel.add(getParameterPanel(), BorderLayout.CENTER);
141
		webRequestPanel.add(getParameterPanel(), BorderLayout.CENTER);
143
		webRequestPanel.add(getFilePanel(), BorderLayout.SOUTH);
142
		webRequestPanel.add(getHTTPFileArgsPanel(), BorderLayout.SOUTH);
144
143
145
		this.add(webServerPanel, BorderLayout.NORTH);
144
		this.add(webServerPanel, BorderLayout.NORTH);
146
		this.add(webRequestPanel, BorderLayout.CENTER);
145
		this.add(webRequestPanel, BorderLayout.CENTER);
147
	}
146
	}
148
147
149
	protected JPanel getFilePanel() {
148
	protected JPanel getHTTPFileArgsPanel() {
150
		JPanel filePanel = new VerticalPanel();
149
		filesPanel = new HTTPFileArgsPanel(JMeterUtils.getResString("send_file"));
151
		filePanel.setBorder(BorderFactory.createTitledBorder(BorderFactory.createEtchedBorder(), 
150
		return filesPanel;
152
				JMeterUtils.getResString("send_file"))); // $NON-NLS-1$
153
154
		filePanel.add(createFilenamePanel());
155
		filePanel.add(createFileParamNamePanel());
156
		filePanel.add(createFileMimeTypePanel());
157
158
		return filePanel;
159
	}
151
	}
160
152
161
	private JPanel createFileMimeTypePanel() {
162
		mimetypeField = new JTextField(15);
163
		mimetypeField.setName(MIMETYPE);
164
165
		JLabel mimetypeLabel = new JLabel(JMeterUtils.getResString("send_file_mime_label")); // $NON-NLS-1$
166
		mimetypeLabel.setLabelFor(mimetypeField);
167
		JPanel mimePanel = new JPanel(new BorderLayout(5, 0));
168
		mimePanel.add(mimetypeLabel, BorderLayout.WEST);
169
		mimePanel.add(mimetypeField, BorderLayout.CENTER);
170
		return mimePanel;
171
	}
172
173
	private JPanel createFileParamNamePanel() {
174
		paramNameField = new JTextField(15);
175
		paramNameField.setName(PARAMNAME);
176
177
		JLabel paramNameLabel = new JLabel(JMeterUtils.getResString("send_file_param_name_label")); // $NON-NLS-1$
178
		paramNameLabel.setLabelFor(paramNameField);
179
180
		JPanel paramNamePanel = new JPanel(new BorderLayout(5, 0));
181
		paramNamePanel.add(paramNameLabel, BorderLayout.WEST);
182
		paramNamePanel.add(paramNameField, BorderLayout.CENTER);
183
		return paramNamePanel;
184
	}
185
186
	private JPanel createFilenamePanel() {
187
		filenameField = new JTextField(15);
188
		filenameField.setName(FILENAME);
189
190
		JLabel filenameLabel = new JLabel(JMeterUtils.getResString("send_file_filename_label")); // $NON-NLS-1$
191
		filenameLabel.setLabelFor(filenameField);
192
193
		JButton browseFileButton = new JButton(JMeterUtils.getResString("send_file_browse")); // $NON-NLS-1$
194
		browseFileButton.setActionCommand(BROWSE);
195
		browseFileButton.addActionListener(this);
196
197
		JPanel filenamePanel = new JPanel(new BorderLayout(5, 0));
198
		filenamePanel.add(filenameLabel, BorderLayout.WEST);
199
		filenamePanel.add(filenameField, BorderLayout.CENTER);
200
		filenamePanel.add(browseFileButton, BorderLayout.EAST);
201
		return filenamePanel;
202
	}
203
204
	/*
153
	/*
205
	 * (non-Javadoc)
154
	 * (non-Javadoc)
206
	 * 
155
	 * 
Lines 209-216 Link Here
209
	public void clear() {
158
	public void clear() {
210
		// TODO Auto-generated method stub
159
		// TODO Auto-generated method stub
211
		super.clear();
160
		super.clear();
212
		filenameField.setText(""); // $NON-NLS-1$
161
		filesPanel.clear();
213
		mimetypeField.setText(""); // $NON-NLS-1$
214
		paramNameField.setText(""); // $NON-NLS-1$
215
	}
162
	}
216
}
163
}
(-)src/protocol/http/org/apache/jmeter/protocol/http/config/MultipartUrlConfig.java (-10 / +112 lines)
Lines 22-44 Link Here
22
22
23
import org.apache.jmeter.config.Arguments;
23
import org.apache.jmeter.config.Arguments;
24
import org.apache.jmeter.protocol.http.util.HTTPArgument;
24
import org.apache.jmeter.protocol.http.util.HTTPArgument;
25
import org.apache.jmeter.protocol.http.util.HTTPFileArg;
26
import org.apache.jmeter.protocol.http.util.HTTPFileArgs;
25
import org.apache.jmeter.util.JMeterUtils;
27
import org.apache.jmeter.util.JMeterUtils;
26
import org.apache.jorphan.util.JOrphanUtils;
28
import org.apache.jorphan.util.JOrphanUtils;
29
import org.apache.jorphan.logging.LoggingManager;
27
import org.apache.oro.text.regex.Pattern;
30
import org.apache.oro.text.regex.Pattern;
28
import org.apache.oro.text.regex.Perl5Compiler;
31
import org.apache.oro.text.regex.Perl5Compiler;
29
import org.apache.oro.text.regex.Perl5Matcher;
32
import org.apache.oro.text.regex.Perl5Matcher;
33
import org.apache.log.Logger;
30
34
31
/**
35
/**
32
 * @author Michael Stover
36
 * @author Michael Stover
33
 */
37
 */
34
public class MultipartUrlConfig implements Serializable {
38
public class MultipartUrlConfig implements Serializable {
35
39
36
	private String boundary, filename, fileField, mimetype;
40
	private static final Logger log = LoggingManager.getLoggerForClass();
37
41
42
	private String boundary;
43
38
	private Arguments args;
44
	private Arguments args;
39
45
46
	/**
47
	 * HTTPFileArgs list to be uploaded with http request.
48
	 */
49
	private HTTPFileArgs files;
50
40
	public MultipartUrlConfig() {
51
	public MultipartUrlConfig() {
41
		args = new Arguments();
52
		args = new Arguments();
53
		files = new HTTPFileArgs();
42
	}
54
	}
43
55
44
	public MultipartUrlConfig(String boundary) {
56
	public MultipartUrlConfig(String boundary) {
Lines 55-85 Link Here
55
	}
67
	}
56
68
57
	public void setFilename(String filename) {
69
	public void setFilename(String filename) {
58
		this.filename = filename;
70
		setHTTPFileArg("MultipartUrlConfig.setFilename", filename, null, null);
59
	}
71
	}
60
72
61
	public String getFilename() {
73
	public String getFilename() {
62
		return filename;
74
		HTTPFileArg file = this.getFirstHTTPFileArg();
75
		return (file != null) ? file.getPath() : null;
63
	}
76
	}
64
77
65
	public Arguments getArguments() {
78
	public Arguments getArguments() {
66
		return args;
79
		return args;
67
	}
80
	}
68
81
82
	/**
83
	 * get HTTPFileArgs list to be uploaded with http request.
84
	 *
85
	 * @return HTTPFileArgs current files list to be uploaded with
86
	 * request.
87
	 */
88
	public HTTPFileArgs getHTTPFileArgs() {
89
		return files;
90
	}
91
92
	/**
93
	 * gets first item of HTTPFileArgs list.
94
	 *
95
	 * @return HTTPFileArg object if there exists any file, null
96
	 * otherwise.
97
	 */
98
	public HTTPFileArg getFirstHTTPFileArg() {
99
		return files.getHTTPFileArg(0);
100
	}
101
69
	public void setFileFieldName(String name) {
102
	public void setFileFieldName(String name) {
70
		this.fileField = name;
103
		setHTTPFileArg("MultipartUrlConfig.setFileFieldName", null, name, null);
71
	}
104
	}
72
105
73
	public String getFileFieldName() {
106
	public String getFileFieldName() {
74
		return fileField;
107
		HTTPFileArg file = this.getFirstHTTPFileArg();
108
		return (file != null) ? file.getParamName() : null;
75
	}
109
	}
76
110
77
	public void setMimeType(String type) {
111
	public void setMimeType(String type) {
78
		mimetype = type;
112
		setHTTPFileArg("MultipartUrlConfig.setMimeType", null, null, type);
79
	}
113
	}
80
114
81
	public String getMimeType() {
115
	public String getMimeType() {
82
		return mimetype;
116
		HTTPFileArg file = this.getFirstHTTPFileArg();
117
		return (file != null) ? file.getMimeType() : null;
83
	}
118
	}
84
119
85
	public void addArgument(String name, String value) {
120
	public void addArgument(String name, String value) {
Lines 92-97 Link Here
92
		myArgs.addArgument(new HTTPArgument(name, value, metadata));
127
		myArgs.addArgument(new HTTPArgument(name, value, metadata));
93
	}
128
	}
94
129
130
	/**
131
	 * adds a new File to the HTTPFileArgs list to be uploaded with http
132
	 * request.
133
	 *
134
	 * @param path file full path.
135
	 * @param param http parameter name.
136
	 * @param mime mime type of file.
137
	 */
138
	public void addHTTPFileArg(String path, String param, String mime) {
139
		files.addHTTPFileArg(new HTTPFileArg(path, param, mime));
140
	}
141
142
	/**
143
	 * resets HTTPFileArgs list and adds a new HTTPFileArg to the
144
	 * new list.
145
	 *
146
	 * @param file
147
	 *			 the new HTTPFileArg object
148
	 */
149
	public void setHTTPFileArg(HTTPFileArg file) {
150
		files = new HTTPFileArgs();
151
		files.addHTTPFileArg(file);
152
	}
153
154
	/**
155
	 * checks attached file count; if there are multiple files, logs a
156
	 * warning with given method name, changes first attached file's
157
	 * information with given non null parameters, and removes other
158
	 * files; if there is no file attached, attaches a new one with
159
	 * given non null parameters.
160
	 *
161
	 * @param method
162
	 *		method name needed for warning log.
163
	 * @param filePath
164
	 *		give null not to change path information of http file
165
	 *		argument.
166
	 * @param paramName
167
	 *		give null not to change parameter name of http file
168
	 *		argument.
169
	 * @param mimeType
170
	 *		give null not to change mime type of http file
171
	 *		argument.
172
	 */
173
	protected void setHTTPFileArg(String method, String filePath, String paramName, String mimeType) {
174
		int fileCount = files.getHTTPFileArgCount();
175
		if (fileCount > 1) {
176
			logOldMethodCallForMultipleFiles(method);
177
		}
178
		HTTPFileArg file = (fileCount == 0)
179
			? new HTTPFileArg()
180
			: getFirstHTTPFileArg();
181
		if (filePath != null) { file.setPath(filePath); }
182
		if (paramName != null) { file.setParamName(paramName); }
183
		if (mimeType != null) { file.setMimeType(mimeType); }
184
		setHTTPFileArg(file);
185
	}
186
187
	/**
188
	 * logs a generic warning message about an old method call which
189
	 * assumes there can be only one file, but for now multiple file
190
	 * upload is possible.
191
	 *
192
	 * @param method name of the old method which is called.
193
	 */
194
	private void logOldMethodCallForMultipleFiles(String method) {
195
			log.warn(method + " method is called "
196
					 + "while there are multiple files");
197
	}
198
95
// NOT USED	
199
// NOT USED	
96
//    /**
200
//    /**
97
//     * @deprecated values in a multipart/form-data are not urlencoded,
201
//     * @deprecated values in a multipart/form-data are not urlencoded,
Lines 146-154 Link Here
146
                    String fn = contentDisposition.substring(index, contentDisposition.indexOf("\"", index));
250
                    String fn = contentDisposition.substring(index, contentDisposition.indexOf("\"", index));
147
                    if(fn != null && fn.length() > 0) {
251
                    if(fn != null && fn.length() > 0) {
148
                        // Set the values retrieves for the file upload
252
                        // Set the values retrieves for the file upload
149
                        this.setFileFieldName(name);
253
                        this.addHTTPFileArg(fn, name, contentType);
150
                        this.setFilename(fn);
151
                        this.setMimeType(contentType);
152
                    }
254
                    }
153
                }
255
                }
154
                else {
256
                else {
(-)src/protocol/http/org/apache/jmeter/protocol/http/util/HTTPFileArg.java (+164 lines)
Line 0 Link Here
1
/*
2
 * Licensed to the Apache Software Foundation (ASF) under one or more
3
 * contributor license agreements.	See the NOTICE file distributed with
4
 * this work for additional information regarding copyright ownership.
5
 * The ASF licenses this file to You under the Apache License, Version 2.0
6
 * (the "License"); you may not use this file except in compliance with
7
 * the License.	 You may obtain a copy of the License at
8
 *
9
 *	 http://www.apache.org/licenses/LICENSE-2.0
10
 *
11
 * Unless required by applicable law or agreed to in writing, software
12
 * distributed under the License is distributed on an "AS IS" BASIS,
13
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14
 * See the License for the specific language governing permissions and
15
 * limitations under the License.
16
 *
17
 */
18
19
package org.apache.jmeter.protocol.http.util;
20
21
import java.io.Serializable;
22
23
import org.apache.jmeter.testelement.AbstractTestElement;
24
import org.apache.jmeter.testelement.property.StringProperty;
25
26
/*
27
 * Class representing a file parameter for http upload consists of a
28
 * http parameter name/file path pair with (optional) mimetype.
29
 *
30
 * @author Erhan Kesken
31
 */
32
public class HTTPFileArg extends AbstractTestElement implements Serializable {
33
34
	/** Name used to store the file's path. */
35
	public static final String FILEPATH = "File.path";
36
37
	/** Name used to store the file's paramname. */
38
	public static final String PARAMNAME = "File.paramname";
39
40
	/** Name used to store the file's mimetype. */
41
	public static final String MIMETYPE = "File.mimetype";
42
43
	/** Name used to store the file's http header. */
44
	public static final String HEADER = "File.header";
45
46
	/**
47
	 * Constructor for an empty HTTPFileArg object
48
	 */
49
	public HTTPFileArg() {
50
	}
51
52
	/**
53
	 * Constructor for the HTTPFileArg object with given path.
54
	 */
55
	public HTTPFileArg(String path) {
56
		this(path, null, null);
57
	}
58
59
	/**
60
	 * Constructor for the HTTPFileArg object with full information.
61
	 */
62
	public HTTPFileArg(String path, String paramname, String mimetype) {
63
		setPath(path);
64
		setParamName(paramname);
65
		setMimeType(mimetype);
66
	}
67
68
	/**
69
	 * Copy Constructor.
70
	 */
71
	public HTTPFileArg(HTTPFileArg file) {
72
		this(file.getPath(), file.getParamName(), file.getMimeType());
73
	}
74
75
	/**
76
	 * Set the http parameter name of the File.
77
	 *
78
	 * @param newParamName
79
	 *	the new http parameter name
80
	 */
81
	public void setParamName(String newParamName) {
82
		setProperty(new StringProperty(PARAMNAME, newParamName));
83
	}
84
85
	/**
86
	 * Get the http parameter name of the File.
87
	 *
88
	 * @return the http parameter name
89
	 */
90
	public String getParamName() {
91
		return getPropertyAsString(PARAMNAME);
92
	}
93
94
	/**
95
	 * Set the mimetype of the File.
96
	 *
97
	 * @param newMimeType
98
	 *	the new mimetype
99
	 */
100
	public void setMimeType(String newMimeType) {
101
		setProperty(new StringProperty(MIMETYPE, newMimeType));
102
	}
103
104
	/**
105
	 * Get the mimetype of the File.
106
	 *
107
	 * @return the http parameter mimetype
108
	 */
109
	public String getMimeType() {
110
		return getPropertyAsString(MIMETYPE);
111
	}
112
113
	/**
114
	 * Set the path of the File.
115
	 *
116
	 * @param newPath
117
	 *	the new path
118
	 */
119
	public void setPath(String newPath) {
120
		setProperty(new StringProperty(FILEPATH, newPath));
121
	}
122
123
	/**
124
	 * Get the path of the File.
125
	 *
126
	 * @return the file's path
127
	 */
128
	public String getPath() {
129
		return getPropertyAsString(FILEPATH);
130
	}
131
132
	/**
133
	 * Sets the http headers for the HTTPFileArg object. Header
134
	 * contains path, parameter name and mime type information.
135
	 *
136
	 * @param newHeader
137
	 *	the new Header value
138
	 */
139
	public void setHeader(String newHeader) {
140
		setProperty(new StringProperty(HEADER, newHeader));
141
	}
142
143
	/**
144
	 * Gets the http headers for the HTTPFileArg object.
145
	 */
146
	public String getHeader() {
147
		return getPropertyAsString(HEADER);
148
	}
149
150
	/**
151
	 * returns path, param name, mime type information of
152
	 * HTTPFileArg object.
153
	 *
154
	 * @return the string demonstration of HTTPFileArg object in this
155
	 * format:
156
	 *    "path:'<PATH>'|param:'<PARAM NAME>'|mimetype:'<MIME TYPE>'"
157
	 */
158
	public String toString() {
159
		return "path:'" + getPath()
160
			+ "'|param:'" + getParamName()
161
			+ "'|mimetype:'" + getMimeType() + "'";
162
	}
163
164
}
(-)src/protocol/http/org/apache/jmeter/protocol/http/util/HTTPFileArgs.java (+207 lines)
Line 0 Link Here
1
/*
2
 * Licensed to the Apache Software Foundation (ASF) under one or more
3
 * contributor license agreements.	See the NOTICE file distributed with
4
 * this work for additional information regarding copyright ownership.
5
 * The ASF licenses this file to You under the Apache License, Version 2.0
6
 * (the "License"); you may not use this file except in compliance with
7
 * the License.	 You may obtain a copy of the License at
8
 *
9
 *	 http://www.apache.org/licenses/LICENSE-2.0
10
 *
11
 * Unless required by applicable law or agreed to in writing, software
12
 * distributed under the License is distributed on an "AS IS" BASIS,
13
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14
 * See the License for the specific language governing permissions and
15
 * limitations under the License.
16
 *
17
 */
18
19
package org.apache.jmeter.protocol.http.util;
20
21
import java.io.Serializable;
22
import java.util.ArrayList;
23
import java.util.List;
24
25
import org.apache.jmeter.config.ConfigTestElement;
26
import org.apache.jmeter.testelement.property.CollectionProperty;
27
import org.apache.jmeter.testelement.property.PropertyIterator;
28
import org.apache.jmeter.testelement.property.TestElementProperty;
29
30
/**
31
 * A set of HTTPFileArg objects.
32
 *
33
 * @author Erhan Kesken
34
 */
35
public class HTTPFileArgs extends ConfigTestElement implements Serializable {
36
	/** The name of the property used to store the files. */
37
	public static final String HTTP_FILE_ARGS = "HTTPFileArgs.files"; //$NON-NLS-1$
38
39
	/**
40
	 * Create a new HTTPFileArgs object with no files.
41
	 */
42
	public HTTPFileArgs() {
43
		setProperty(new CollectionProperty(HTTP_FILE_ARGS, new ArrayList()));
44
	}
45
46
	/**
47
	 * Get the files.
48
	 *
49
	 * @return the files
50
	 */
51
	public CollectionProperty getHTTPFileArgsCollection() {
52
		return (CollectionProperty) getProperty(HTTP_FILE_ARGS);
53
	}
54
55
	/**
56
	 * Clear the files.
57
	 */
58
	public void clear() {
59
		super.clear();
60
		setProperty(new CollectionProperty(HTTP_FILE_ARGS, new ArrayList()));
61
	}
62
63
	/**
64
	 * Set the list of files. Any existing files will be lost.
65
	 *
66
	 * @param files
67
	 *	the new files
68
	 */
69
	public void setHTTPFileArgs(List files) {
70
		setProperty(new CollectionProperty(HTTP_FILE_ARGS, files));
71
	}
72
73
	/**
74
	 * Add a new file with the given path.
75
	 *
76
	 * @param path
77
	 *	the path of the file
78
	 */
79
	public void addHTTPFileArg(String path) {
80
		addHTTPFileArg(new HTTPFileArg(path));
81
	}
82
83
	/**
84
	 * Add a new file.
85
	 *
86
	 * @param file
87
	 *	the new file
88
	 */
89
	public void addHTTPFileArg(HTTPFileArg file) {
90
		TestElementProperty newHTTPFileArg = new TestElementProperty(file.getPath(), file);
91
		if (isRunningVersion()) {
92
			this.setTemporary(newHTTPFileArg);
93
		}
94
		getHTTPFileArgsCollection().addItem(newHTTPFileArg);
95
	}
96
97
	/**
98
	 * Get a PropertyIterator of the files.
99
	 *
100
	 * @return an iteration of the files
101
	 */
102
	public PropertyIterator iterator() {
103
		return getHTTPFileArgsCollection().iterator();
104
	}
105
106
	/**
107
	 * Create a string representation of the files.
108
	 *
109
	 * @return the string representation of the files
110
	 */
111
	public String toString() {
112
		StringBuffer str = new StringBuffer();
113
		PropertyIterator iter = getHTTPFileArgsCollection().iterator();
114
		while (iter.hasNext()) {
115
			HTTPFileArg file = (HTTPFileArg) iter.next().getObjectValue();
116
			str.append(file.getPath());
117
			if (iter.hasNext()) {
118
				str.append("&"); //$NON-NLS-1$
119
			}
120
		}
121
		return str.toString();
122
	}
123
124
	/**
125
	 * Remove the specified file from the list.
126
	 *
127
	 * @param row
128
	 *	the index of the file to remove
129
	 */
130
	public void removeHTTPFileArg(int row) {
131
		if (row < getHTTPFileArgCount()) {
132
			getHTTPFileArgsCollection().remove(row);
133
		}
134
	}
135
136
	/**
137
	 * Remove the specified file from the list.
138
	 *
139
	 * @param file
140
	 *	the file to remove
141
	 */
142
	public void removeHTTPFileArg(HTTPFileArg file) {
143
		PropertyIterator iter = getHTTPFileArgsCollection().iterator();
144
		while (iter.hasNext()) {
145
			HTTPFileArg item = (HTTPFileArg) iter.next().getObjectValue();
146
			if (file.equals(item)) {
147
				iter.remove();
148
			}
149
		}
150
	}
151
152
	/**
153
	 * Remove the file with the specified path.
154
	 *
155
	 * @param filePath
156
	 *	the path of the file to remove
157
	 */
158
	public void removeHTTPFileArg(String filePath) {
159
		PropertyIterator iter = getHTTPFileArgsCollection().iterator();
160
		while (iter.hasNext()) {
161
			HTTPFileArg file = (HTTPFileArg) iter.next().getObjectValue();
162
			if (file.getPath().equals(filePath)) {
163
				iter.remove();
164
			}
165
		}
166
	}
167
168
	/**
169
	 * Remove all files from the list.
170
	 */
171
	public void removeAllHTTPFileArgs() {
172
		getHTTPFileArgsCollection().clear();
173
	}
174
175
	/**
176
	 * Add a new empty file to the list. The new file will have the
177
	 * empty string as its path.
178
	 */
179
	public void addEmptyHTTPFileArg() {
180
		addHTTPFileArg(new HTTPFileArg(""));
181
	}
182
183
	/**
184
	 * Get the number of files in the list.
185
	 *
186
	 * @return the number of files
187
	 */
188
	public int getHTTPFileArgCount() {
189
		return getHTTPFileArgsCollection().size();
190
	}
191
192
	/**
193
	 * Get a single file.
194
	 *
195
	 * @param row
196
	 *	the index of the file to return.
197
	 * @return the file at the specified index, or null if no file
198
	 *	exists at that index.
199
	 */
200
	public HTTPFileArg getHTTPFileArg(int row) {
201
		HTTPFileArg file = null;
202
		if (row < getHTTPFileArgCount()) {
203
			file = (HTTPFileArg) getHTTPFileArgsCollection().get(row).getObjectValue();
204
		}
205
		return file;
206
	}
207
}
(-)src/core/org/apache/jmeter/resources/messages.properties (-3 / +3 lines)
Lines 699-709 Link Here
699
searchtest=Search test
699
searchtest=Search test
700
second=second
700
second=second
701
secure=Secure
701
secure=Secure
702
send_file=Send a File With the Request\:
702
send_file=Send Files With the Request\:
703
send_file_browse=Browse...
703
send_file_browse=Browse...
704
send_file_filename_label=Filename\:
704
send_file_filename_label=File Path\:
705
send_file_mime_label=MIME Type\:
705
send_file_mime_label=MIME Type\:
706
send_file_param_name_label=Value for "name" attribute\:
706
send_file_param_name_label=Parameter Name\:
707
server=Server Name or IP\:
707
server=Server Name or IP\:
708
servername=Servername \:
708
servername=Servername \:
709
session_argument_name=Session Argument Name
709
session_argument_name=Session Argument Name
(-)src/core/org/apache/jmeter/resources/messages_tr.properties (-3 / +3 lines)
Lines 674-682 Link Here
674
secure=G\u00FCvenli
674
secure=G\u00FCvenli
675
send_file=\u0130stekle Beraber Dosya G\u00F6nder\:
675
send_file=\u0130stekle Beraber Dosya G\u00F6nder\:
676
send_file_browse=G\u00F6zat...
676
send_file_browse=G\u00F6zat...
677
send_file_filename_label=Dosya ismi\:
677
send_file_filename_label=Dosya Yolu\:
678
send_file_mime_label=MIME Tipi
678
send_file_mime_label=MIME Tipi\:
679
send_file_param_name_label="isim" \u00F6zniteli\u011Fi de\u011Feri\:
679
send_file_param_name_label=Parametre \u0130smi\:
680
server=Sunucu \u0130smi veya IP\:
680
server=Sunucu \u0130smi veya IP\:
681
servername=Sunucu \u0130smi \:
681
servername=Sunucu \u0130smi \:
682
session_argument_name=Oturum Arg\u00FCman\u0131 \u0130smi
682
session_argument_name=Oturum Arg\u00FCman\u0131 \u0130smi
(-)src/core/org/apache/jmeter/util/JMeterVersion.java (-1 / +1 lines)
Lines 44-50 Link Here
44
	 * This ensures that JMeterUtils always gets the correct
44
	 * This ensures that JMeterUtils always gets the correct
45
	 * version, even if JMeterUtils is not re-compiled during the build.
45
	 * version, even if JMeterUtils is not re-compiled during the build.
46
	 */
46
	 */
47
	private static final String VERSION = "2.3.2";
47
	private static final String VERSION = "2.3.20080503";
48
48
49
	static final String COPYRIGHT = "Copyright (c) 1998-2008 The Apache Software Foundation";
49
	static final String COPYRIGHT = "Copyright (c) 1998-2008 The Apache Software Foundation";
50
50
(-)build.xml (-1 / +2 lines)
Lines 1716-1721 Link Here
1716
      <classpath>
1716
      <classpath>
1717
        <fileset dir="${dest.jar}" includes="*.jar"/>
1717
        <fileset dir="${dest.jar}" includes="*.jar"/>
1718
        <fileset dir="${lib.opt}" includes="optional.jar"/>
1718
        <fileset dir="${lib.opt}" includes="optional.jar"/>
1719
        <pathelement location="${build.test}"/>
1719
        <path refid="classpath"/>
1720
        <path refid="classpath"/>
1720
      </classpath>
1721
      </classpath>
1721
  <test name="${test.case}" todir="reports"/>
1722
  <test name="${test.case}" todir="reports"/>
Lines 1749-1752 Link Here
1749
    		revisionProperty="svn.revision"/>
1750
    		revisionProperty="svn.revision"/>
1750
    	</svn>
1751
    	</svn>
1751
    </target>
1752
    </target>
1752
</project>
1753
</project>
(-)bin/testfiles/LoopTestPlan.jmx (-31 / +37 lines)
Lines 1-5 Link Here
1
<?xml version="1.0" encoding="UTF-8"?>
1
<?xml version="1.0" encoding="UTF-8"?>
2
<jmeterTestPlan version="1.2" properties="1.8">
2
<jmeterTestPlan version="1.2" properties="2.0">
3
  <hashTree>
3
  <hashTree>
4
    <TestPlan guiclass="TestPlanGui" testclass="TestPlan" testname="Test Plan" enabled="true">
4
    <TestPlan guiclass="TestPlanGui" testclass="TestPlan" testname="Test Plan" enabled="true">
5
      <collectionProp name="TestPlan.thread_groups"/>
5
      <collectionProp name="TestPlan.thread_groups"/>
Lines 9-14 Link Here
9
      <boolProp name="TestPlan.serialize_threadgroups">false</boolProp>
9
      <boolProp name="TestPlan.serialize_threadgroups">false</boolProp>
10
      <boolProp name="TestPlan.functional_mode">false</boolProp>
10
      <boolProp name="TestPlan.functional_mode">false</boolProp>
11
      <stringProp name="TestPlan.comments"></stringProp>
11
      <stringProp name="TestPlan.comments"></stringProp>
12
      <stringProp name="TestPlan.user_define_classpath"></stringProp>
12
    </TestPlan>
13
    </TestPlan>
13
    <hashTree>
14
    <hashTree>
14
      <ThreadGroup guiclass="ThreadGroupGui" testclass="ThreadGroup" testname="Jakarta Users" enabled="true">
15
      <ThreadGroup guiclass="ThreadGroupGui" testclass="ThreadGroup" testname="Jakarta Users" enabled="true">
Lines 18-25 Link Here
18
        <stringProp name="ThreadGroup.num_threads">1</stringProp>
19
        <stringProp name="ThreadGroup.num_threads">1</stringProp>
19
        <boolProp name="ThreadGroup.scheduler">false</boolProp>
20
        <boolProp name="ThreadGroup.scheduler">false</boolProp>
20
        <elementProp name="ThreadGroup.main_controller" elementType="LoopController" guiclass="LoopControlPanel" testclass="LoopController" testname="Loop Controller" enabled="true">
21
        <elementProp name="ThreadGroup.main_controller" elementType="LoopController" guiclass="LoopControlPanel" testclass="LoopController" testname="Loop Controller" enabled="true">
22
          <boolProp name="LoopController.continue_forever">false</boolProp>
21
          <stringProp name="LoopController.loops">1</stringProp>
23
          <stringProp name="LoopController.loops">1</stringProp>
22
          <boolProp name="LoopController.continue_forever">false</boolProp>
23
        </elementProp>
24
        </elementProp>
24
        <longProp name="ThreadGroup.end_time">0</longProp>
25
        <longProp name="ThreadGroup.end_time">0</longProp>
25
        <stringProp name="ThreadGroup.on_sample_error">continue</stringProp>
26
        <stringProp name="ThreadGroup.on_sample_error">continue</stringProp>
Lines 27-87 Link Here
27
      </ThreadGroup>
28
      </ThreadGroup>
28
      <hashTree>
29
      <hashTree>
29
        <ConfigTestElement guiclass="HttpDefaultsGui" testclass="ConfigTestElement" testname="Defaults" enabled="true">
30
        <ConfigTestElement guiclass="HttpDefaultsGui" testclass="ConfigTestElement" testname="Defaults" enabled="true">
30
          <stringProp name="HTTPSampler.path">/</stringProp>
31
          <stringProp name="HTTPSampler.domain">jakarta.apache.org</stringProp>
32
          <stringProp name="HTTPSampler.protocol"></stringProp>
33
          <stringProp name="HTTPSampler.port"></stringProp>
34
          <elementProp name="HTTPsampler.Arguments" elementType="Arguments" guiclass="HTTPArgumentsPanel" testclass="Arguments" enabled="true">
31
          <elementProp name="HTTPsampler.Arguments" elementType="Arguments" guiclass="HTTPArgumentsPanel" testclass="Arguments" enabled="true">
35
            <collectionProp name="Arguments.arguments"/>
32
            <collectionProp name="Arguments.arguments"/>
36
          </elementProp>
33
          </elementProp>
34
          <stringProp name="HTTPSampler.domain">jakarta.apache.org</stringProp>
35
          <stringProp name="HTTPSampler.port"></stringProp>
36
          <stringProp name="HTTPSampler.protocol"></stringProp>
37
          <stringProp name="HTTPSampler.contentEncoding"></stringProp>
38
          <stringProp name="HTTPSampler.path">/</stringProp>
37
        </ConfigTestElement>
39
        </ConfigTestElement>
38
        <hashTree/>
40
        <hashTree/>
39
        <HTTPSampler guiclass="HttpTestSampleGui" testclass="HTTPSampler" testname="Home Page" enabled="true">
41
        <HTTPSampler guiclass="HttpTestSampleGui" testclass="HTTPSampler" testname="Home Page" enabled="true">
42
          <elementProp name="HTTPsampler.Arguments" elementType="Arguments" guiclass="HTTPArgumentsPanel" testclass="Arguments" enabled="true">
43
            <collectionProp name="Arguments.arguments"/>
44
          </elementProp>
45
          <stringProp name="HTTPSampler.domain"></stringProp>
46
          <stringProp name="HTTPSampler.port"></stringProp>
47
          <stringProp name="HTTPSampler.protocol">http</stringProp>
48
          <stringProp name="HTTPSampler.contentEncoding"></stringProp>
40
          <stringProp name="HTTPSampler.path">/</stringProp>
49
          <stringProp name="HTTPSampler.path">/</stringProp>
41
          <stringProp name="HTTPSampler.method">GET</stringProp>
50
          <stringProp name="HTTPSampler.method">GET</stringProp>
51
          <boolProp name="HTTPSampler.follow_redirects">false</boolProp>
52
          <boolProp name="HTTPSampler.auto_redirects">false</boolProp>
42
          <boolProp name="HTTPSampler.use_keepalive">false</boolProp>
53
          <boolProp name="HTTPSampler.use_keepalive">false</boolProp>
43
          <stringProp name="HTTPSampler.protocol">http</stringProp>
54
          <boolProp name="HTTPSampler.DO_MULTIPART_POST">false</boolProp>
44
          <boolProp name="HTTPSampler.image_parser">false</boolProp>
55
          <elementProp name="HTTPsampler.Files" elementType="HTTPFileArgs" guiclass="HTTPFileArgsPanel" testclass="HTTPFileArgs" enabled="true">
45
          <boolProp name="HTTPSampler.follow_redirects">false</boolProp>
56
            <collectionProp name="HTTPFileArgs.files"/>
46
          <elementProp name="HTTPsampler.Arguments" elementType="Arguments" guiclass="HTTPArgumentsPanel" testclass="Arguments" enabled="true">
47
            <collectionProp name="Arguments.arguments"/>
48
          </elementProp>
57
          </elementProp>
49
          <stringProp name="HTTPSampler.port"></stringProp>
50
          <stringProp name="HTTPSampler.mimetype"></stringProp>
51
          <stringProp name="HTTPSampler.FILE_FIELD"></stringProp>
52
          <stringProp name="HTTPSampler.monitor">false</stringProp>
58
          <stringProp name="HTTPSampler.monitor">false</stringProp>
53
          <stringProp name="HTTPSampler.domain"></stringProp>
59
          <stringProp name="HTTPSampler.embedded_url_re"></stringProp>
54
          <stringProp name="HTTPSampler.FILE_NAME"></stringProp>
55
          <boolProp name="HTTPSampler.auto_redirects">false</boolProp>
56
        </HTTPSampler>
60
        </HTTPSampler>
57
        <hashTree/>
61
        <hashTree/>
58
        <LoopController guiclass="LoopControlPanel" testclass="LoopController" testname="Loop Controller" enabled="true">
62
        <LoopController guiclass="LoopControlPanel" testclass="LoopController" testname="Loop Controller" enabled="true">
63
          <stringProp name="LoopController.continue_forever">true</stringProp>
59
          <stringProp name="LoopController.loops">5</stringProp>
64
          <stringProp name="LoopController.loops">5</stringProp>
60
          <stringProp name="LoopController.continue_forever">true</stringProp>
61
        </LoopController>
65
        </LoopController>
62
        <hashTree>
66
        <hashTree>
63
          <HTTPSampler guiclass="HttpTestSampleGui" testclass="HTTPSampler" testname="News Page" enabled="true">
67
          <HTTPSampler guiclass="HttpTestSampleGui" testclass="HTTPSampler" testname="News Page" enabled="true">
68
            <elementProp name="HTTPsampler.Arguments" elementType="Arguments" guiclass="HTTPArgumentsPanel" testclass="Arguments" enabled="true">
69
              <collectionProp name="Arguments.arguments"/>
70
            </elementProp>
71
            <stringProp name="HTTPSampler.domain"></stringProp>
72
            <stringProp name="HTTPSampler.port"></stringProp>
73
            <stringProp name="HTTPSampler.protocol">http</stringProp>
74
            <stringProp name="HTTPSampler.contentEncoding"></stringProp>
64
            <stringProp name="HTTPSampler.path">/site/news.html</stringProp>
75
            <stringProp name="HTTPSampler.path">/site/news.html</stringProp>
65
            <stringProp name="HTTPSampler.method">GET</stringProp>
76
            <stringProp name="HTTPSampler.method">GET</stringProp>
77
            <boolProp name="HTTPSampler.follow_redirects">false</boolProp>
78
            <boolProp name="HTTPSampler.auto_redirects">false</boolProp>
66
            <boolProp name="HTTPSampler.use_keepalive">false</boolProp>
79
            <boolProp name="HTTPSampler.use_keepalive">false</boolProp>
67
            <stringProp name="HTTPSampler.protocol">http</stringProp>
80
            <boolProp name="HTTPSampler.DO_MULTIPART_POST">false</boolProp>
68
            <boolProp name="HTTPSampler.image_parser">false</boolProp>
81
            <elementProp name="HTTPsampler.Files" elementType="HTTPFileArgs" guiclass="HTTPFileArgsPanel" testclass="HTTPFileArgs" enabled="true">
69
            <boolProp name="HTTPSampler.follow_redirects">false</boolProp>
82
              <collectionProp name="HTTPFileArgs.files"/>
70
            <elementProp name="HTTPsampler.Arguments" elementType="Arguments" guiclass="HTTPArgumentsPanel" testclass="Arguments" enabled="true">
71
              <collectionProp name="Arguments.arguments"/>
72
            </elementProp>
83
            </elementProp>
73
            <stringProp name="HTTPSampler.port"></stringProp>
74
            <stringProp name="HTTPSampler.mimetype"></stringProp>
75
            <stringProp name="HTTPSampler.FILE_FIELD"></stringProp>
76
            <stringProp name="HTTPSampler.monitor">false</stringProp>
84
            <stringProp name="HTTPSampler.monitor">false</stringProp>
77
            <stringProp name="HTTPSampler.domain"></stringProp>
85
            <stringProp name="HTTPSampler.embedded_url_re"></stringProp>
78
            <stringProp name="HTTPSampler.FILE_NAME"></stringProp>
79
            <boolProp name="HTTPSampler.auto_redirects">false</boolProp>
80
          </HTTPSampler>
86
          </HTTPSampler>
81
          <hashTree/>
87
          <hashTree/>
82
        </hashTree>
88
        </hashTree>
83
        <ResultCollector guiclass="GraphVisualizer" testclass="ResultCollector" testname="File Reporter" enabled="true">
89
        <ResultCollector guiclass="GraphVisualizer" testclass="ResultCollector" testname="File Reporter" enabled="true">
90
          <boolProp name="ResultCollector.error_logging">false</boolProp>
84
          <objProp>
91
          <objProp>
92
            <name>saveConfig</name>
85
            <value class="SampleSaveConfiguration">
93
            <value class="SampleSaveConfiguration">
86
              <time>true</time>
94
              <time>true</time>
87
              <latency>true</latency>
95
              <latency>true</latency>
Lines 105-114 Link Here
105
              <saveAssertionResultsFailureMessage>false</saveAssertionResultsFailureMessage>
113
              <saveAssertionResultsFailureMessage>false</saveAssertionResultsFailureMessage>
106
              <assertionsResultsToSave>0</assertionsResultsToSave>
114
              <assertionsResultsToSave>0</assertionsResultsToSave>
107
            </value>
115
            </value>
108
            <name>saveConfig</name>
109
          </objProp>
116
          </objProp>
110
          <stringProp name="filename">loop-test.dat</stringProp>
117
          <stringProp name="filename">loop-test.dat</stringProp>
111
          <boolProp name="ResultCollector.error_logging">false</boolProp>
112
        </ResultCollector>
118
        </ResultCollector>
113
        <hashTree/>
119
        <hashTree/>
114
      </hashTree>
120
      </hashTree>
(-)bin/testfiles/OnceOnlyTestPlan.jmx (-30 / +36 lines)
Lines 1-5 Link Here
1
<?xml version="1.0" encoding="UTF-8"?>
1
<?xml version="1.0" encoding="UTF-8"?>
2
<jmeterTestPlan version="1.2" properties="1.8">
2
<jmeterTestPlan version="1.2" properties="2.0">
3
  <hashTree>
3
  <hashTree>
4
    <TestPlan guiclass="TestPlanGui" testclass="TestPlan" testname="Test Plan" enabled="true">
4
    <TestPlan guiclass="TestPlanGui" testclass="TestPlan" testname="Test Plan" enabled="true">
5
      <collectionProp name="TestPlan.thread_groups"/>
5
      <collectionProp name="TestPlan.thread_groups"/>
Lines 9-14 Link Here
9
      <boolProp name="TestPlan.serialize_threadgroups">false</boolProp>
9
      <boolProp name="TestPlan.serialize_threadgroups">false</boolProp>
10
      <boolProp name="TestPlan.functional_mode">false</boolProp>
10
      <boolProp name="TestPlan.functional_mode">false</boolProp>
11
      <stringProp name="TestPlan.comments"></stringProp>
11
      <stringProp name="TestPlan.comments"></stringProp>
12
      <stringProp name="TestPlan.user_define_classpath"></stringProp>
12
    </TestPlan>
13
    </TestPlan>
13
    <hashTree>
14
    <hashTree>
14
      <ThreadGroup guiclass="ThreadGroupGui" testclass="ThreadGroup" testname="Jakarta Users" enabled="true">
15
      <ThreadGroup guiclass="ThreadGroupGui" testclass="ThreadGroup" testname="Jakarta Users" enabled="true">
Lines 18-25 Link Here
18
        <stringProp name="ThreadGroup.num_threads">2</stringProp>
19
        <stringProp name="ThreadGroup.num_threads">2</stringProp>
19
        <boolProp name="ThreadGroup.scheduler">false</boolProp>
20
        <boolProp name="ThreadGroup.scheduler">false</boolProp>
20
        <elementProp name="ThreadGroup.main_controller" elementType="LoopController" guiclass="LoopControlPanel" testclass="LoopController" testname="Loop Controller" enabled="true">
21
        <elementProp name="ThreadGroup.main_controller" elementType="LoopController" guiclass="LoopControlPanel" testclass="LoopController" testname="Loop Controller" enabled="true">
22
          <boolProp name="LoopController.continue_forever">false</boolProp>
21
          <stringProp name="LoopController.loops">3</stringProp>
23
          <stringProp name="LoopController.loops">3</stringProp>
22
          <boolProp name="LoopController.continue_forever">false</boolProp>
23
        </elementProp>
24
        </elementProp>
24
        <longProp name="ThreadGroup.end_time">0</longProp>
25
        <longProp name="ThreadGroup.end_time">0</longProp>
25
        <stringProp name="ThreadGroup.on_sample_error">continue</stringProp>
26
        <stringProp name="ThreadGroup.on_sample_error">continue</stringProp>
Lines 27-84 Link Here
27
      </ThreadGroup>
28
      </ThreadGroup>
28
      <hashTree>
29
      <hashTree>
29
        <ConfigTestElement guiclass="HttpDefaultsGui" testclass="ConfigTestElement" testname="Defaults" enabled="true">
30
        <ConfigTestElement guiclass="HttpDefaultsGui" testclass="ConfigTestElement" testname="Defaults" enabled="true">
30
          <stringProp name="HTTPSampler.path">/</stringProp>
31
          <stringProp name="HTTPSampler.domain">jakarta.apache.org</stringProp>
32
          <stringProp name="HTTPSampler.protocol"></stringProp>
33
          <stringProp name="HTTPSampler.port"></stringProp>
34
          <elementProp name="HTTPsampler.Arguments" elementType="Arguments" guiclass="HTTPArgumentsPanel" testclass="Arguments" enabled="true">
31
          <elementProp name="HTTPsampler.Arguments" elementType="Arguments" guiclass="HTTPArgumentsPanel" testclass="Arguments" enabled="true">
35
            <collectionProp name="Arguments.arguments"/>
32
            <collectionProp name="Arguments.arguments"/>
36
          </elementProp>
33
          </elementProp>
34
          <stringProp name="HTTPSampler.domain">jakarta.apache.org</stringProp>
35
          <stringProp name="HTTPSampler.port"></stringProp>
36
          <stringProp name="HTTPSampler.protocol"></stringProp>
37
          <stringProp name="HTTPSampler.contentEncoding"></stringProp>
38
          <stringProp name="HTTPSampler.path">/</stringProp>
37
        </ConfigTestElement>
39
        </ConfigTestElement>
38
        <hashTree/>
40
        <hashTree/>
39
        <OnceOnlyController guiclass="OnceOnlyControllerGui" testclass="OnceOnlyController" testname="Once Only Controller" enabled="true"/>
41
        <OnceOnlyController guiclass="OnceOnlyControllerGui" testclass="OnceOnlyController" testname="Once Only Controller" enabled="true"/>
40
        <hashTree>
42
        <hashTree>
41
          <HTTPSampler guiclass="HttpTestSampleGui" testclass="HTTPSampler" testname="Home Page" enabled="true">
43
          <HTTPSampler guiclass="HttpTestSampleGui" testclass="HTTPSampler" testname="Home Page" enabled="true">
44
            <elementProp name="HTTPsampler.Arguments" elementType="Arguments" guiclass="HTTPArgumentsPanel" testclass="Arguments" enabled="true">
45
              <collectionProp name="Arguments.arguments"/>
46
            </elementProp>
47
            <stringProp name="HTTPSampler.domain"></stringProp>
48
            <stringProp name="HTTPSampler.port"></stringProp>
49
            <stringProp name="HTTPSampler.protocol">http</stringProp>
50
            <stringProp name="HTTPSampler.contentEncoding"></stringProp>
42
            <stringProp name="HTTPSampler.path">/</stringProp>
51
            <stringProp name="HTTPSampler.path">/</stringProp>
43
            <stringProp name="HTTPSampler.method">GET</stringProp>
52
            <stringProp name="HTTPSampler.method">GET</stringProp>
53
            <boolProp name="HTTPSampler.follow_redirects">false</boolProp>
54
            <boolProp name="HTTPSampler.auto_redirects">false</boolProp>
44
            <boolProp name="HTTPSampler.use_keepalive">false</boolProp>
55
            <boolProp name="HTTPSampler.use_keepalive">false</boolProp>
45
            <stringProp name="HTTPSampler.protocol">http</stringProp>
56
            <boolProp name="HTTPSampler.DO_MULTIPART_POST">false</boolProp>
46
            <boolProp name="HTTPSampler.image_parser">false</boolProp>
57
            <elementProp name="HTTPsampler.Files" elementType="HTTPFileArgs" guiclass="HTTPFileArgsPanel" testclass="HTTPFileArgs" enabled="true">
47
            <boolProp name="HTTPSampler.follow_redirects">false</boolProp>
58
              <collectionProp name="HTTPFileArgs.files"/>
48
            <elementProp name="HTTPsampler.Arguments" elementType="Arguments" guiclass="HTTPArgumentsPanel" testclass="Arguments" enabled="true">
49
              <collectionProp name="Arguments.arguments"/>
50
            </elementProp>
59
            </elementProp>
51
            <stringProp name="HTTPSampler.port"></stringProp>
52
            <stringProp name="HTTPSampler.mimetype"></stringProp>
53
            <stringProp name="HTTPSampler.FILE_FIELD"></stringProp>
54
            <stringProp name="HTTPSampler.monitor">false</stringProp>
60
            <stringProp name="HTTPSampler.monitor">false</stringProp>
55
            <stringProp name="HTTPSampler.domain"></stringProp>
61
            <stringProp name="HTTPSampler.embedded_url_re"></stringProp>
56
            <stringProp name="HTTPSampler.FILE_NAME"></stringProp>
57
            <boolProp name="HTTPSampler.auto_redirects">false</boolProp>
58
          </HTTPSampler>
62
          </HTTPSampler>
59
          <hashTree/>
63
          <hashTree/>
60
        </hashTree>
64
        </hashTree>
61
        <HTTPSampler guiclass="HttpTestSampleGui" testclass="HTTPSampler" testname="Bug Page" enabled="true">
65
        <HTTPSampler guiclass="HttpTestSampleGui" testclass="HTTPSampler" testname="Bug Page" enabled="true">
66
          <elementProp name="HTTPsampler.Arguments" elementType="Arguments" guiclass="HTTPArgumentsPanel" testclass="Arguments" enabled="true">
67
            <collectionProp name="Arguments.arguments"/>
68
          </elementProp>
69
          <stringProp name="HTTPSampler.domain"></stringProp>
70
          <stringProp name="HTTPSampler.port"></stringProp>
71
          <stringProp name="HTTPSampler.protocol">http</stringProp>
72
          <stringProp name="HTTPSampler.contentEncoding"></stringProp>
62
          <stringProp name="HTTPSampler.path">/site/bugs.html</stringProp>
73
          <stringProp name="HTTPSampler.path">/site/bugs.html</stringProp>
63
          <stringProp name="HTTPSampler.method">GET</stringProp>
74
          <stringProp name="HTTPSampler.method">GET</stringProp>
75
          <boolProp name="HTTPSampler.follow_redirects">false</boolProp>
76
          <boolProp name="HTTPSampler.auto_redirects">false</boolProp>
64
          <boolProp name="HTTPSampler.use_keepalive">false</boolProp>
77
          <boolProp name="HTTPSampler.use_keepalive">false</boolProp>
65
          <stringProp name="HTTPSampler.protocol">http</stringProp>
78
          <boolProp name="HTTPSampler.DO_MULTIPART_POST">false</boolProp>
66
          <boolProp name="HTTPSampler.image_parser">false</boolProp>
79
          <elementProp name="HTTPsampler.Files" elementType="HTTPFileArgs" guiclass="HTTPFileArgsPanel" testclass="HTTPFileArgs" enabled="true">
67
          <boolProp name="HTTPSampler.follow_redirects">false</boolProp>
80
            <collectionProp name="HTTPFileArgs.files"/>
68
          <elementProp name="HTTPsampler.Arguments" elementType="Arguments" guiclass="HTTPArgumentsPanel" testclass="Arguments" enabled="true">
69
            <collectionProp name="Arguments.arguments"/>
70
          </elementProp>
81
          </elementProp>
71
          <stringProp name="HTTPSampler.port"></stringProp>
72
          <stringProp name="HTTPSampler.mimetype"></stringProp>
73
          <stringProp name="HTTPSampler.FILE_FIELD"></stringProp>
74
          <stringProp name="HTTPSampler.monitor">false</stringProp>
82
          <stringProp name="HTTPSampler.monitor">false</stringProp>
75
          <stringProp name="HTTPSampler.domain"></stringProp>
83
          <stringProp name="HTTPSampler.embedded_url_re"></stringProp>
76
          <stringProp name="HTTPSampler.FILE_NAME"></stringProp>
77
          <boolProp name="HTTPSampler.auto_redirects">false</boolProp>
78
        </HTTPSampler>
84
        </HTTPSampler>
79
        <hashTree/>
85
        <hashTree/>
80
        <ResultCollector guiclass="GraphVisualizer" testclass="ResultCollector" testname="File Reporter" enabled="true">
86
        <ResultCollector guiclass="GraphVisualizer" testclass="ResultCollector" testname="File Reporter" enabled="true">
87
          <boolProp name="ResultCollector.error_logging">false</boolProp>
81
          <objProp>
88
          <objProp>
89
            <name>saveConfig</name>
82
            <value class="SampleSaveConfiguration">
90
            <value class="SampleSaveConfiguration">
83
              <time>true</time>
91
              <time>true</time>
84
              <latency>true</latency>
92
              <latency>true</latency>
Lines 102-111 Link Here
102
              <saveAssertionResultsFailureMessage>false</saveAssertionResultsFailureMessage>
110
              <saveAssertionResultsFailureMessage>false</saveAssertionResultsFailureMessage>
103
              <assertionsResultsToSave>0</assertionsResultsToSave>
111
              <assertionsResultsToSave>0</assertionsResultsToSave>
104
            </value>
112
            </value>
105
            <name>saveConfig</name>
106
          </objProp>
113
          </objProp>
107
          <stringProp name="filename">once-only-test.dat</stringProp>
114
          <stringProp name="filename">once-only-test.dat</stringProp>
108
          <boolProp name="ResultCollector.error_logging">false</boolProp>
109
        </ResultCollector>
115
        </ResultCollector>
110
        <hashTree/>
116
        <hashTree/>
111
      </hashTree>
117
      </hashTree>
(-)bin/testfiles/AuthManagerTestPlan.jmx (-43 / +51 lines)
Lines 1-5 Link Here
1
<?xml version="1.0" encoding="UTF-8"?>
1
<?xml version="1.0" encoding="UTF-8"?>
2
<jmeterTestPlan version="1.2" properties="1.8">
2
<jmeterTestPlan version="1.2" properties="2.0">
3
  <hashTree>
3
  <hashTree>
4
    <TestPlan guiclass="TestPlanGui" testclass="TestPlan" testname="Test Plan" enabled="true">
4
    <TestPlan guiclass="TestPlanGui" testclass="TestPlan" testname="Test Plan" enabled="true">
5
      <collectionProp name="TestPlan.thread_groups"/>
5
      <collectionProp name="TestPlan.thread_groups"/>
Lines 9-14 Link Here
9
      <boolProp name="TestPlan.serialize_threadgroups">false</boolProp>
9
      <boolProp name="TestPlan.serialize_threadgroups">false</boolProp>
10
      <boolProp name="TestPlan.functional_mode">false</boolProp>
10
      <boolProp name="TestPlan.functional_mode">false</boolProp>
11
      <stringProp name="TestPlan.comments"></stringProp>
11
      <stringProp name="TestPlan.comments"></stringProp>
12
      <stringProp name="TestPlan.user_define_classpath"></stringProp>
12
    </TestPlan>
13
    </TestPlan>
13
    <hashTree>
14
    <hashTree>
14
      <ThreadGroup guiclass="ThreadGroupGui" testclass="ThreadGroup" testname="Thread Group" enabled="true">
15
      <ThreadGroup guiclass="ThreadGroupGui" testclass="ThreadGroup" testname="Thread Group" enabled="true">
Lines 18-25 Link Here
18
        <stringProp name="ThreadGroup.num_threads">1</stringProp>
19
        <stringProp name="ThreadGroup.num_threads">1</stringProp>
19
        <boolProp name="ThreadGroup.scheduler">false</boolProp>
20
        <boolProp name="ThreadGroup.scheduler">false</boolProp>
20
        <elementProp name="ThreadGroup.main_controller" elementType="LoopController" guiclass="LoopControlPanel" testclass="LoopController" testname="Loop Controller" enabled="true">
21
        <elementProp name="ThreadGroup.main_controller" elementType="LoopController" guiclass="LoopControlPanel" testclass="LoopController" testname="Loop Controller" enabled="true">
22
          <boolProp name="LoopController.continue_forever">false</boolProp>
21
          <stringProp name="LoopController.loops">1</stringProp>
23
          <stringProp name="LoopController.loops">1</stringProp>
22
          <boolProp name="LoopController.continue_forever">false</boolProp>
23
        </elementProp>
24
        </elementProp>
24
        <longProp name="ThreadGroup.end_time">0</longProp>
25
        <longProp name="ThreadGroup.end_time">0</longProp>
25
        <stringProp name="ThreadGroup.on_sample_error">continue</stringProp>
26
        <stringProp name="ThreadGroup.on_sample_error">continue</stringProp>
Lines 30-112 Link Here
30
          <collectionProp name="AuthManager.auth_list">
31
          <collectionProp name="AuthManager.auth_list">
31
            <elementProp name="" elementType="Authorization">
32
            <elementProp name="" elementType="Authorization">
32
              <stringProp name="Authorization.url">http://localhost/secret</stringProp>
33
              <stringProp name="Authorization.url">http://localhost/secret</stringProp>
34
              <stringProp name="Authorization.username">kevin</stringProp>
35
              <stringProp name="Authorization.password">spot</stringProp>
36
              <stringProp name="Authorization.domain"></stringProp>
33
              <stringProp name="Authorization.realm"></stringProp>
37
              <stringProp name="Authorization.realm"></stringProp>
34
              <stringProp name="Authorization.domain"></stringProp>
35
              <stringProp name="Authorization.password">spot</stringProp>
36
              <stringProp name="Authorization.username">kevin</stringProp>
37
            </elementProp>
38
            </elementProp>
38
          </collectionProp>
39
          </collectionProp>
39
        </AuthManager>
40
        </AuthManager>
40
        <hashTree/>
41
        <hashTree/>
41
        <ConfigTestElement guiclass="HttpDefaultsGui" testclass="ConfigTestElement" testname="HTTP Request Defaults" enabled="true">
42
        <ConfigTestElement guiclass="HttpDefaultsGui" testclass="ConfigTestElement" testname="HTTP Request Defaults" enabled="true">
42
          <stringProp name="HTTPSampler.path">/</stringProp>
43
          <stringProp name="HTTPSampler.domain">localhost</stringProp>
44
          <stringProp name="HTTPSampler.protocol"></stringProp>
45
          <elementProp name="HTTPsampler.Arguments" elementType="Arguments" guiclass="HTTPArgumentsPanel" testclass="Arguments" enabled="true">
43
          <elementProp name="HTTPsampler.Arguments" elementType="Arguments" guiclass="HTTPArgumentsPanel" testclass="Arguments" enabled="true">
46
            <collectionProp name="Arguments.arguments"/>
44
            <collectionProp name="Arguments.arguments"/>
47
          </elementProp>
45
          </elementProp>
46
          <stringProp name="HTTPSampler.domain">localhost</stringProp>
48
          <stringProp name="HTTPSampler.port"></stringProp>
47
          <stringProp name="HTTPSampler.port"></stringProp>
48
          <stringProp name="HTTPSampler.protocol"></stringProp>
49
          <stringProp name="HTTPSampler.contentEncoding"></stringProp>
50
          <stringProp name="HTTPSampler.path">/</stringProp>
49
        </ConfigTestElement>
51
        </ConfigTestElement>
50
        <hashTree/>
52
        <hashTree/>
51
        <HTTPSampler guiclass="HttpTestSampleGui" testclass="HTTPSampler" testname="SecretPage1" enabled="true">
53
        <HTTPSampler guiclass="HttpTestSampleGui" testclass="HTTPSampler" testname="SecretPage1" enabled="true">
54
          <elementProp name="HTTPsampler.Arguments" elementType="Arguments" guiclass="HTTPArgumentsPanel" testclass="Arguments" enabled="true">
55
            <collectionProp name="Arguments.arguments"/>
56
          </elementProp>
57
          <stringProp name="HTTPSampler.domain"></stringProp>
58
          <stringProp name="HTTPSampler.port"></stringProp>
59
          <stringProp name="HTTPSampler.protocol">http</stringProp>
60
          <stringProp name="HTTPSampler.contentEncoding"></stringProp>
52
          <stringProp name="HTTPSampler.path">/secret/index.html</stringProp>
61
          <stringProp name="HTTPSampler.path">/secret/index.html</stringProp>
53
          <stringProp name="HTTPSampler.method">GET</stringProp>
62
          <stringProp name="HTTPSampler.method">GET</stringProp>
63
          <boolProp name="HTTPSampler.follow_redirects">false</boolProp>
64
          <boolProp name="HTTPSampler.auto_redirects">false</boolProp>
54
          <boolProp name="HTTPSampler.use_keepalive">false</boolProp>
65
          <boolProp name="HTTPSampler.use_keepalive">false</boolProp>
55
          <stringProp name="HTTPSampler.protocol">http</stringProp>
66
          <boolProp name="HTTPSampler.DO_MULTIPART_POST">false</boolProp>
56
          <boolProp name="HTTPSampler.image_parser">false</boolProp>
67
          <elementProp name="HTTPsampler.Files" elementType="HTTPFileArgs" guiclass="HTTPFileArgsPanel" testclass="HTTPFileArgs" enabled="true">
57
          <boolProp name="HTTPSampler.follow_redirects">false</boolProp>
68
            <collectionProp name="HTTPFileArgs.files"/>
58
          <elementProp name="HTTPsampler.Arguments" elementType="Arguments" guiclass="HTTPArgumentsPanel" testclass="Arguments" enabled="true">
59
            <collectionProp name="Arguments.arguments"/>
60
          </elementProp>
69
          </elementProp>
61
          <stringProp name="HTTPSampler.port"></stringProp>
62
          <stringProp name="HTTPSampler.mimetype"></stringProp>
63
          <stringProp name="HTTPSampler.FILE_FIELD"></stringProp>
64
          <stringProp name="HTTPSampler.domain"></stringProp>
65
          <stringProp name="HTTPSampler.monitor">false</stringProp>
70
          <stringProp name="HTTPSampler.monitor">false</stringProp>
66
          <stringProp name="HTTPSampler.FILE_NAME"></stringProp>
71
          <stringProp name="HTTPSampler.embedded_url_re"></stringProp>
67
          <boolProp name="HTTPSampler.auto_redirects">false</boolProp>
68
        </HTTPSampler>
72
        </HTTPSampler>
69
        <hashTree/>
73
        <hashTree/>
70
        <HTTPSampler guiclass="HttpTestSampleGui" testclass="HTTPSampler" testname="SecretPage2" enabled="true">
74
        <HTTPSampler guiclass="HttpTestSampleGui" testclass="HTTPSampler" testname="SecretPage2" enabled="true">
75
          <elementProp name="HTTPsampler.Arguments" elementType="Arguments" guiclass="HTTPArgumentsPanel" testclass="Arguments" enabled="true">
76
            <collectionProp name="Arguments.arguments"/>
77
          </elementProp>
78
          <stringProp name="HTTPSampler.domain"></stringProp>
79
          <stringProp name="HTTPSampler.port"></stringProp>
80
          <stringProp name="HTTPSampler.protocol">http</stringProp>
81
          <stringProp name="HTTPSampler.contentEncoding"></stringProp>
71
          <stringProp name="HTTPSampler.path">/secret/index2.html</stringProp>
82
          <stringProp name="HTTPSampler.path">/secret/index2.html</stringProp>
72
          <stringProp name="HTTPSampler.method">GET</stringProp>
83
          <stringProp name="HTTPSampler.method">GET</stringProp>
84
          <boolProp name="HTTPSampler.follow_redirects">false</boolProp>
85
          <boolProp name="HTTPSampler.auto_redirects">false</boolProp>
73
          <boolProp name="HTTPSampler.use_keepalive">false</boolProp>
86
          <boolProp name="HTTPSampler.use_keepalive">false</boolProp>
74
          <stringProp name="HTTPSampler.protocol">http</stringProp>
87
          <boolProp name="HTTPSampler.DO_MULTIPART_POST">false</boolProp>
75
          <boolProp name="HTTPSampler.image_parser">false</boolProp>
88
          <elementProp name="HTTPsampler.Files" elementType="HTTPFileArgs" guiclass="HTTPFileArgsPanel" testclass="HTTPFileArgs" enabled="true">
76
          <boolProp name="HTTPSampler.follow_redirects">false</boolProp>
89
            <collectionProp name="HTTPFileArgs.files"/>
77
          <elementProp name="HTTPsampler.Arguments" elementType="Arguments" guiclass="HTTPArgumentsPanel" testclass="Arguments" enabled="true">
78
            <collectionProp name="Arguments.arguments"/>
79
          </elementProp>
90
          </elementProp>
80
          <stringProp name="HTTPSampler.port"></stringProp>
81
          <stringProp name="HTTPSampler.mimetype"></stringProp>
82
          <stringProp name="HTTPSampler.FILE_FIELD"></stringProp>
83
          <stringProp name="HTTPSampler.domain"></stringProp>
84
          <stringProp name="HTTPSampler.monitor">false</stringProp>
91
          <stringProp name="HTTPSampler.monitor">false</stringProp>
85
          <stringProp name="HTTPSampler.FILE_NAME"></stringProp>
92
          <stringProp name="HTTPSampler.embedded_url_re"></stringProp>
86
          <boolProp name="HTTPSampler.auto_redirects">false</boolProp>
87
        </HTTPSampler>
93
        </HTTPSampler>
88
        <hashTree/>
94
        <hashTree/>
89
        <HTTPSampler guiclass="HttpTestSampleGui" testclass="HTTPSampler" testname="NoSecretPage" enabled="true">
95
        <HTTPSampler guiclass="HttpTestSampleGui" testclass="HTTPSampler" testname="NoSecretPage" enabled="true">
96
          <elementProp name="HTTPsampler.Arguments" elementType="Arguments" guiclass="HTTPArgumentsPanel" testclass="Arguments" enabled="true">
97
            <collectionProp name="Arguments.arguments"/>
98
          </elementProp>
99
          <stringProp name="HTTPSampler.domain"></stringProp>
100
          <stringProp name="HTTPSampler.port"></stringProp>
101
          <stringProp name="HTTPSampler.protocol">http</stringProp>
102
          <stringProp name="HTTPSampler.contentEncoding"></stringProp>
90
          <stringProp name="HTTPSampler.path">/index.html</stringProp>
103
          <stringProp name="HTTPSampler.path">/index.html</stringProp>
91
          <stringProp name="HTTPSampler.method">GET</stringProp>
104
          <stringProp name="HTTPSampler.method">GET</stringProp>
105
          <boolProp name="HTTPSampler.follow_redirects">false</boolProp>
106
          <boolProp name="HTTPSampler.auto_redirects">false</boolProp>
92
          <boolProp name="HTTPSampler.use_keepalive">false</boolProp>
107
          <boolProp name="HTTPSampler.use_keepalive">false</boolProp>
93
          <stringProp name="HTTPSampler.protocol">http</stringProp>
108
          <boolProp name="HTTPSampler.DO_MULTIPART_POST">false</boolProp>
94
          <boolProp name="HTTPSampler.image_parser">false</boolProp>
109
          <elementProp name="HTTPsampler.Files" elementType="HTTPFileArgs" guiclass="HTTPFileArgsPanel" testclass="HTTPFileArgs" enabled="true">
95
          <boolProp name="HTTPSampler.follow_redirects">false</boolProp>
110
            <collectionProp name="HTTPFileArgs.files"/>
96
          <elementProp name="HTTPsampler.Arguments" elementType="Arguments" guiclass="HTTPArgumentsPanel" testclass="Arguments" enabled="true">
97
            <collectionProp name="Arguments.arguments"/>
98
          </elementProp>
111
          </elementProp>
99
          <stringProp name="HTTPSampler.port"></stringProp>
100
          <stringProp name="HTTPSampler.mimetype"></stringProp>
101
          <stringProp name="HTTPSampler.FILE_FIELD"></stringProp>
102
          <stringProp name="HTTPSampler.domain"></stringProp>
103
          <stringProp name="HTTPSampler.monitor">false</stringProp>
112
          <stringProp name="HTTPSampler.monitor">false</stringProp>
104
          <stringProp name="HTTPSampler.FILE_NAME"></stringProp>
113
          <stringProp name="HTTPSampler.embedded_url_re"></stringProp>
105
          <boolProp name="HTTPSampler.auto_redirects">false</boolProp>
106
        </HTTPSampler>
114
        </HTTPSampler>
107
        <hashTree/>
115
        <hashTree/>
108
        <ResultCollector guiclass="GraphVisualizer" testclass="ResultCollector" testname="File Reporter" enabled="true">
116
        <ResultCollector guiclass="GraphVisualizer" testclass="ResultCollector" testname="File Reporter" enabled="true">
117
          <boolProp name="ResultCollector.error_logging">false</boolProp>
109
          <objProp>
118
          <objProp>
119
            <name>saveConfig</name>
110
            <value class="SampleSaveConfiguration">
120
            <value class="SampleSaveConfiguration">
111
              <time>true</time>
121
              <time>true</time>
112
              <latency>true</latency>
122
              <latency>true</latency>
Lines 130-139 Link Here
130
              <saveAssertionResultsFailureMessage>false</saveAssertionResultsFailureMessage>
140
              <saveAssertionResultsFailureMessage>false</saveAssertionResultsFailureMessage>
131
              <assertionsResultsToSave>0</assertionsResultsToSave>
141
              <assertionsResultsToSave>0</assertionsResultsToSave>
132
            </value>
142
            </value>
133
            <name>saveConfig</name>
134
          </objProp>
143
          </objProp>
135
          <stringProp name="filename">auth-manager.dat</stringProp>
144
          <stringProp name="filename">auth-manager.dat</stringProp>
136
          <boolProp name="ResultCollector.error_logging">false</boolProp>
137
        </ResultCollector>
145
        </ResultCollector>
138
        <hashTree/>
146
        <hashTree/>
139
      </hashTree>
147
      </hashTree>
(-)bin/testfiles/AssertionTestPlan.jmx (-17 / +20 lines)
Lines 1-5 Link Here
1
<?xml version="1.0" encoding="UTF-8"?>
1
<?xml version="1.0" encoding="UTF-8"?>
2
<jmeterTestPlan version="1.2" properties="1.8">
2
<jmeterTestPlan version="1.2" properties="2.0">
3
  <hashTree>
3
  <hashTree>
4
    <TestPlan guiclass="TestPlanGui" testclass="TestPlan" testname="Test Plan" enabled="true">
4
    <TestPlan guiclass="TestPlanGui" testclass="TestPlan" testname="Test Plan" enabled="true">
5
      <collectionProp name="TestPlan.thread_groups"/>
5
      <collectionProp name="TestPlan.thread_groups"/>
Lines 9-14 Link Here
9
      <boolProp name="TestPlan.serialize_threadgroups">false</boolProp>
9
      <boolProp name="TestPlan.serialize_threadgroups">false</boolProp>
10
      <boolProp name="TestPlan.functional_mode">false</boolProp>
10
      <boolProp name="TestPlan.functional_mode">false</boolProp>
11
      <stringProp name="TestPlan.comments"></stringProp>
11
      <stringProp name="TestPlan.comments"></stringProp>
12
      <stringProp name="TestPlan.user_define_classpath"></stringProp>
12
    </TestPlan>
13
    </TestPlan>
13
    <hashTree>
14
    <hashTree>
14
      <ThreadGroup guiclass="ThreadGroupGui" testclass="ThreadGroup" testname="Thread Group" enabled="true">
15
      <ThreadGroup guiclass="ThreadGroupGui" testclass="ThreadGroup" testname="Thread Group" enabled="true">
Lines 18-25 Link Here
18
        <stringProp name="ThreadGroup.num_threads">1</stringProp>
19
        <stringProp name="ThreadGroup.num_threads">1</stringProp>
19
        <boolProp name="ThreadGroup.scheduler">false</boolProp>
20
        <boolProp name="ThreadGroup.scheduler">false</boolProp>
20
        <elementProp name="ThreadGroup.main_controller" elementType="LoopController" guiclass="LoopControlPanel" testclass="LoopController" testname="Loop Controller" enabled="true">
21
        <elementProp name="ThreadGroup.main_controller" elementType="LoopController" guiclass="LoopControlPanel" testclass="LoopController" testname="Loop Controller" enabled="true">
22
          <boolProp name="LoopController.continue_forever">false</boolProp>
21
          <stringProp name="LoopController.loops">1</stringProp>
23
          <stringProp name="LoopController.loops">1</stringProp>
22
          <boolProp name="LoopController.continue_forever">false</boolProp>
23
        </elementProp>
24
        </elementProp>
24
        <longProp name="ThreadGroup.end_time">0</longProp>
25
        <longProp name="ThreadGroup.end_time">0</longProp>
25
        <stringProp name="ThreadGroup.on_sample_error">continue</stringProp>
26
        <stringProp name="ThreadGroup.on_sample_error">continue</stringProp>
Lines 27-48 Link Here
27
      </ThreadGroup>
28
      </ThreadGroup>
28
      <hashTree>
29
      <hashTree>
29
        <HTTPSampler guiclass="HttpTestSampleGui" testclass="HTTPSampler" testname="HTTP Request" enabled="true">
30
        <HTTPSampler guiclass="HttpTestSampleGui" testclass="HTTPSampler" testname="HTTP Request" enabled="true">
31
          <elementProp name="HTTPsampler.Arguments" elementType="Arguments" guiclass="HTTPArgumentsPanel" testclass="Arguments" enabled="true">
32
            <collectionProp name="Arguments.arguments"/>
33
          </elementProp>
34
          <stringProp name="HTTPSampler.domain">jakarta.apache.org</stringProp>
35
          <stringProp name="HTTPSampler.port"></stringProp>
36
          <stringProp name="HTTPSampler.protocol">http</stringProp>
37
          <stringProp name="HTTPSampler.contentEncoding"></stringProp>
30
          <stringProp name="HTTPSampler.path">/</stringProp>
38
          <stringProp name="HTTPSampler.path">/</stringProp>
31
          <stringProp name="HTTPSampler.method">GET</stringProp>
39
          <stringProp name="HTTPSampler.method">GET</stringProp>
40
          <boolProp name="HTTPSampler.follow_redirects">false</boolProp>
41
          <boolProp name="HTTPSampler.auto_redirects">false</boolProp>
32
          <boolProp name="HTTPSampler.use_keepalive">false</boolProp>
42
          <boolProp name="HTTPSampler.use_keepalive">false</boolProp>
33
          <stringProp name="HTTPSampler.protocol">http</stringProp>
43
          <boolProp name="HTTPSampler.DO_MULTIPART_POST">false</boolProp>
34
          <boolProp name="HTTPSampler.image_parser">false</boolProp>
44
          <elementProp name="HTTPsampler.Files" elementType="HTTPFileArgs" guiclass="HTTPFileArgsPanel" testclass="HTTPFileArgs" enabled="true">
35
          <boolProp name="HTTPSampler.follow_redirects">false</boolProp>
45
            <collectionProp name="HTTPFileArgs.files"/>
36
          <elementProp name="HTTPsampler.Arguments" elementType="Arguments" guiclass="HTTPArgumentsPanel" testclass="Arguments" enabled="true">
37
            <collectionProp name="Arguments.arguments"/>
38
          </elementProp>
46
          </elementProp>
39
          <stringProp name="HTTPSampler.port"></stringProp>
40
          <stringProp name="HTTPSampler.mimetype"></stringProp>
41
          <stringProp name="HTTPSampler.FILE_FIELD"></stringProp>
42
          <stringProp name="HTTPSampler.domain">jakarta.apache.org</stringProp>
43
          <stringProp name="HTTPSampler.monitor">false</stringProp>
47
          <stringProp name="HTTPSampler.monitor">false</stringProp>
44
          <stringProp name="HTTPSampler.FILE_NAME"></stringProp>
48
          <stringProp name="HTTPSampler.embedded_url_re"></stringProp>
45
          <boolProp name="HTTPSampler.auto_redirects">false</boolProp>
46
        </HTTPSampler>
49
        </HTTPSampler>
47
        <hashTree>
50
        <hashTree>
48
          <ResponseAssertion guiclass="AssertionGui" testclass="ResponseAssertion" testname="Assertion" enabled="true">
51
          <ResponseAssertion guiclass="AssertionGui" testclass="ResponseAssertion" testname="Assertion" enabled="true">
Lines 56-62 Link Here
56
          <hashTree/>
59
          <hashTree/>
57
        </hashTree>
60
        </hashTree>
58
        <ResultCollector guiclass="GraphVisualizer" testclass="ResultCollector" testname="File Reporter" enabled="true">
61
        <ResultCollector guiclass="GraphVisualizer" testclass="ResultCollector" testname="File Reporter" enabled="true">
62
          <boolProp name="ResultCollector.error_logging">false</boolProp>
59
          <objProp>
63
          <objProp>
64
            <name>saveConfig</name>
60
            <value class="SampleSaveConfiguration">
65
            <value class="SampleSaveConfiguration">
61
              <time>true</time>
66
              <time>true</time>
62
              <latency>true</latency>
67
              <latency>true</latency>
Lines 80-93 Link Here
80
              <saveAssertionResultsFailureMessage>false</saveAssertionResultsFailureMessage>
85
              <saveAssertionResultsFailureMessage>false</saveAssertionResultsFailureMessage>
81
              <assertionsResultsToSave>0</assertionsResultsToSave>
86
              <assertionsResultsToSave>0</assertionsResultsToSave>
82
            </value>
87
            </value>
83
            <name>saveConfig</name>
84
          </objProp>
88
          </objProp>
85
          <stringProp name="filename">assertion.dat</stringProp>
89
          <stringProp name="filename">assertion.dat</stringProp>
86
          <boolProp name="ResultCollector.error_logging">false</boolProp>
87
        </ResultCollector>
90
        </ResultCollector>
88
        <hashTree/>
91
        <hashTree/>
89
        <ResultCollector guiclass="AssertionVisualizer" testclass="ResultCollector" testname="Assertion Results" enabled="true">
92
        <ResultCollector guiclass="AssertionVisualizer" testclass="ResultCollector" testname="Assertion Results" enabled="true">
93
          <boolProp name="ResultCollector.error_logging">false</boolProp>
90
          <objProp>
94
          <objProp>
95
            <name>saveConfig</name>
91
            <value class="SampleSaveConfiguration">
96
            <value class="SampleSaveConfiguration">
92
              <time>true</time>
97
              <time>true</time>
93
              <latency>true</latency>
98
              <latency>true</latency>
Lines 111-120 Link Here
111
              <saveAssertionResultsFailureMessage>false</saveAssertionResultsFailureMessage>
116
              <saveAssertionResultsFailureMessage>false</saveAssertionResultsFailureMessage>
112
              <assertionsResultsToSave>0</assertionsResultsToSave>
117
              <assertionsResultsToSave>0</assertionsResultsToSave>
113
            </value>
118
            </value>
114
            <name>saveConfig</name>
115
          </objProp>
119
          </objProp>
116
          <stringProp name="filename"></stringProp>
120
          <stringProp name="filename"></stringProp>
117
          <boolProp name="ResultCollector.error_logging">false</boolProp>
118
        </ResultCollector>
121
        </ResultCollector>
119
        <hashTree/>
122
        <hashTree/>
120
      </hashTree>
123
      </hashTree>
(-)bin/testfiles/GuiTest.jmx (-89 / +134 lines)
Lines 1-5 Link Here
1
<?xml version="1.0" encoding="UTF-8"?>
1
<?xml version="1.0" encoding="UTF-8"?>
2
<jmeterTestPlan version="1.2" properties="1.8">
2
<jmeterTestPlan version="1.2" properties="2.0">
3
  <hashTree>
3
  <hashTree>
4
    <TestPlan guiclass="TestPlanGui" testclass="TestPlan" testname="Test Plan" enabled="true">
4
    <TestPlan guiclass="TestPlanGui" testclass="TestPlan" testname="Test Plan" enabled="true">
5
      <collectionProp name="TestPlan.thread_groups"/>
5
      <collectionProp name="TestPlan.thread_groups"/>
Lines 20-25 Link Here
20
      <boolProp name="TestPlan.serialize_threadgroups">false</boolProp>
20
      <boolProp name="TestPlan.serialize_threadgroups">false</boolProp>
21
      <boolProp name="TestPlan.functional_mode">false</boolProp>
21
      <boolProp name="TestPlan.functional_mode">false</boolProp>
22
      <stringProp name="TestPlan.comments"></stringProp>
22
      <stringProp name="TestPlan.comments"></stringProp>
23
      <stringProp name="TestPlan.user_define_classpath"></stringProp>
23
    </TestPlan>
24
    </TestPlan>
24
    <hashTree>
25
    <hashTree>
25
      <ThreadGroup guiclass="ThreadGroupGui" testclass="ThreadGroup" testname="Components" enabled="true">
26
      <ThreadGroup guiclass="ThreadGroupGui" testclass="ThreadGroup" testname="Components" enabled="true">
Lines 29-36 Link Here
29
        <stringProp name="ThreadGroup.num_threads">1</stringProp>
30
        <stringProp name="ThreadGroup.num_threads">1</stringProp>
30
        <boolProp name="ThreadGroup.scheduler">false</boolProp>
31
        <boolProp name="ThreadGroup.scheduler">false</boolProp>
31
        <elementProp name="ThreadGroup.main_controller" elementType="LoopController" guiclass="LoopControlPanel" testclass="LoopController" testname="Loop Controller" enabled="true">
32
        <elementProp name="ThreadGroup.main_controller" elementType="LoopController" guiclass="LoopControlPanel" testclass="LoopController" testname="Loop Controller" enabled="true">
33
          <boolProp name="LoopController.continue_forever">false</boolProp>
32
          <intProp name="LoopController.loops">-1</intProp>
34
          <intProp name="LoopController.loops">-1</intProp>
33
          <boolProp name="LoopController.continue_forever">false</boolProp>
34
        </elementProp>
35
        </elementProp>
35
        <longProp name="ThreadGroup.end_time">0</longProp>
36
        <longProp name="ThreadGroup.end_time">0</longProp>
36
        <stringProp name="ThreadGroup.on_sample_error">continue</stringProp>
37
        <stringProp name="ThreadGroup.on_sample_error">continue</stringProp>
Lines 56-62 Link Here
56
          </ResponseAssertion>
57
          </ResponseAssertion>
57
          <hashTree/>
58
          <hashTree/>
58
          <DurationAssertion guiclass="DurationAssertionGui" testclass="DurationAssertion" testname="Duration Assertion" enabled="true">
59
          <DurationAssertion guiclass="DurationAssertionGui" testclass="DurationAssertion" testname="Duration Assertion" enabled="true">
59
            <longProp name="DurationAssertion.duration">0</longProp>
60
            <stringProp name="DurationAssertion.duration">0</stringProp>
60
          </DurationAssertion>
61
          </DurationAssertion>
61
          <hashTree/>
62
          <hashTree/>
62
          <SizeAssertion guiclass="SizeAssertionGui" testclass="SizeAssertion" testname="Size Assertion" enabled="true">
63
          <SizeAssertion guiclass="SizeAssertionGui" testclass="SizeAssertion" testname="Size Assertion" enabled="true">
Lines 91-107 Link Here
91
          <hashTree/>
92
          <hashTree/>
92
          <ThroughputController guiclass="ThroughputControllerGui" testclass="ThroughputController" testname="Throughput Controller" enabled="true">
93
          <ThroughputController guiclass="ThroughputControllerGui" testclass="ThroughputController" testname="Throughput Controller" enabled="true">
93
            <intProp name="ThroughputController.style">0</intProp>
94
            <intProp name="ThroughputController.style">0</intProp>
95
            <boolProp name="ThroughputController.perThread">true</boolProp>
96
            <intProp name="ThroughputController.maxThroughput">1</intProp>
94
            <FloatProperty>
97
            <FloatProperty>
98
              <name>ThroughputController.percentThroughput</name>
95
              <value>100.0</value>
99
              <value>100.0</value>
96
              <savedValue>0.0</savedValue>
100
              <savedValue>0.0</savedValue>
97
              <name>ThroughputController.percentThroughput</name>
98
            </FloatProperty>
101
            </FloatProperty>
99
            <boolProp name="ThroughputController.perThread">true</boolProp>
100
            <intProp name="ThroughputController.maxThroughput">1</intProp>
101
          </ThroughputController>
102
          </ThroughputController>
102
          <hashTree/>
103
          <hashTree/>
103
          <IfController guiclass="IfControllerPanel" testclass="IfController" testname="If Controller" enabled="true">
104
          <IfController guiclass="IfControllerPanel" testclass="IfController" testname="If Controller" enabled="true">
104
            <stringProp name="IfController.condition">${__threadNum()} == 3</stringProp>
105
            <stringProp name="IfController.condition">${__threadNum()} == 3</stringProp>
106
            <stringProp name="IfController.evaluateAll">false</stringProp>
105
          </IfController>
107
          </IfController>
106
          <hashTree/>
108
          <hashTree/>
107
        </hashTree>
109
        </hashTree>
Lines 125-130 Link Here
125
            <stringProp name="CounterConfig.name"></stringProp>
127
            <stringProp name="CounterConfig.name"></stringProp>
126
            <boolProp name="CounterConfig.per_user">false</boolProp>
128
            <boolProp name="CounterConfig.per_user">false</boolProp>
127
            <stringProp name="CounterConfig.end">0</stringProp>
129
            <stringProp name="CounterConfig.end">0</stringProp>
130
            <stringProp name="CounterConfig.format"></stringProp>
128
          </CounterConfig>
131
          </CounterConfig>
129
          <hashTree/>
132
          <hashTree/>
130
          <UserParameters guiclass="UserParametersGui" testclass="UserParameters" testname="User Parameters" enabled="true">
133
          <UserParameters guiclass="UserParametersGui" testclass="UserParameters" testname="User Parameters" enabled="true">
Lines 161-168 Link Here
161
        <GenericController guiclass="LogicControllerGui" testclass="GenericController" testname="Timers" enabled="true"/>
164
        <GenericController guiclass="LogicControllerGui" testclass="GenericController" testname="Timers" enabled="true"/>
162
        <hashTree>
165
        <hashTree>
163
          <ConstantThroughputTimer guiclass="TestBeanGUI" testclass="ConstantThroughputTimer" testname="Constant Throughput Timer" enabled="true">
166
          <ConstantThroughputTimer guiclass="TestBeanGUI" testclass="ConstantThroughputTimer" testname="Constant Throughput Timer" enabled="true">
164
            <stringProp name="throughput">60</stringProp>
167
            <doubleProp>
168
              <name>throughput</name>
169
              <value>60.0</value>
170
              <savedValue>0.0</savedValue>
171
            </doubleProp>
165
            <boolProp name="legacyMode">false</boolProp>
172
            <boolProp name="legacyMode">false</boolProp>
173
            <stringProp name="calcMode">sadece bu iş parçacığı</stringProp>
166
          </ConstantThroughputTimer>
174
          </ConstantThroughputTimer>
167
          <hashTree/>
175
          <hashTree/>
168
          <ConstantTimer guiclass="ConstantTimerGui" testclass="ConstantTimer" testname="Constant Timer" enabled="true">
176
          <ConstantTimer guiclass="ConstantTimerGui" testclass="ConstantTimer" testname="Constant Timer" enabled="true">
Lines 183-189 Link Here
183
        <GenericController guiclass="LogicControllerGui" testclass="GenericController" testname="Visualizers" enabled="true"/>
191
        <GenericController guiclass="LogicControllerGui" testclass="GenericController" testname="Visualizers" enabled="true"/>
184
        <hashTree>
192
        <hashTree>
185
          <ResultCollector guiclass="AssertionVisualizer" testclass="ResultCollector" testname="Assertion Visualizer" enabled="true">
193
          <ResultCollector guiclass="AssertionVisualizer" testclass="ResultCollector" testname="Assertion Visualizer" enabled="true">
194
            <boolProp name="ResultCollector.error_logging">false</boolProp>
186
            <objProp>
195
            <objProp>
196
              <name>saveConfig</name>
187
              <value class="SampleSaveConfiguration">
197
              <value class="SampleSaveConfiguration">
188
                <time>true</time>
198
                <time>true</time>
189
                <latency>true</latency>
199
                <latency>true</latency>
Lines 207-220 Link Here
207
                <saveAssertionResultsFailureMessage>false</saveAssertionResultsFailureMessage>
217
                <saveAssertionResultsFailureMessage>false</saveAssertionResultsFailureMessage>
208
                <assertionsResultsToSave>0</assertionsResultsToSave>
218
                <assertionsResultsToSave>0</assertionsResultsToSave>
209
              </value>
219
              </value>
210
              <name>saveConfig</name>
211
            </objProp>
220
            </objProp>
212
            <stringProp name="filename"></stringProp>
221
            <stringProp name="filename"></stringProp>
213
            <boolProp name="ResultCollector.error_logging">false</boolProp>
214
          </ResultCollector>
222
          </ResultCollector>
215
          <hashTree/>
223
          <hashTree/>
216
          <ResultCollector guiclass="GraphAccumVisualizer" testclass="ResultCollector" testname="Graph Accum Visualizer" enabled="true">
224
          <ResultCollector guiclass="GraphAccumVisualizer" testclass="ResultCollector" testname="Graph Accum Visualizer" enabled="true">
225
            <boolProp name="ResultCollector.error_logging">false</boolProp>
217
            <objProp>
226
            <objProp>
227
              <name>saveConfig</name>
218
              <value class="SampleSaveConfiguration">
228
              <value class="SampleSaveConfiguration">
219
                <time>true</time>
229
                <time>true</time>
220
                <latency>true</latency>
230
                <latency>true</latency>
Lines 238-251 Link Here
238
                <saveAssertionResultsFailureMessage>false</saveAssertionResultsFailureMessage>
248
                <saveAssertionResultsFailureMessage>false</saveAssertionResultsFailureMessage>
239
                <assertionsResultsToSave>0</assertionsResultsToSave>
249
                <assertionsResultsToSave>0</assertionsResultsToSave>
240
              </value>
250
              </value>
241
              <name>saveConfig</name>
242
            </objProp>
251
            </objProp>
243
            <stringProp name="filename"></stringProp>
252
            <stringProp name="filename"></stringProp>
244
            <boolProp name="ResultCollector.error_logging">false</boolProp>
245
          </ResultCollector>
253
          </ResultCollector>
246
          <hashTree/>
254
          <hashTree/>
247
          <ResultCollector guiclass="GraphVisualizer" testclass="ResultCollector" testname="Graph Visualizer" enabled="true">
255
          <ResultCollector guiclass="GraphVisualizer" testclass="ResultCollector" testname="Graph Visualizer" enabled="true">
256
            <boolProp name="ResultCollector.error_logging">false</boolProp>
248
            <objProp>
257
            <objProp>
258
              <name>saveConfig</name>
249
              <value class="SampleSaveConfiguration">
259
              <value class="SampleSaveConfiguration">
250
                <time>true</time>
260
                <time>true</time>
251
                <latency>true</latency>
261
                <latency>true</latency>
Lines 269-282 Link Here
269
                <saveAssertionResultsFailureMessage>false</saveAssertionResultsFailureMessage>
279
                <saveAssertionResultsFailureMessage>false</saveAssertionResultsFailureMessage>
270
                <assertionsResultsToSave>0</assertionsResultsToSave>
280
                <assertionsResultsToSave>0</assertionsResultsToSave>
271
              </value>
281
              </value>
272
              <name>saveConfig</name>
273
            </objProp>
282
            </objProp>
274
            <stringProp name="filename"></stringProp>
283
            <stringProp name="filename"></stringProp>
275
            <boolProp name="ResultCollector.error_logging">false</boolProp>
276
          </ResultCollector>
284
          </ResultCollector>
277
          <hashTree/>
285
          <hashTree/>
278
          <ResultCollector guiclass="SimpleDataWriter" testclass="ResultCollector" testname="Simple Data Writer" enabled="true">
286
          <ResultCollector guiclass="SimpleDataWriter" testclass="ResultCollector" testname="Simple Data Writer" enabled="true">
287
            <boolProp name="ResultCollector.error_logging">false</boolProp>
279
            <objProp>
288
            <objProp>
289
              <name>saveConfig</name>
280
              <value class="SampleSaveConfiguration">
290
              <value class="SampleSaveConfiguration">
281
                <time>true</time>
291
                <time>true</time>
282
                <latency>true</latency>
292
                <latency>true</latency>
Lines 300-313 Link Here
300
                <saveAssertionResultsFailureMessage>false</saveAssertionResultsFailureMessage>
310
                <saveAssertionResultsFailureMessage>false</saveAssertionResultsFailureMessage>
301
                <assertionsResultsToSave>0</assertionsResultsToSave>
311
                <assertionsResultsToSave>0</assertionsResultsToSave>
302
              </value>
312
              </value>
303
              <name>saveConfig</name>
304
            </objProp>
313
            </objProp>
305
            <stringProp name="filename"></stringProp>
314
            <stringProp name="filename"></stringProp>
306
            <boolProp name="ResultCollector.error_logging">false</boolProp>
307
          </ResultCollector>
315
          </ResultCollector>
308
          <hashTree/>
316
          <hashTree/>
309
          <ResultCollector guiclass="SplineVisualizer" testclass="ResultCollector" testname="Spline Visualizer" enabled="true">
317
          <ResultCollector guiclass="SplineVisualizer" testclass="ResultCollector" testname="Spline Visualizer" enabled="true">
318
            <boolProp name="ResultCollector.error_logging">false</boolProp>
310
            <objProp>
319
            <objProp>
320
              <name>saveConfig</name>
311
              <value class="SampleSaveConfiguration">
321
              <value class="SampleSaveConfiguration">
312
                <time>true</time>
322
                <time>true</time>
313
                <latency>true</latency>
323
                <latency>true</latency>
Lines 331-344 Link Here
331
                <saveAssertionResultsFailureMessage>false</saveAssertionResultsFailureMessage>
341
                <saveAssertionResultsFailureMessage>false</saveAssertionResultsFailureMessage>
332
                <assertionsResultsToSave>0</assertionsResultsToSave>
342
                <assertionsResultsToSave>0</assertionsResultsToSave>
333
              </value>
343
              </value>
334
              <name>saveConfig</name>
335
            </objProp>
344
            </objProp>
336
            <stringProp name="filename"></stringProp>
345
            <stringProp name="filename"></stringProp>
337
            <boolProp name="ResultCollector.error_logging">false</boolProp>
338
          </ResultCollector>
346
          </ResultCollector>
339
          <hashTree/>
347
          <hashTree/>
340
          <ResultCollector guiclass="StatVisualizer" testclass="ResultCollector" testname="StatVisualizer" enabled="true">
348
          <ResultCollector guiclass="StatVisualizer" testclass="ResultCollector" testname="StatVisualizer" enabled="true">
349
            <boolProp name="ResultCollector.error_logging">false</boolProp>
341
            <objProp>
350
            <objProp>
351
              <name>saveConfig</name>
342
              <value class="SampleSaveConfiguration">
352
              <value class="SampleSaveConfiguration">
343
                <time>true</time>
353
                <time>true</time>
344
                <latency>true</latency>
354
                <latency>true</latency>
Lines 362-375 Link Here
362
                <saveAssertionResultsFailureMessage>false</saveAssertionResultsFailureMessage>
372
                <saveAssertionResultsFailureMessage>false</saveAssertionResultsFailureMessage>
363
                <assertionsResultsToSave>0</assertionsResultsToSave>
373
                <assertionsResultsToSave>0</assertionsResultsToSave>
364
              </value>
374
              </value>
365
              <name>saveConfig</name>
366
            </objProp>
375
            </objProp>
367
            <stringProp name="filename"></stringProp>
376
            <stringProp name="filename"></stringProp>
368
            <boolProp name="ResultCollector.error_logging">false</boolProp>
369
          </ResultCollector>
377
          </ResultCollector>
370
          <hashTree/>
378
          <hashTree/>
371
          <ResultCollector guiclass="TableVisualizer" testclass="ResultCollector" testname="Table Visualizer" enabled="true">
379
          <ResultCollector guiclass="TableVisualizer" testclass="ResultCollector" testname="Table Visualizer" enabled="true">
380
            <boolProp name="ResultCollector.error_logging">false</boolProp>
372
            <objProp>
381
            <objProp>
382
              <name>saveConfig</name>
373
              <value class="SampleSaveConfiguration">
383
              <value class="SampleSaveConfiguration">
374
                <time>true</time>
384
                <time>true</time>
375
                <latency>true</latency>
385
                <latency>true</latency>
Lines 393-406 Link Here
393
                <saveAssertionResultsFailureMessage>false</saveAssertionResultsFailureMessage>
403
                <saveAssertionResultsFailureMessage>false</saveAssertionResultsFailureMessage>
394
                <assertionsResultsToSave>0</assertionsResultsToSave>
404
                <assertionsResultsToSave>0</assertionsResultsToSave>
395
              </value>
405
              </value>
396
              <name>saveConfig</name>
397
            </objProp>
406
            </objProp>
398
            <stringProp name="filename"></stringProp>
407
            <stringProp name="filename"></stringProp>
399
            <boolProp name="ResultCollector.error_logging">false</boolProp>
400
          </ResultCollector>
408
          </ResultCollector>
401
          <hashTree/>
409
          <hashTree/>
402
          <ResultCollector guiclass="ViewResultsFullVisualizer" testclass="ResultCollector" testname="View Results Full Visualizer" enabled="true">
410
          <ResultCollector guiclass="ViewResultsFullVisualizer" testclass="ResultCollector" testname="View Results Full Visualizer" enabled="true">
411
            <boolProp name="ResultCollector.error_logging">false</boolProp>
403
            <objProp>
412
            <objProp>
413
              <name>saveConfig</name>
404
              <value class="SampleSaveConfiguration">
414
              <value class="SampleSaveConfiguration">
405
                <time>true</time>
415
                <time>true</time>
406
                <latency>true</latency>
416
                <latency>true</latency>
Lines 424-433 Link Here
424
                <saveAssertionResultsFailureMessage>false</saveAssertionResultsFailureMessage>
434
                <saveAssertionResultsFailureMessage>false</saveAssertionResultsFailureMessage>
425
                <assertionsResultsToSave>0</assertionsResultsToSave>
435
                <assertionsResultsToSave>0</assertionsResultsToSave>
426
              </value>
436
              </value>
427
              <name>saveConfig</name>
428
            </objProp>
437
            </objProp>
429
            <stringProp name="filename"></stringProp>
438
            <stringProp name="filename"></stringProp>
430
            <boolProp name="ResultCollector.error_logging">false</boolProp>
431
          </ResultCollector>
439
          </ResultCollector>
432
          <hashTree/>
440
          <hashTree/>
433
        </hashTree>
441
        </hashTree>
Lines 439-446 Link Here
439
        <stringProp name="ThreadGroup.num_threads">1</stringProp>
447
        <stringProp name="ThreadGroup.num_threads">1</stringProp>
440
        <boolProp name="ThreadGroup.scheduler">false</boolProp>
448
        <boolProp name="ThreadGroup.scheduler">false</boolProp>
441
        <elementProp name="ThreadGroup.main_controller" elementType="LoopController" guiclass="LoopControlPanel" testclass="LoopController" testname="Loop Controller" enabled="true">
449
        <elementProp name="ThreadGroup.main_controller" elementType="LoopController" guiclass="LoopControlPanel" testclass="LoopController" testname="Loop Controller" enabled="true">
450
          <boolProp name="LoopController.continue_forever">false</boolProp>
442
          <intProp name="LoopController.loops">-1</intProp>
451
          <intProp name="LoopController.loops">-1</intProp>
443
          <boolProp name="LoopController.continue_forever">false</boolProp>
444
        </elementProp>
452
        </elementProp>
445
        <longProp name="ThreadGroup.end_time">0</longProp>
453
        <longProp name="ThreadGroup.end_time">0</longProp>
446
        <stringProp name="ThreadGroup.on_sample_error">continue</stringProp>
454
        <stringProp name="ThreadGroup.on_sample_error">continue</stringProp>
Lines 459-464 Link Here
459
          <CSVDataSet guiclass="TestBeanGUI" testclass="CSVDataSet" testname="CSV Data Set Config" enabled="true">
467
          <CSVDataSet guiclass="TestBeanGUI" testclass="CSVDataSet" testname="CSV Data Set Config" enabled="true">
460
            <stringProp name="variableNames"></stringProp>
468
            <stringProp name="variableNames"></stringProp>
461
            <stringProp name="filename"></stringProp>
469
            <stringProp name="filename"></stringProp>
470
            <stringProp name="fileEncoding"></stringProp>
471
            <stringProp name="delimiter">,</stringProp>
472
            <boolProp name="quotedData">false</boolProp>
473
            <boolProp name="recycle">true</boolProp>
474
            <boolProp name="stopThread">false</boolProp>
462
          </CSVDataSet>
475
          </CSVDataSet>
463
          <hashTree/>
476
          <hashTree/>
464
        </hashTree>
477
        </hashTree>
Lines 467-474 Link Here
467
          <GenericController guiclass="LogicControllerGui" testclass="GenericController" testname="Simple Controller" enabled="true"/>
480
          <GenericController guiclass="LogicControllerGui" testclass="GenericController" testname="Simple Controller" enabled="true"/>
468
          <hashTree/>
481
          <hashTree/>
469
          <LoopController guiclass="LoopControlPanel" testclass="LoopController" testname="Loop Controller" enabled="true">
482
          <LoopController guiclass="LoopControlPanel" testclass="LoopController" testname="Loop Controller" enabled="true">
483
            <boolProp name="LoopController.continue_forever">true</boolProp>
470
            <stringProp name="LoopController.loops">1</stringProp>
484
            <stringProp name="LoopController.loops">1</stringProp>
471
            <boolProp name="LoopController.continue_forever">true</boolProp>
472
          </LoopController>
485
          </LoopController>
473
          <hashTree/>
486
          <hashTree/>
474
        </hashTree>
487
        </hashTree>
Lines 480-487 Link Here
480
        <stringProp name="ThreadGroup.num_threads">1</stringProp>
493
        <stringProp name="ThreadGroup.num_threads">1</stringProp>
481
        <boolProp name="ThreadGroup.scheduler">false</boolProp>
494
        <boolProp name="ThreadGroup.scheduler">false</boolProp>
482
        <elementProp name="ThreadGroup.main_controller" elementType="LoopController" guiclass="LoopControlPanel" testclass="LoopController" testname="Loop Controller" enabled="true">
495
        <elementProp name="ThreadGroup.main_controller" elementType="LoopController" guiclass="LoopControlPanel" testclass="LoopController" testname="Loop Controller" enabled="true">
496
          <boolProp name="LoopController.continue_forever">false</boolProp>
483
          <intProp name="LoopController.loops">-1</intProp>
497
          <intProp name="LoopController.loops">-1</intProp>
484
          <boolProp name="LoopController.continue_forever">false</boolProp>
485
        </elementProp>
498
        </elementProp>
486
        <longProp name="ThreadGroup.end_time">0</longProp>
499
        <longProp name="ThreadGroup.end_time">0</longProp>
487
        <stringProp name="ThreadGroup.on_sample_error">continue</stringProp>
500
        <stringProp name="ThreadGroup.on_sample_error">continue</stringProp>
Lines 493-498 Link Here
493
          <ConfigTestElement guiclass="FtpConfigGui" testclass="ConfigTestElement" testname="FTP Config" enabled="true">
506
          <ConfigTestElement guiclass="FtpConfigGui" testclass="ConfigTestElement" testname="FTP Config" enabled="true">
494
            <stringProp name="FTPSampler.server"></stringProp>
507
            <stringProp name="FTPSampler.server"></stringProp>
495
            <stringProp name="FTPSampler.filename"></stringProp>
508
            <stringProp name="FTPSampler.filename"></stringProp>
509
            <stringProp name="FTPSampler.localfilename"></stringProp>
510
            <stringProp name="FTPSampler.inputdata"></stringProp>
511
            <stringProp name="FTPSampler.binarymode">false</stringProp>
512
            <stringProp name="FTPSampler.saveresponse">false</stringProp>
513
            <stringProp name="FTPSampler.upload">false</stringProp>
496
          </ConfigTestElement>
514
          </ConfigTestElement>
497
          <hashTree/>
515
          <hashTree/>
498
        </hashTree>
516
        </hashTree>
Lines 501-506 Link Here
501
          <FTPSampler guiclass="FtpTestSamplerGui" testclass="FTPSampler" testname="FTP Test Sampler" enabled="true">
519
          <FTPSampler guiclass="FtpTestSamplerGui" testclass="FTPSampler" testname="FTP Test Sampler" enabled="true">
502
            <stringProp name="FTPSampler.server"></stringProp>
520
            <stringProp name="FTPSampler.server"></stringProp>
503
            <stringProp name="FTPSampler.filename"></stringProp>
521
            <stringProp name="FTPSampler.filename"></stringProp>
522
            <stringProp name="FTPSampler.localfilename"></stringProp>
523
            <stringProp name="FTPSampler.inputdata"></stringProp>
524
            <stringProp name="FTPSampler.binarymode">false</stringProp>
525
            <stringProp name="FTPSampler.saveresponse">false</stringProp>
526
            <stringProp name="FTPSampler.upload">false</stringProp>
504
            <stringProp name="ConfigTestElement.username"></stringProp>
527
            <stringProp name="ConfigTestElement.username"></stringProp>
505
            <stringProp name="ConfigTestElement.password"></stringProp>
528
            <stringProp name="ConfigTestElement.password"></stringProp>
506
          </FTPSampler>
529
          </FTPSampler>
Lines 514-521 Link Here
514
        <stringProp name="ThreadGroup.num_threads">1</stringProp>
537
        <stringProp name="ThreadGroup.num_threads">1</stringProp>
515
        <boolProp name="ThreadGroup.scheduler">false</boolProp>
538
        <boolProp name="ThreadGroup.scheduler">false</boolProp>
516
        <elementProp name="ThreadGroup.main_controller" elementType="LoopController" guiclass="LoopControlPanel" testclass="LoopController" testname="Loop Controller" enabled="true">
539
        <elementProp name="ThreadGroup.main_controller" elementType="LoopController" guiclass="LoopControlPanel" testclass="LoopController" testname="Loop Controller" enabled="true">
540
          <boolProp name="LoopController.continue_forever">false</boolProp>
517
          <intProp name="LoopController.loops">-1</intProp>
541
          <intProp name="LoopController.loops">-1</intProp>
518
          <boolProp name="LoopController.continue_forever">false</boolProp>
519
        </elementProp>
542
        </elementProp>
520
        <longProp name="ThreadGroup.end_time">0</longProp>
543
        <longProp name="ThreadGroup.end_time">0</longProp>
521
        <stringProp name="ThreadGroup.on_sample_error">continue</stringProp>
544
        <stringProp name="ThreadGroup.on_sample_error">continue</stringProp>
Lines 525-537 Link Here
525
        <GenericController guiclass="LogicControllerGui" testclass="GenericController" testname="Config" enabled="true"/>
548
        <GenericController guiclass="LogicControllerGui" testclass="GenericController" testname="Config" enabled="true"/>
526
        <hashTree>
549
        <hashTree>
527
          <ConfigTestElement guiclass="HttpDefaultsGui" testclass="ConfigTestElement" testname="HTTP Request Defaults" enabled="true">
550
          <ConfigTestElement guiclass="HttpDefaultsGui" testclass="ConfigTestElement" testname="HTTP Request Defaults" enabled="true">
528
            <stringProp name="HTTPSampler.path"></stringProp>
529
            <stringProp name="HTTPSampler.domain"></stringProp>
530
            <stringProp name="HTTPSampler.protocol"></stringProp>
531
            <elementProp name="HTTPsampler.Arguments" elementType="Arguments" guiclass="HTTPArgumentsPanel" testclass="Arguments" testname="Argument List" enabled="true">
551
            <elementProp name="HTTPsampler.Arguments" elementType="Arguments" guiclass="HTTPArgumentsPanel" testclass="Arguments" testname="Argument List" enabled="true">
532
              <collectionProp name="Arguments.arguments"/>
552
              <collectionProp name="Arguments.arguments"/>
533
            </elementProp>
553
            </elementProp>
554
            <stringProp name="HTTPSampler.domain"></stringProp>
534
            <stringProp name="HTTPSampler.port"></stringProp>
555
            <stringProp name="HTTPSampler.port"></stringProp>
556
            <stringProp name="HTTPSampler.protocol"></stringProp>
557
            <stringProp name="HTTPSampler.contentEncoding"></stringProp>
558
            <stringProp name="HTTPSampler.path"></stringProp>
535
          </ConfigTestElement>
559
          </ConfigTestElement>
536
          <hashTree/>
560
          <hashTree/>
537
        </hashTree>
561
        </hashTree>
Lines 547-554 Link Here
547
          </AuthManager>
571
          </AuthManager>
548
          <hashTree/>
572
          <hashTree/>
549
          <CookieManager guiclass="CookiePanel" testclass="CookieManager" testname="Cookie Panel" enabled="true">
573
          <CookieManager guiclass="CookiePanel" testclass="CookieManager" testname="Cookie Panel" enabled="true">
574
            <collectionProp name="CookieManager.cookies"/>
550
            <boolProp name="CookieManager.clearEachIteration">false</boolProp>
575
            <boolProp name="CookieManager.clearEachIteration">false</boolProp>
551
            <collectionProp name="CookieManager.cookies"/>
552
          </CookieManager>
576
          </CookieManager>
553
          <hashTree/>
577
          <hashTree/>
554
          <HeaderManager guiclass="HeaderPanel" testclass="HeaderManager" testname="Header Panel" enabled="true">
578
          <HeaderManager guiclass="HeaderPanel" testclass="HeaderManager" testname="Header Panel" enabled="true">
Lines 562-573 Link Here
562
          <hashTree/>
586
          <hashTree/>
563
          <ParamModifier guiclass="ParamModifierGui" testclass="ParamModifier" testname="Param Modifier" enabled="true">
587
          <ParamModifier guiclass="ParamModifierGui" testclass="ParamModifier" testname="Param Modifier" enabled="true">
564
            <elementProp name="ParamModifier.mask" elementType="ParamMask">
588
            <elementProp name="ParamModifier.mask" elementType="ParamMask">
565
              <longProp name="ParamModifier.upper_bound">10</longProp>
589
              <stringProp name="ParamModifier.field_name"></stringProp>
566
              <stringProp name="ParamModifier.prefix"></stringProp>
590
              <stringProp name="ParamModifier.prefix"></stringProp>
567
              <longProp name="ParamModifier.lower_bound">0</longProp>
591
              <longProp name="ParamModifier.lower_bound">0</longProp>
592
              <longProp name="ParamModifier.upper_bound">10</longProp>
593
              <longProp name="ParamModifier.increment">1</longProp>
568
              <stringProp name="ParamModifier.suffix"></stringProp>
594
              <stringProp name="ParamModifier.suffix"></stringProp>
569
              <longProp name="ParamModifier.increment">1</longProp>
570
              <stringProp name="ParamModifier.field_name"></stringProp>
571
            </elementProp>
595
            </elementProp>
572
          </ParamModifier>
596
          </ParamModifier>
573
          <hashTree/>
597
          <hashTree/>
Lines 576-581 Link Here
576
            <boolProp name="path_extension_no_questionmark">false</boolProp>
600
            <boolProp name="path_extension_no_questionmark">false</boolProp>
577
            <stringProp name="argument_name"></stringProp>
601
            <stringProp name="argument_name"></stringProp>
578
            <boolProp name="path_extension_no_equals">false</boolProp>
602
            <boolProp name="path_extension_no_equals">false</boolProp>
603
            <boolProp name="cache_value">true</boolProp>
579
          </URLRewritingModifier>
604
          </URLRewritingModifier>
580
          <hashTree/>
605
          <hashTree/>
581
          <UserParameterModifier guiclass="UserParameterModifierGui" testclass="UserParameterModifier" testname="User Parameter Modifier" enabled="true">
606
          <UserParameterModifier guiclass="UserParameterModifierGui" testclass="UserParameterModifier" testname="User Parameter Modifier" enabled="true">
Lines 586-634 Link Here
586
        <GenericController guiclass="LogicControllerGui" testclass="GenericController" testname="Samplers" enabled="true"/>
611
        <GenericController guiclass="LogicControllerGui" testclass="GenericController" testname="Samplers" enabled="true"/>
587
        <hashTree>
612
        <hashTree>
588
          <HTTPSampler guiclass="HttpTestSampleGui" testclass="HTTPSampler" testname="HTTP Test Sampler" enabled="true">
613
          <HTTPSampler guiclass="HttpTestSampleGui" testclass="HTTPSampler" testname="HTTP Test Sampler" enabled="true">
614
            <elementProp name="HTTPsampler.Arguments" elementType="Arguments" guiclass="HTTPArgumentsPanel" testclass="Arguments" testname="Argument List" enabled="true">
615
              <collectionProp name="Arguments.arguments"/>
616
            </elementProp>
617
            <stringProp name="HTTPSampler.domain"></stringProp>
618
            <stringProp name="HTTPSampler.port"></stringProp>
619
            <stringProp name="HTTPSampler.protocol"></stringProp>
620
            <stringProp name="HTTPSampler.contentEncoding"></stringProp>
589
            <stringProp name="HTTPSampler.path"></stringProp>
621
            <stringProp name="HTTPSampler.path"></stringProp>
590
            <stringProp name="HTTPSampler.method">POST</stringProp>
622
            <stringProp name="HTTPSampler.method">POST</stringProp>
623
            <boolProp name="HTTPSampler.follow_redirects">true</boolProp>
624
            <boolProp name="HTTPSampler.auto_redirects">false</boolProp>
591
            <boolProp name="HTTPSampler.use_keepalive">true</boolProp>
625
            <boolProp name="HTTPSampler.use_keepalive">true</boolProp>
592
            <stringProp name="HTTPSampler.protocol"></stringProp>
626
            <boolProp name="HTTPSampler.DO_MULTIPART_POST">false</boolProp>
593
            <boolProp name="HTTPSampler.image_parser">false</boolProp>
627
            <elementProp name="HTTPsampler.Files" elementType="HTTPFileArgs" guiclass="HTTPFileArgsPanel" testclass="HTTPFileArgs" enabled="true">
594
            <boolProp name="HTTPSampler.follow_redirects">true</boolProp>
628
              <collectionProp name="HTTPFileArgs.files"/>
595
            <elementProp name="HTTPsampler.Arguments" elementType="Arguments" guiclass="HTTPArgumentsPanel" testclass="Arguments" testname="Argument List" enabled="true">
596
              <collectionProp name="Arguments.arguments"/>
597
            </elementProp>
629
            </elementProp>
598
            <stringProp name="HTTPSampler.port"></stringProp>
599
            <stringProp name="HTTPSampler.mimetype"></stringProp>
600
            <stringProp name="HTTPSampler.FILE_FIELD"></stringProp>
601
            <stringProp name="HTTPSampler.monitor">false</stringProp>
630
            <stringProp name="HTTPSampler.monitor">false</stringProp>
602
            <stringProp name="HTTPSampler.domain"></stringProp>
631
            <stringProp name="HTTPSampler.embedded_url_re"></stringProp>
603
            <stringProp name="HTTPSampler.FILE_NAME"></stringProp>
604
            <boolProp name="HTTPSampler.auto_redirects">false</boolProp>
605
          </HTTPSampler>
632
          </HTTPSampler>
606
          <hashTree/>
633
          <hashTree/>
607
          <SoapSampler guiclass="SoapSamplerGui" testclass="SoapSampler" testname="SOAP Sampler" enabled="true">
634
          <SoapSampler guiclass="SoapSamplerGui" testclass="SoapSampler" testname="SOAP Sampler" enabled="true">
635
            <elementProp name="HTTPsampler.Arguments" elementType="Arguments">
636
              <collectionProp name="Arguments.arguments"/>
637
            </elementProp>
638
            <elementProp name="HTTPsampler.Files" elementType="HTTPFileArgs">
639
              <collectionProp name="HTTPFileArgs.files"/>
640
            </elementProp>
608
            <stringProp name="HTTPSampler.path">/</stringProp>
641
            <stringProp name="HTTPSampler.path">/</stringProp>
609
            <stringProp name="HTTPSampler.encoded_path">/</stringProp>
642
            <stringProp name="HTTPSampler.encoded_path">/</stringProp>
610
            <stringProp name="HTTPSampler.method">POST</stringProp>
643
            <stringProp name="HTTPSampler.method">POST</stringProp>
611
            <stringProp name="HTTPSampler.protocol">http</stringProp>
644
            <stringProp name="HTTPSampler.protocol">http</stringProp>
612
            <elementProp name="HTTPsampler.Arguments" elementType="Arguments">
613
              <collectionProp name="Arguments.arguments"/>
614
            </elementProp>
615
            <intProp name="HTTPSampler.port">-1</intProp>
645
            <intProp name="HTTPSampler.port">-1</intProp>
616
            <stringProp name="HTTPSampler.domain"></stringProp>
646
            <stringProp name="HTTPSampler.domain"></stringProp>
617
            <stringProp name="HTTPSamper.xml_data"></stringProp>
647
            <stringProp name="HTTPSamper.xml_data"></stringProp>
618
            <stringProp name="SoapSampler.URL_DATA"></stringProp>
648
            <stringProp name="SoapSampler.URL_DATA"></stringProp>
649
            <stringProp name="SoapSampler.xml_data_file"></stringProp>
650
            <stringProp name="SoapSampler.SOAP_ACTION"></stringProp>
651
            <stringProp name="SoapSampler.SEND_SOAP_ACTION">false</stringProp>
652
            <boolProp name="HTTPSampler.use_keepalive">false</boolProp>
619
          </SoapSampler>
653
          </SoapSampler>
620
          <hashTree/>
654
          <hashTree/>
621
          <WebServiceSampler guiclass="WebServiceSamplerGui" testclass="WebServiceSampler" testname="WebService (SOAP) Request" enabled="true">
655
          <WebServiceSampler guiclass="WebServiceSamplerGui" testclass="WebServiceSampler" testname="WebService (SOAP) Request" enabled="true">
656
            <elementProp name="HTTPsampler.Arguments" elementType="Arguments">
657
              <collectionProp name="Arguments.arguments"/>
658
            </elementProp>
659
            <elementProp name="HTTPsampler.Files" elementType="HTTPFileArgs">
660
              <collectionProp name="HTTPFileArgs.files"/>
661
            </elementProp>
622
            <stringProp name="HTTPSampler.path">/</stringProp>
662
            <stringProp name="HTTPSampler.path">/</stringProp>
623
            <stringProp name="HTTPSampler.encoded_path">/</stringProp>
663
            <stringProp name="HTTPSampler.encoded_path">/</stringProp>
624
            <stringProp name="HTTPSampler.method">POST</stringProp>
664
            <stringProp name="HTTPSampler.method">POST</stringProp>
625
            <stringProp name="WebServiceSampler.proxy_host"></stringProp>
665
            <stringProp name="WebServiceSampler.proxy_host"></stringProp>
626
            <stringProp name="HTTPSampler.protocol">http</stringProp>
666
            <stringProp name="HTTPSampler.protocol">http</stringProp>
627
            <elementProp name="HTTPsampler.Arguments" elementType="Arguments">
628
              <collectionProp name="Arguments.arguments"/>
629
            </elementProp>
630
            <stringProp name="WebServiceSampler.proxy_port"></stringProp>
667
            <stringProp name="WebServiceSampler.proxy_port"></stringProp>
631
            <intProp name="HTTPSampler.port">80</intProp>
668
            <stringProp name="HTTPSampler.port">80</stringProp>
632
            <stringProp name="WebServiceSampler.use_proxy">false</stringProp>
669
            <stringProp name="WebServiceSampler.use_proxy">false</stringProp>
633
            <stringProp name="Soap.Action"></stringProp>
670
            <stringProp name="Soap.Action"></stringProp>
634
            <stringProp name="WebServiceSampler.xml_data_file"></stringProp>
671
            <stringProp name="WebServiceSampler.xml_data_file"></stringProp>
Lines 638-651 Link Here
638
            <stringProp name="WebServiceSampler.memory_cache">false</stringProp>
675
            <stringProp name="WebServiceSampler.memory_cache">false</stringProp>
639
            <stringProp name="HTTPSampler.domain"></stringProp>
676
            <stringProp name="HTTPSampler.domain"></stringProp>
640
            <stringProp name="HTTPSamper.xml_data"></stringProp>
677
            <stringProp name="HTTPSamper.xml_data"></stringProp>
678
            <stringProp name="WebserviceSampler.timeout"></stringProp>
641
          </WebServiceSampler>
679
          </WebServiceSampler>
642
          <hashTree/>
680
          <hashTree/>
643
          <AccessLogSampler guiclass="TestBeanGUI" testclass="AccessLogSampler" testname="Tomcat Access Log Sampler" enabled="true">
681
          <AccessLogSampler guiclass="TestBeanGUI" testclass="AccessLogSampler" testname="Tomcat Access Log Sampler" enabled="true">
644
            <stringProp name="AccessLogSampler.parser_class_name">org.apache.jmeter.protocol.http.util.accesslog.TCLogParser</stringProp>
645
            <boolProp name="HTTPSampler.image_parser">false</boolProp>
646
            <elementProp name="HTTPsampler.Arguments" elementType="Arguments">
682
            <elementProp name="HTTPsampler.Arguments" elementType="Arguments">
647
              <collectionProp name="Arguments.arguments"/>
683
              <collectionProp name="Arguments.arguments"/>
648
            </elementProp>
684
            </elementProp>
685
            <elementProp name="HTTPsampler.Files" elementType="HTTPFileArgs">
686
              <collectionProp name="HTTPFileArgs.files"/>
687
            </elementProp>
688
            <stringProp name="AccessLogSampler.parser_class_name">org.apache.jmeter.protocol.http.util.accesslog.TCLogParser</stringProp>
689
            <boolProp name="HTTPSampler.image_parser">false</boolProp>
649
            <intProp name="HTTPSampler.port">80</intProp>
690
            <intProp name="HTTPSampler.port">80</intProp>
650
            <stringProp name="parserClassName">org.apache.jmeter.protocol.http.util.accesslog.TCLogParser</stringProp>
691
            <stringProp name="parserClassName">org.apache.jmeter.protocol.http.util.accesslog.TCLogParser</stringProp>
651
            <stringProp name="portString"></stringProp>
692
            <stringProp name="portString"></stringProp>
Lines 666-673 Link Here
666
        <stringProp name="ThreadGroup.num_threads">1</stringProp>
707
        <stringProp name="ThreadGroup.num_threads">1</stringProp>
667
        <boolProp name="ThreadGroup.scheduler">false</boolProp>
708
        <boolProp name="ThreadGroup.scheduler">false</boolProp>
668
        <elementProp name="ThreadGroup.main_controller" elementType="LoopController" guiclass="LoopControlPanel" testclass="LoopController" testname="Loop Controller" enabled="true">
709
        <elementProp name="ThreadGroup.main_controller" elementType="LoopController" guiclass="LoopControlPanel" testclass="LoopController" testname="Loop Controller" enabled="true">
710
          <boolProp name="LoopController.continue_forever">false</boolProp>
669
          <intProp name="LoopController.loops">-1</intProp>
711
          <intProp name="LoopController.loops">-1</intProp>
670
          <boolProp name="LoopController.continue_forever">false</boolProp>
671
        </elementProp>
712
        </elementProp>
672
        <longProp name="ThreadGroup.end_time">0</longProp>
713
        <longProp name="ThreadGroup.end_time">0</longProp>
673
        <stringProp name="ThreadGroup.on_sample_error">continue</stringProp>
714
        <stringProp name="ThreadGroup.on_sample_error">continue</stringProp>
Lines 677-770 Link Here
677
        <GenericController guiclass="LogicControllerGui" testclass="GenericController" testname="Config" enabled="true"/>
718
        <GenericController guiclass="LogicControllerGui" testclass="GenericController" testname="Config" enabled="true"/>
678
        <hashTree>
719
        <hashTree>
679
          <JavaConfig guiclass="JavaConfigGui" testclass="JavaConfig" testname="Java Config" enabled="true">
720
          <JavaConfig guiclass="JavaConfigGui" testclass="JavaConfig" testname="Java Config" enabled="true">
680
            <stringProp name="classname">org.apache.jmeter.protocol.java.test.SleepTest</stringProp>
681
            <elementProp name="arguments" elementType="Arguments" guiclass="ArgumentsPanel" testclass="Arguments" enabled="true">
721
            <elementProp name="arguments" elementType="Arguments" guiclass="ArgumentsPanel" testclass="Arguments" enabled="true">
682
              <collectionProp name="Arguments.arguments">
722
              <collectionProp name="Arguments.arguments">
683
                <elementProp name="SleepTime" elementType="Argument">
723
                <elementProp name="SleepTime" elementType="Argument">
724
                  <stringProp name="Argument.name">SleepTime</stringProp>
725
                  <stringProp name="Argument.value">1000</stringProp>
684
                  <stringProp name="Argument.metadata">=</stringProp>
726
                  <stringProp name="Argument.metadata">=</stringProp>
685
                  <stringProp name="Argument.value">1000</stringProp>
686
                  <stringProp name="Argument.name">SleepTime</stringProp>
687
                </elementProp>
727
                </elementProp>
688
                <elementProp name="SleepMask" elementType="Argument">
728
                <elementProp name="SleepMask" elementType="Argument">
729
                  <stringProp name="Argument.name">SleepMask</stringProp>
730
                  <stringProp name="Argument.value">0x3FF</stringProp>
689
                  <stringProp name="Argument.metadata">=</stringProp>
731
                  <stringProp name="Argument.metadata">=</stringProp>
690
                  <stringProp name="Argument.value">0x3FF</stringProp>
691
                  <stringProp name="Argument.name">SleepMask</stringProp>
692
                </elementProp>
732
                </elementProp>
693
              </collectionProp>
733
              </collectionProp>
694
            </elementProp>
734
            </elementProp>
735
            <stringProp name="classname">org.apache.jmeter.protocol.java.test.SleepTest</stringProp>
695
          </JavaConfig>
736
          </JavaConfig>
696
          <hashTree/>
737
          <hashTree/>
697
        </hashTree>
738
        </hashTree>
698
        <GenericController guiclass="LogicControllerGui" testclass="GenericController" testname="Control" enabled="true"/>
739
        <GenericController guiclass="LogicControllerGui" testclass="GenericController" testname="Control" enabled="true"/>
699
        <hashTree>
740
        <hashTree>
700
          <JavaSampler guiclass="JavaTestSamplerGui" testclass="JavaSampler" testname="Java SleepTest" enabled="true">
741
          <JavaSampler guiclass="JavaTestSamplerGui" testclass="JavaSampler" testname="Java SleepTest" enabled="true">
701
            <stringProp name="classname">org.apache.jmeter.protocol.java.test.SleepTest</stringProp>
702
            <elementProp name="arguments" elementType="Arguments" guiclass="ArgumentsPanel" testclass="Arguments" enabled="true">
742
            <elementProp name="arguments" elementType="Arguments" guiclass="ArgumentsPanel" testclass="Arguments" enabled="true">
703
              <collectionProp name="Arguments.arguments">
743
              <collectionProp name="Arguments.arguments">
704
                <elementProp name="SleepTime" elementType="Argument">
744
                <elementProp name="SleepTime" elementType="Argument">
745
                  <stringProp name="Argument.name">SleepTime</stringProp>
746
                  <stringProp name="Argument.value">1000</stringProp>
705
                  <stringProp name="Argument.metadata">=</stringProp>
747
                  <stringProp name="Argument.metadata">=</stringProp>
706
                  <stringProp name="Argument.value">1000</stringProp>
707
                  <stringProp name="Argument.name">SleepTime</stringProp>
708
                </elementProp>
748
                </elementProp>
709
                <elementProp name="SleepMask" elementType="Argument">
749
                <elementProp name="SleepMask" elementType="Argument">
750
                  <stringProp name="Argument.name">SleepMask</stringProp>
751
                  <stringProp name="Argument.value">0x3FF</stringProp>
710
                  <stringProp name="Argument.metadata">=</stringProp>
752
                  <stringProp name="Argument.metadata">=</stringProp>
711
                  <stringProp name="Argument.value">0x3FF</stringProp>
712
                  <stringProp name="Argument.name">SleepMask</stringProp>
713
                </elementProp>
753
                </elementProp>
714
              </collectionProp>
754
              </collectionProp>
715
            </elementProp>
755
            </elementProp>
756
            <stringProp name="classname">org.apache.jmeter.protocol.java.test.SleepTest</stringProp>
716
          </JavaSampler>
757
          </JavaSampler>
717
          <hashTree/>
758
          <hashTree/>
718
          <JavaSampler guiclass="JavaTestSamplerGui" testclass="JavaSampler" testname="JavaTest" enabled="true">
759
          <JavaSampler guiclass="JavaTestSamplerGui" testclass="JavaSampler" testname="JavaTest" enabled="true">
719
            <stringProp name="classname">org.apache.jmeter.protocol.java.test.JavaTest</stringProp>
720
            <elementProp name="arguments" elementType="Arguments" guiclass="ArgumentsPanel" testclass="Arguments" enabled="true">
760
            <elementProp name="arguments" elementType="Arguments" guiclass="ArgumentsPanel" testclass="Arguments" enabled="true">
721
              <collectionProp name="Arguments.arguments">
761
              <collectionProp name="Arguments.arguments">
722
                <elementProp name="Sleep_Time" elementType="Argument">
762
                <elementProp name="Sleep_Time" elementType="Argument">
763
                  <stringProp name="Argument.name">Sleep_Time</stringProp>
764
                  <stringProp name="Argument.value">100</stringProp>
723
                  <stringProp name="Argument.metadata">=</stringProp>
765
                  <stringProp name="Argument.metadata">=</stringProp>
724
                  <stringProp name="Argument.value">100</stringProp>
725
                  <stringProp name="Argument.name">Sleep_Time</stringProp>
726
                </elementProp>
766
                </elementProp>
727
                <elementProp name="Sleep_Mask" elementType="Argument">
767
                <elementProp name="Sleep_Mask" elementType="Argument">
768
                  <stringProp name="Argument.name">Sleep_Mask</stringProp>
769
                  <stringProp name="Argument.value">0xFF</stringProp>
728
                  <stringProp name="Argument.metadata">=</stringProp>
770
                  <stringProp name="Argument.metadata">=</stringProp>
729
                  <stringProp name="Argument.value">0xFF</stringProp>
730
                  <stringProp name="Argument.name">Sleep_Mask</stringProp>
731
                </elementProp>
771
                </elementProp>
732
                <elementProp name="Label" elementType="Argument">
772
                <elementProp name="Label" elementType="Argument">
773
                  <stringProp name="Argument.name">Label</stringProp>
774
                  <stringProp name="Argument.value">JavaTest</stringProp>
733
                  <stringProp name="Argument.metadata">=</stringProp>
775
                  <stringProp name="Argument.metadata">=</stringProp>
734
                  <stringProp name="Argument.value">JavaTest</stringProp>
735
                  <stringProp name="Argument.name">Label</stringProp>
736
                </elementProp>
776
                </elementProp>
737
                <elementProp name="ResponseCode" elementType="Argument">
777
                <elementProp name="ResponseCode" elementType="Argument">
778
                  <stringProp name="Argument.name">ResponseCode</stringProp>
779
                  <stringProp name="Argument.value">200 (or any other number)</stringProp>
738
                  <stringProp name="Argument.metadata">=</stringProp>
780
                  <stringProp name="Argument.metadata">=</stringProp>
739
                  <stringProp name="Argument.value">200 (or any other number)</stringProp>
740
                  <stringProp name="Argument.name">ResponseCode</stringProp>
741
                </elementProp>
781
                </elementProp>
742
                <elementProp name="ResponseMessage" elementType="Argument">
782
                <elementProp name="ResponseMessage" elementType="Argument">
783
                  <stringProp name="Argument.name">ResponseMessage</stringProp>
784
                  <stringProp name="Argument.value">OK (or any other text)</stringProp>
743
                  <stringProp name="Argument.metadata">=</stringProp>
785
                  <stringProp name="Argument.metadata">=</stringProp>
744
                  <stringProp name="Argument.value">OK (or any other text)</stringProp>
745
                  <stringProp name="Argument.name">ResponseMessage</stringProp>
746
                </elementProp>
786
                </elementProp>
747
                <elementProp name="Status" elementType="Argument">
787
                <elementProp name="Status" elementType="Argument">
788
                  <stringProp name="Argument.name">Status</stringProp>
789
                  <stringProp name="Argument.value">OK</stringProp>
748
                  <stringProp name="Argument.metadata">=</stringProp>
790
                  <stringProp name="Argument.metadata">=</stringProp>
749
                  <stringProp name="Argument.value">OK</stringProp>
750
                  <stringProp name="Argument.name">Status</stringProp>
751
                </elementProp>
791
                </elementProp>
752
                <elementProp name="SamplerData" elementType="Argument">
792
                <elementProp name="SamplerData" elementType="Argument">
793
                  <stringProp name="Argument.name">SamplerData</stringProp>
794
                  <stringProp name="Argument.value">SamplerData goes here</stringProp>
753
                  <stringProp name="Argument.metadata">=</stringProp>
795
                  <stringProp name="Argument.metadata">=</stringProp>
754
                  <stringProp name="Argument.value">SamplerData goes here</stringProp>
755
                  <stringProp name="Argument.name">SamplerData</stringProp>
756
                </elementProp>
796
                </elementProp>
757
                <elementProp name="ResultData" elementType="Argument">
797
                <elementProp name="ResultData" elementType="Argument">
798
                  <stringProp name="Argument.name">ResultData</stringProp>
799
                  <stringProp name="Argument.value">ResultData goes here</stringProp>
758
                  <stringProp name="Argument.metadata">=</stringProp>
800
                  <stringProp name="Argument.metadata">=</stringProp>
759
                  <stringProp name="Argument.value">ResultData goes here</stringProp>
760
                  <stringProp name="Argument.name">ResultData</stringProp>
761
                </elementProp>
801
                </elementProp>
762
              </collectionProp>
802
              </collectionProp>
763
            </elementProp>
803
            </elementProp>
804
            <stringProp name="classname">org.apache.jmeter.protocol.java.test.JavaTest</stringProp>
764
          </JavaSampler>
805
          </JavaSampler>
765
          <hashTree/>
806
          <hashTree/>
766
          <BeanShellSampler guiclass="BeanShellSamplerGui" testclass="BeanShellSampler" testname="BeanShell Sampler" enabled="true">
807
          <BeanShellSampler guiclass="BeanShellSamplerGui" testclass="BeanShellSampler" testname="BeanShell Sampler" enabled="true">
767
            <stringProp name="BeanShellSampler.filename"></stringProp>
768
            <stringProp name="BeanShellSampler.query">ResponseCode=12;
808
            <stringProp name="BeanShellSampler.query">ResponseCode=12;
769
ResponseMessage=&quot;Buckle my shoe&quot;;
809
ResponseMessage=&quot;Buckle my shoe&quot;;
770
IsSuccess=false;
810
IsSuccess=false;
Lines 772-778 Link Here
772
// FileName is the Script file name
812
// FileName is the Script file name
773
// bsh.args[1] == &quot;quick&quot;
813
// bsh.args[1] == &quot;quick&quot;
774
return &quot;This will go into the Response Data field&quot;;</stringProp>
814
return &quot;This will go into the Response Data field&quot;;</stringProp>
815
            <stringProp name="BeanShellSampler.filename"></stringProp>
775
            <stringProp name="BeanShellSampler.parameters">the quick brown fox</stringProp>
816
            <stringProp name="BeanShellSampler.parameters">the quick brown fox</stringProp>
817
            <boolProp name="BeanShellSampler.resetInterpreter">false</boolProp>
776
          </BeanShellSampler>
818
          </BeanShellSampler>
777
          <hashTree/>
819
          <hashTree/>
778
        </hashTree>
820
        </hashTree>
Lines 784-791 Link Here
784
        <stringProp name="ThreadGroup.num_threads">1</stringProp>
826
        <stringProp name="ThreadGroup.num_threads">1</stringProp>
785
        <boolProp name="ThreadGroup.scheduler">false</boolProp>
827
        <boolProp name="ThreadGroup.scheduler">false</boolProp>
786
        <elementProp name="ThreadGroup.main_controller" elementType="LoopController" guiclass="LoopControlPanel" testclass="LoopController" testname="Loop Controller" enabled="true">
828
        <elementProp name="ThreadGroup.main_controller" elementType="LoopController" guiclass="LoopControlPanel" testclass="LoopController" testname="Loop Controller" enabled="true">
829
          <boolProp name="LoopController.continue_forever">false</boolProp>
787
          <intProp name="LoopController.loops">-1</intProp>
830
          <intProp name="LoopController.loops">-1</intProp>
788
          <boolProp name="LoopController.continue_forever">false</boolProp>
789
        </elementProp>
831
        </elementProp>
790
        <longProp name="ThreadGroup.end_time">0</longProp>
832
        <longProp name="ThreadGroup.end_time">0</longProp>
791
        <stringProp name="ThreadGroup.on_sample_error">continue</stringProp>
833
        <stringProp name="ThreadGroup.on_sample_error">continue</stringProp>
Lines 822-827 Link Here
822
            <stringProp name="JDBCSampler.driver"></stringProp>
864
            <stringProp name="JDBCSampler.driver"></stringProp>
823
            <stringProp name="JDBCSampler.connPoolClass">org.apache.jmeter.protocol.jdbc.util.JMeter19ConnectionPool</stringProp>
865
            <stringProp name="JDBCSampler.connPoolClass">org.apache.jmeter.protocol.jdbc.util.JMeter19ConnectionPool</stringProp>
824
            <stringProp name="ConfigTestElement.password"></stringProp>
866
            <stringProp name="ConfigTestElement.password"></stringProp>
867
            <stringProp name="queryType">Select Statement</stringProp>
868
            <stringProp name="queryArguments"></stringProp>
869
            <stringProp name="queryArgumentsTypes"></stringProp>
825
          </JDBCSampler>
870
          </JDBCSampler>
826
          <hashTree/>
871
          <hashTree/>
827
        </hashTree>
872
        </hashTree>
Lines 833-840 Link Here
833
        <stringProp name="ThreadGroup.num_threads">1</stringProp>
878
        <stringProp name="ThreadGroup.num_threads">1</stringProp>
834
        <boolProp name="ThreadGroup.scheduler">false</boolProp>
879
        <boolProp name="ThreadGroup.scheduler">false</boolProp>
835
        <elementProp name="ThreadGroup.main_controller" elementType="LoopController" guiclass="LoopControlPanel" testclass="LoopController" testname="Loop Controller" enabled="true">
880
        <elementProp name="ThreadGroup.main_controller" elementType="LoopController" guiclass="LoopControlPanel" testclass="LoopController" testname="Loop Controller" enabled="true">
881
          <boolProp name="LoopController.continue_forever">false</boolProp>
836
          <intProp name="LoopController.loops">-1</intProp>
882
          <intProp name="LoopController.loops">-1</intProp>
837
          <boolProp name="LoopController.continue_forever">false</boolProp>
838
        </elementProp>
883
        </elementProp>
839
        <longProp name="ThreadGroup.end_time">0</longProp>
884
        <longProp name="ThreadGroup.end_time">0</longProp>
840
        <stringProp name="ThreadGroup.on_sample_error">continue</stringProp>
885
        <stringProp name="ThreadGroup.on_sample_error">continue</stringProp>
Lines 844-852 Link Here
844
        <GenericController guiclass="LogicControllerGui" testclass="GenericController" testname="Config" enabled="true"/>
889
        <GenericController guiclass="LogicControllerGui" testclass="GenericController" testname="Config" enabled="true"/>
845
        <hashTree>
890
        <hashTree>
846
          <ConfigTestElement guiclass="LdapConfigGui" testclass="ConfigTestElement" testname="LDAP Request Defaults" enabled="true">
891
          <ConfigTestElement guiclass="LdapConfigGui" testclass="ConfigTestElement" testname="LDAP Request Defaults" enabled="true">
847
            <stringProp name="rootdn"></stringProp>
848
            <stringProp name="servername"></stringProp>
892
            <stringProp name="servername"></stringProp>
849
            <stringProp name="port"></stringProp>
893
            <stringProp name="port"></stringProp>
894
            <stringProp name="rootdn"></stringProp>
850
            <boolProp name="user_defined">false</boolProp>
895
            <boolProp name="user_defined">false</boolProp>
851
          </ConfigTestElement>
896
          </ConfigTestElement>
852
          <hashTree/>
897
          <hashTree/>
Lines 854-865 Link Here
854
        <GenericController guiclass="LogicControllerGui" testclass="GenericController" testname="Samplers" enabled="true"/>
899
        <GenericController guiclass="LogicControllerGui" testclass="GenericController" testname="Samplers" enabled="true"/>
855
        <hashTree>
900
        <hashTree>
856
          <LDAPSampler guiclass="LdapTestSamplerGui" testclass="LDAPSampler" testname="LDAP Request" enabled="true">
901
          <LDAPSampler guiclass="LdapTestSamplerGui" testclass="LDAPSampler" testname="LDAP Request" enabled="true">
902
            <stringProp name="servername"></stringProp>
903
            <stringProp name="port"></stringProp>
857
            <stringProp name="rootdn"></stringProp>
904
            <stringProp name="rootdn"></stringProp>
858
            <stringProp name="servername"></stringProp>
905
            <boolProp name="user_defined">false</boolProp>
859
            <stringProp name="ConfigTestElement.username"></stringProp>
906
            <stringProp name="ConfigTestElement.username"></stringProp>
860
            <stringProp name="port"></stringProp>
861
            <stringProp name="ConfigTestElement.password"></stringProp>
907
            <stringProp name="ConfigTestElement.password"></stringProp>
862
            <boolProp name="user_defined">false</boolProp>
863
          </LDAPSampler>
908
          </LDAPSampler>
864
          <hashTree/>
909
          <hashTree/>
865
        </hashTree>
910
        </hashTree>
(-)bin/testfiles/InterleaveTestPlan2.jmx (-52 / +62 lines)
Lines 1-5 Link Here
1
<?xml version="1.0" encoding="UTF-8"?>
1
<?xml version="1.0" encoding="UTF-8"?>
2
<jmeterTestPlan version="1.2" properties="1.8">
2
<jmeterTestPlan version="1.2" properties="2.0">
3
  <hashTree>
3
  <hashTree>
4
    <TestPlan guiclass="TestPlanGui" testclass="TestPlan" testname="Test Plan" enabled="true">
4
    <TestPlan guiclass="TestPlanGui" testclass="TestPlan" testname="Test Plan" enabled="true">
5
      <collectionProp name="TestPlan.thread_groups"/>
5
      <collectionProp name="TestPlan.thread_groups"/>
Lines 9-14 Link Here
9
      <boolProp name="TestPlan.serialize_threadgroups">false</boolProp>
9
      <boolProp name="TestPlan.serialize_threadgroups">false</boolProp>
10
      <boolProp name="TestPlan.functional_mode">false</boolProp>
10
      <boolProp name="TestPlan.functional_mode">false</boolProp>
11
      <stringProp name="TestPlan.comments"></stringProp>
11
      <stringProp name="TestPlan.comments"></stringProp>
12
      <stringProp name="TestPlan.user_define_classpath"></stringProp>
12
    </TestPlan>
13
    </TestPlan>
13
    <hashTree>
14
    <hashTree>
14
      <ThreadGroup guiclass="ThreadGroupGui" testclass="ThreadGroup" testname="Jakarta Users" enabled="true">
15
      <ThreadGroup guiclass="ThreadGroupGui" testclass="ThreadGroup" testname="Jakarta Users" enabled="true">
Lines 18-25 Link Here
18
        <stringProp name="ThreadGroup.num_threads">1</stringProp>
19
        <stringProp name="ThreadGroup.num_threads">1</stringProp>
19
        <boolProp name="ThreadGroup.scheduler">false</boolProp>
20
        <boolProp name="ThreadGroup.scheduler">false</boolProp>
20
        <elementProp name="ThreadGroup.main_controller" elementType="LoopController" guiclass="LoopControlPanel" testclass="LoopController" testname="Loop Controller" enabled="true">
21
        <elementProp name="ThreadGroup.main_controller" elementType="LoopController" guiclass="LoopControlPanel" testclass="LoopController" testname="Loop Controller" enabled="true">
22
          <boolProp name="LoopController.continue_forever">false</boolProp>
21
          <stringProp name="LoopController.loops">8</stringProp>
23
          <stringProp name="LoopController.loops">8</stringProp>
22
          <boolProp name="LoopController.continue_forever">false</boolProp>
23
        </elementProp>
24
        </elementProp>
24
        <longProp name="ThreadGroup.end_time">0</longProp>
25
        <longProp name="ThreadGroup.end_time">0</longProp>
25
        <stringProp name="ThreadGroup.on_sample_error">continue</stringProp>
26
        <stringProp name="ThreadGroup.on_sample_error">continue</stringProp>
Lines 31-43 Link Here
31
        </InterleaveControl>
32
        </InterleaveControl>
32
        <hashTree>
33
        <hashTree>
33
          <ConfigTestElement guiclass="HttpDefaultsGui" testclass="ConfigTestElement" testname="Defaults" enabled="true">
34
          <ConfigTestElement guiclass="HttpDefaultsGui" testclass="ConfigTestElement" testname="Defaults" enabled="true">
34
            <stringProp name="HTTPSampler.path">/</stringProp>
35
            <stringProp name="HTTPSampler.domain">jakarta.apache.org</stringProp>
36
            <stringProp name="HTTPSampler.protocol"></stringProp>
37
            <stringProp name="HTTPSampler.port"></stringProp>
38
            <elementProp name="HTTPsampler.Arguments" elementType="Arguments" guiclass="HTTPArgumentsPanel" testclass="Arguments" enabled="true">
35
            <elementProp name="HTTPsampler.Arguments" elementType="Arguments" guiclass="HTTPArgumentsPanel" testclass="Arguments" enabled="true">
39
              <collectionProp name="Arguments.arguments"/>
36
              <collectionProp name="Arguments.arguments"/>
40
            </elementProp>
37
            </elementProp>
38
            <stringProp name="HTTPSampler.domain">jakarta.apache.org</stringProp>
39
            <stringProp name="HTTPSampler.port"></stringProp>
40
            <stringProp name="HTTPSampler.protocol"></stringProp>
41
            <stringProp name="HTTPSampler.contentEncoding"></stringProp>
42
            <stringProp name="HTTPSampler.path">/</stringProp>
41
          </ConfigTestElement>
43
          </ConfigTestElement>
42
          <hashTree/>
44
          <hashTree/>
43
          <InterleaveControl guiclass="InterleaveControlGui" testclass="InterleaveControl" testname="Interleave Controller" enabled="true">
45
          <InterleaveControl guiclass="InterleaveControlGui" testclass="InterleaveControl" testname="Interleave Controller" enabled="true">
Lines 45-85 Link Here
45
          </InterleaveControl>
47
          </InterleaveControl>
46
          <hashTree>
48
          <hashTree>
47
            <HTTPSampler guiclass="HttpTestSampleGui" testclass="HTTPSampler" testname="Home Page" enabled="true">
49
            <HTTPSampler guiclass="HttpTestSampleGui" testclass="HTTPSampler" testname="Home Page" enabled="true">
50
              <elementProp name="HTTPsampler.Arguments" elementType="Arguments" guiclass="HTTPArgumentsPanel" testclass="Arguments" enabled="true">
51
                <collectionProp name="Arguments.arguments"/>
52
              </elementProp>
53
              <stringProp name="HTTPSampler.domain"></stringProp>
54
              <stringProp name="HTTPSampler.port"></stringProp>
55
              <stringProp name="HTTPSampler.protocol">http</stringProp>
56
              <stringProp name="HTTPSampler.contentEncoding"></stringProp>
48
              <stringProp name="HTTPSampler.path">/</stringProp>
57
              <stringProp name="HTTPSampler.path">/</stringProp>
49
              <stringProp name="HTTPSampler.method">GET</stringProp>
58
              <stringProp name="HTTPSampler.method">GET</stringProp>
59
              <boolProp name="HTTPSampler.follow_redirects">false</boolProp>
60
              <boolProp name="HTTPSampler.auto_redirects">false</boolProp>
50
              <boolProp name="HTTPSampler.use_keepalive">false</boolProp>
61
              <boolProp name="HTTPSampler.use_keepalive">false</boolProp>
51
              <stringProp name="HTTPSampler.protocol">http</stringProp>
62
              <boolProp name="HTTPSampler.DO_MULTIPART_POST">false</boolProp>
52
              <boolProp name="HTTPSampler.image_parser">false</boolProp>
63
              <elementProp name="HTTPsampler.Files" elementType="HTTPFileArgs" guiclass="HTTPFileArgsPanel" testclass="HTTPFileArgs" enabled="true">
53
              <boolProp name="HTTPSampler.follow_redirects">false</boolProp>
64
                <collectionProp name="HTTPFileArgs.files"/>
54
              <elementProp name="HTTPsampler.Arguments" elementType="Arguments" guiclass="HTTPArgumentsPanel" testclass="Arguments" enabled="true">
55
                <collectionProp name="Arguments.arguments"/>
56
              </elementProp>
65
              </elementProp>
57
              <stringProp name="HTTPSampler.port"></stringProp>
58
              <stringProp name="HTTPSampler.mimetype"></stringProp>
59
              <stringProp name="HTTPSampler.FILE_FIELD"></stringProp>
60
              <stringProp name="HTTPSampler.monitor">false</stringProp>
66
              <stringProp name="HTTPSampler.monitor">false</stringProp>
61
              <stringProp name="HTTPSampler.domain"></stringProp>
67
              <stringProp name="HTTPSampler.embedded_url_re"></stringProp>
62
              <stringProp name="HTTPSampler.FILE_NAME"></stringProp>
63
              <boolProp name="HTTPSampler.auto_redirects">false</boolProp>
64
            </HTTPSampler>
68
            </HTTPSampler>
65
            <hashTree/>
69
            <hashTree/>
66
            <HTTPSampler guiclass="HttpTestSampleGui" testclass="HTTPSampler" testname="CVS Page" enabled="true">
70
            <HTTPSampler guiclass="HttpTestSampleGui" testclass="HTTPSampler" testname="CVS Page" enabled="true">
71
              <elementProp name="HTTPsampler.Arguments" elementType="Arguments" guiclass="HTTPArgumentsPanel" testclass="Arguments" enabled="true">
72
                <collectionProp name="Arguments.arguments"/>
73
              </elementProp>
74
              <stringProp name="HTTPSampler.domain"></stringProp>
75
              <stringProp name="HTTPSampler.port"></stringProp>
76
              <stringProp name="HTTPSampler.protocol">http</stringProp>
77
              <stringProp name="HTTPSampler.contentEncoding"></stringProp>
67
              <stringProp name="HTTPSampler.path">/site/cvsindex.html</stringProp>
78
              <stringProp name="HTTPSampler.path">/site/cvsindex.html</stringProp>
68
              <stringProp name="HTTPSampler.method">GET</stringProp>
79
              <stringProp name="HTTPSampler.method">GET</stringProp>
80
              <boolProp name="HTTPSampler.follow_redirects">false</boolProp>
81
              <boolProp name="HTTPSampler.auto_redirects">false</boolProp>
69
              <boolProp name="HTTPSampler.use_keepalive">false</boolProp>
82
              <boolProp name="HTTPSampler.use_keepalive">false</boolProp>
70
              <stringProp name="HTTPSampler.protocol">http</stringProp>
83
              <boolProp name="HTTPSampler.DO_MULTIPART_POST">false</boolProp>
71
              <boolProp name="HTTPSampler.image_parser">false</boolProp>
84
              <elementProp name="HTTPsampler.Files" elementType="HTTPFileArgs" guiclass="HTTPFileArgsPanel" testclass="HTTPFileArgs" enabled="true">
72
              <boolProp name="HTTPSampler.follow_redirects">false</boolProp>
85
                <collectionProp name="HTTPFileArgs.files"/>
73
              <elementProp name="HTTPsampler.Arguments" elementType="Arguments" guiclass="HTTPArgumentsPanel" testclass="Arguments" enabled="true">
74
                <collectionProp name="Arguments.arguments"/>
75
              </elementProp>
86
              </elementProp>
76
              <stringProp name="HTTPSampler.port"></stringProp>
77
              <stringProp name="HTTPSampler.mimetype"></stringProp>
78
              <stringProp name="HTTPSampler.FILE_FIELD"></stringProp>
79
              <stringProp name="HTTPSampler.monitor">false</stringProp>
87
              <stringProp name="HTTPSampler.monitor">false</stringProp>
80
              <stringProp name="HTTPSampler.domain"></stringProp>
88
              <stringProp name="HTTPSampler.embedded_url_re"></stringProp>
81
              <stringProp name="HTTPSampler.FILE_NAME"></stringProp>
82
              <boolProp name="HTTPSampler.auto_redirects">false</boolProp>
83
            </HTTPSampler>
89
            </HTTPSampler>
84
            <hashTree/>
90
            <hashTree/>
85
          </hashTree>
91
          </hashTree>
Lines 88-134 Link Here
88
          </InterleaveControl>
94
          </InterleaveControl>
89
          <hashTree>
95
          <hashTree>
90
            <HTTPSampler guiclass="HttpTestSampleGui" testclass="HTTPSampler" testname="Bug Page" enabled="true">
96
            <HTTPSampler guiclass="HttpTestSampleGui" testclass="HTTPSampler" testname="Bug Page" enabled="true">
97
              <elementProp name="HTTPsampler.Arguments" elementType="Arguments" guiclass="HTTPArgumentsPanel" testclass="Arguments" enabled="true">
98
                <collectionProp name="Arguments.arguments"/>
99
              </elementProp>
100
              <stringProp name="HTTPSampler.domain"></stringProp>
101
              <stringProp name="HTTPSampler.port"></stringProp>
102
              <stringProp name="HTTPSampler.protocol">http</stringProp>
103
              <stringProp name="HTTPSampler.contentEncoding"></stringProp>
91
              <stringProp name="HTTPSampler.path">/site/bugs.html</stringProp>
104
              <stringProp name="HTTPSampler.path">/site/bugs.html</stringProp>
92
              <stringProp name="HTTPSampler.method">GET</stringProp>
105
              <stringProp name="HTTPSampler.method">GET</stringProp>
106
              <boolProp name="HTTPSampler.follow_redirects">false</boolProp>
107
              <boolProp name="HTTPSampler.auto_redirects">false</boolProp>
93
              <boolProp name="HTTPSampler.use_keepalive">false</boolProp>
108
              <boolProp name="HTTPSampler.use_keepalive">false</boolProp>
94
              <stringProp name="HTTPSampler.protocol">http</stringProp>
109
              <boolProp name="HTTPSampler.DO_MULTIPART_POST">false</boolProp>
95
              <boolProp name="HTTPSampler.image_parser">false</boolProp>
110
              <elementProp name="HTTPsampler.Files" elementType="HTTPFileArgs" guiclass="HTTPFileArgsPanel" testclass="HTTPFileArgs" enabled="true">
96
              <boolProp name="HTTPSampler.follow_redirects">false</boolProp>
111
                <collectionProp name="HTTPFileArgs.files"/>
97
              <elementProp name="HTTPsampler.Arguments" elementType="Arguments" guiclass="HTTPArgumentsPanel" testclass="Arguments" enabled="true">
98
                <collectionProp name="Arguments.arguments"/>
99
              </elementProp>
112
              </elementProp>
100
              <stringProp name="HTTPSampler.port"></stringProp>
101
              <stringProp name="HTTPSampler.mimetype"></stringProp>
102
              <stringProp name="HTTPSampler.FILE_FIELD"></stringProp>
103
              <stringProp name="HTTPSampler.monitor">false</stringProp>
113
              <stringProp name="HTTPSampler.monitor">false</stringProp>
104
              <stringProp name="HTTPSampler.domain"></stringProp>
114
              <stringProp name="HTTPSampler.embedded_url_re"></stringProp>
105
              <stringProp name="HTTPSampler.FILE_NAME"></stringProp>
106
              <boolProp name="HTTPSampler.auto_redirects">false</boolProp>
107
            </HTTPSampler>
115
            </HTTPSampler>
108
            <hashTree/>
116
            <hashTree/>
109
            <HTTPSampler guiclass="HttpTestSampleGui" testclass="HTTPSampler" testname="FAQ Page" enabled="true">
117
            <HTTPSampler guiclass="HttpTestSampleGui" testclass="HTTPSampler" testname="FAQ Page" enabled="true">
118
              <elementProp name="HTTPsampler.Arguments" elementType="Arguments" guiclass="HTTPArgumentsPanel" testclass="Arguments" enabled="true">
119
                <collectionProp name="Arguments.arguments"/>
120
              </elementProp>
121
              <stringProp name="HTTPSampler.domain"></stringProp>
122
              <stringProp name="HTTPSampler.port"></stringProp>
123
              <stringProp name="HTTPSampler.protocol">http</stringProp>
124
              <stringProp name="HTTPSampler.contentEncoding"></stringProp>
110
              <stringProp name="HTTPSampler.path">/site/faqs.html</stringProp>
125
              <stringProp name="HTTPSampler.path">/site/faqs.html</stringProp>
111
              <stringProp name="HTTPSampler.method">GET</stringProp>
126
              <stringProp name="HTTPSampler.method">GET</stringProp>
127
              <boolProp name="HTTPSampler.follow_redirects">false</boolProp>
128
              <boolProp name="HTTPSampler.auto_redirects">false</boolProp>
112
              <boolProp name="HTTPSampler.use_keepalive">false</boolProp>
129
              <boolProp name="HTTPSampler.use_keepalive">false</boolProp>
113
              <stringProp name="HTTPSampler.protocol">http</stringProp>
130
              <boolProp name="HTTPSampler.DO_MULTIPART_POST">false</boolProp>
114
              <boolProp name="HTTPSampler.image_parser">false</boolProp>
131
              <elementProp name="HTTPsampler.Files" elementType="HTTPFileArgs" guiclass="HTTPFileArgsPanel" testclass="HTTPFileArgs" enabled="true">
115
              <boolProp name="HTTPSampler.follow_redirects">false</boolProp>
132
                <collectionProp name="HTTPFileArgs.files"/>
116
              <elementProp name="HTTPsampler.Arguments" elementType="Arguments" guiclass="HTTPArgumentsPanel" testclass="Arguments" enabled="true">
117
                <collectionProp name="Arguments.arguments"/>
118
              </elementProp>
133
              </elementProp>
119
              <stringProp name="HTTPSampler.port"></stringProp>
120
              <stringProp name="HTTPSampler.mimetype"></stringProp>
121
              <stringProp name="HTTPSampler.FILE_FIELD"></stringProp>
122
              <stringProp name="HTTPSampler.monitor">false</stringProp>
134
              <stringProp name="HTTPSampler.monitor">false</stringProp>
123
              <stringProp name="HTTPSampler.domain"></stringProp>
135
              <stringProp name="HTTPSampler.embedded_url_re"></stringProp>
124
              <stringProp name="HTTPSampler.FILE_NAME"></stringProp>
125
              <boolProp name="HTTPSampler.auto_redirects">false</boolProp>
126
            </HTTPSampler>
136
            </HTTPSampler>
127
            <hashTree/>
137
            <hashTree/>
128
          </hashTree>
138
          </hashTree>
129
        </hashTree>
139
        </hashTree>
130
        <ResultCollector guiclass="GraphVisualizer" testclass="ResultCollector" testname="File Reporter" enabled="true">
140
        <ResultCollector guiclass="GraphVisualizer" testclass="ResultCollector" testname="File Reporter" enabled="true">
141
          <boolProp name="ResultCollector.error_logging">false</boolProp>
131
          <objProp>
142
          <objProp>
143
            <name>saveConfig</name>
132
            <value class="SampleSaveConfiguration">
144
            <value class="SampleSaveConfiguration">
133
              <time>true</time>
145
              <time>true</time>
134
              <latency>true</latency>
146
              <latency>true</latency>
Lines 152-161 Link Here
152
              <saveAssertionResultsFailureMessage>false</saveAssertionResultsFailureMessage>
164
              <saveAssertionResultsFailureMessage>false</saveAssertionResultsFailureMessage>
153
              <assertionsResultsToSave>0</assertionsResultsToSave>
165
              <assertionsResultsToSave>0</assertionsResultsToSave>
154
            </value>
166
            </value>
155
            <name>saveConfig</name>
156
          </objProp>
167
          </objProp>
157
          <stringProp name="filename">interleave-test2.dat</stringProp>
168
          <stringProp name="filename">interleave-test2.dat</stringProp>
158
          <boolProp name="ResultCollector.error_logging">false</boolProp>
159
        </ResultCollector>
169
        </ResultCollector>
160
        <hashTree/>
170
        <hashTree/>
161
      </hashTree>
171
      </hashTree>
(-)bin/testfiles/HeaderManagerTestPlan.jmx (-16 / +19 lines)
Lines 1-5 Link Here
1
<?xml version="1.0" encoding="UTF-8"?>
1
<?xml version="1.0" encoding="UTF-8"?>
2
<jmeterTestPlan version="1.2" properties="1.8">
2
<jmeterTestPlan version="1.2" properties="2.0">
3
  <hashTree>
3
  <hashTree>
4
    <TestPlan guiclass="TestPlanGui" testclass="TestPlan" testname="Test Plan" enabled="true">
4
    <TestPlan guiclass="TestPlanGui" testclass="TestPlan" testname="Test Plan" enabled="true">
5
      <elementProp name="TestPlan.user_defined_variables" elementType="Arguments" guiclass="ArgumentsPanel" testclass="Arguments" testname="User Defined Variables" enabled="true">
5
      <elementProp name="TestPlan.user_defined_variables" elementType="Arguments" guiclass="ArgumentsPanel" testclass="Arguments" testname="User Defined Variables" enabled="true">
Lines 9-14 Link Here
9
      <boolProp name="TestPlan.serialize_threadgroups">false</boolProp>
9
      <boolProp name="TestPlan.serialize_threadgroups">false</boolProp>
10
      <boolProp name="TestPlan.functional_mode">false</boolProp>
10
      <boolProp name="TestPlan.functional_mode">false</boolProp>
11
      <stringProp name="TestPlan.comments"></stringProp>
11
      <stringProp name="TestPlan.comments"></stringProp>
12
      <stringProp name="TestPlan.user_define_classpath"></stringProp>
12
    </TestPlan>
13
    </TestPlan>
13
    <hashTree>
14
    <hashTree>
14
      <ThreadGroup guiclass="ThreadGroupGui" testclass="ThreadGroup" testname="Thread Group" enabled="true">
15
      <ThreadGroup guiclass="ThreadGroupGui" testclass="ThreadGroup" testname="Thread Group" enabled="true">
Lines 18-25 Link Here
18
        <stringProp name="ThreadGroup.num_threads">1</stringProp>
19
        <stringProp name="ThreadGroup.num_threads">1</stringProp>
19
        <boolProp name="ThreadGroup.scheduler">false</boolProp>
20
        <boolProp name="ThreadGroup.scheduler">false</boolProp>
20
        <elementProp name="ThreadGroup.main_controller" elementType="LoopController" guiclass="LoopControlPanel" testclass="LoopController" testname="Loop Controller" enabled="true">
21
        <elementProp name="ThreadGroup.main_controller" elementType="LoopController" guiclass="LoopControlPanel" testclass="LoopController" testname="Loop Controller" enabled="true">
22
          <boolProp name="LoopController.continue_forever">false</boolProp>
21
          <stringProp name="LoopController.loops">1</stringProp>
23
          <stringProp name="LoopController.loops">1</stringProp>
22
          <boolProp name="LoopController.continue_forever">false</boolProp>
23
        </elementProp>
24
        </elementProp>
24
        <longProp name="ThreadGroup.end_time">0</longProp>
25
        <longProp name="ThreadGroup.end_time">0</longProp>
25
        <stringProp name="ThreadGroup.on_sample_error">continue</stringProp>
26
        <stringProp name="ThreadGroup.on_sample_error">continue</stringProp>
Lines 29-61 Link Here
29
        <HeaderManager guiclass="HeaderPanel" testclass="HeaderManager" testname="HTTP Header Manager" enabled="true">
30
        <HeaderManager guiclass="HeaderPanel" testclass="HeaderManager" testname="HTTP Header Manager" enabled="true">
30
          <collectionProp name="HeaderManager.headers">
31
          <collectionProp name="HeaderManager.headers">
31
            <elementProp name="User-Agent" elementType="Header">
32
            <elementProp name="User-Agent" elementType="Header">
33
              <stringProp name="Header.name">User-Agent</stringProp>
32
              <stringProp name="Header.value">Mozilla/4.0 (compatible; MSIE 5.5; Windows 98)</stringProp>
34
              <stringProp name="Header.value">Mozilla/4.0 (compatible; MSIE 5.5; Windows 98)</stringProp>
33
              <stringProp name="Header.name">User-Agent</stringProp>
34
            </elementProp>
35
            </elementProp>
35
          </collectionProp>
36
          </collectionProp>
36
        </HeaderManager>
37
        </HeaderManager>
37
        <hashTree/>
38
        <hashTree/>
38
        <HTTPSampler guiclass="HttpTestSampleGui" testclass="HTTPSampler" testname="HTTP Request" enabled="true">
39
        <HTTPSampler guiclass="HttpTestSampleGui" testclass="HTTPSampler" testname="HTTP Request" enabled="true">
40
          <elementProp name="HTTPsampler.Arguments" elementType="Arguments" guiclass="HTTPArgumentsPanel" testclass="Arguments" enabled="true">
41
            <collectionProp name="Arguments.arguments"/>
42
          </elementProp>
43
          <stringProp name="HTTPSampler.domain">jakarta.apache.org</stringProp>
44
          <stringProp name="HTTPSampler.port"></stringProp>
45
          <stringProp name="HTTPSampler.protocol">http</stringProp>
46
          <stringProp name="HTTPSampler.contentEncoding"></stringProp>
39
          <stringProp name="HTTPSampler.path">/</stringProp>
47
          <stringProp name="HTTPSampler.path">/</stringProp>
40
          <stringProp name="HTTPSampler.method">GET</stringProp>
48
          <stringProp name="HTTPSampler.method">GET</stringProp>
49
          <boolProp name="HTTPSampler.follow_redirects">false</boolProp>
50
          <boolProp name="HTTPSampler.auto_redirects">false</boolProp>
41
          <boolProp name="HTTPSampler.use_keepalive">false</boolProp>
51
          <boolProp name="HTTPSampler.use_keepalive">false</boolProp>
42
          <stringProp name="HTTPSampler.protocol">http</stringProp>
52
          <boolProp name="HTTPSampler.DO_MULTIPART_POST">false</boolProp>
43
          <boolProp name="HTTPSampler.image_parser">false</boolProp>
53
          <elementProp name="HTTPsampler.Files" elementType="HTTPFileArgs" guiclass="HTTPFileArgsPanel" testclass="HTTPFileArgs" enabled="true">
44
          <boolProp name="HTTPSampler.follow_redirects">false</boolProp>
54
            <collectionProp name="HTTPFileArgs.files"/>
45
          <elementProp name="HTTPsampler.Arguments" elementType="Arguments" guiclass="HTTPArgumentsPanel" testclass="Arguments" enabled="true">
46
            <collectionProp name="Arguments.arguments"/>
47
          </elementProp>
55
          </elementProp>
48
          <stringProp name="HTTPSampler.port"></stringProp>
49
          <stringProp name="HTTPSampler.mimetype"></stringProp>
50
          <stringProp name="HTTPSampler.FILE_FIELD"></stringProp>
51
          <stringProp name="HTTPSampler.domain">jakarta.apache.org</stringProp>
52
          <stringProp name="HTTPSampler.monitor">false</stringProp>
56
          <stringProp name="HTTPSampler.monitor">false</stringProp>
53
          <stringProp name="HTTPSampler.FILE_NAME"></stringProp>
57
          <stringProp name="HTTPSampler.embedded_url_re"></stringProp>
54
          <boolProp name="HTTPSampler.auto_redirects">false</boolProp>
55
        </HTTPSampler>
58
        </HTTPSampler>
56
        <hashTree/>
59
        <hashTree/>
57
        <ResultCollector guiclass="GraphVisualizer" testclass="ResultCollector" testname="File Reporter" enabled="true">
60
        <ResultCollector guiclass="GraphVisualizer" testclass="ResultCollector" testname="File Reporter" enabled="true">
61
          <boolProp name="ResultCollector.error_logging">false</boolProp>
58
          <objProp>
62
          <objProp>
63
            <name>saveConfig</name>
59
            <value class="SampleSaveConfiguration">
64
            <value class="SampleSaveConfiguration">
60
              <time>true</time>
65
              <time>true</time>
61
              <latency>true</latency>
66
              <latency>true</latency>
Lines 79-88 Link Here
79
              <saveAssertionResultsFailureMessage>false</saveAssertionResultsFailureMessage>
84
              <saveAssertionResultsFailureMessage>false</saveAssertionResultsFailureMessage>
80
              <assertionsResultsToSave>0</assertionsResultsToSave>
85
              <assertionsResultsToSave>0</assertionsResultsToSave>
81
            </value>
86
            </value>
82
            <name>saveConfig</name>
83
          </objProp>
87
          </objProp>
84
          <stringProp name="filename">header-manager.dat</stringProp>
88
          <stringProp name="filename">header-manager.dat</stringProp>
85
          <boolProp name="ResultCollector.error_logging">false</boolProp>
86
        </ResultCollector>
89
        </ResultCollector>
87
        <hashTree/>
90
        <hashTree/>
88
      </hashTree>
91
      </hashTree>
(-)bin/testfiles/Modification Manager.jmx (-18 / +22 lines)
Lines 1-5 Link Here
1
<?xml version="1.0" encoding="UTF-8"?>
1
<?xml version="1.0" encoding="UTF-8"?>
2
<jmeterTestPlan version="1.2" properties="1.8">
2
<jmeterTestPlan version="1.2" properties="2.0">
3
  <hashTree>
3
  <hashTree>
4
    <TestPlan guiclass="TestPlanGui" testclass="TestPlan" testname="Test Plan" enabled="true">
4
    <TestPlan guiclass="TestPlanGui" testclass="TestPlan" testname="Test Plan" enabled="true">
5
      <collectionProp name="TestPlan.thread_groups"/>
5
      <collectionProp name="TestPlan.thread_groups"/>
Lines 9-14 Link Here
9
      <boolProp name="TestPlan.serialize_threadgroups">false</boolProp>
9
      <boolProp name="TestPlan.serialize_threadgroups">false</boolProp>
10
      <boolProp name="TestPlan.functional_mode">false</boolProp>
10
      <boolProp name="TestPlan.functional_mode">false</boolProp>
11
      <stringProp name="TestPlan.comments"></stringProp>
11
      <stringProp name="TestPlan.comments"></stringProp>
12
      <stringProp name="TestPlan.user_define_classpath"></stringProp>
12
    </TestPlan>
13
    </TestPlan>
13
    <hashTree>
14
    <hashTree>
14
      <GenericController guiclass="LogicControllerGui" testclass="GenericController" testname="Modification Manager" enabled="true"/>
15
      <GenericController guiclass="LogicControllerGui" testclass="GenericController" testname="Modification Manager" enabled="true"/>
Lines 16-30 Link Here
16
        <GenericController guiclass="LogicControllerGui" testclass="GenericController" testname="Simple Controller" enabled="true"/>
17
        <GenericController guiclass="LogicControllerGui" testclass="GenericController" testname="Simple Controller" enabled="true"/>
17
        <hashTree>
18
        <hashTree>
18
          <HTTPSampler guiclass="HttpTestSampleGui" testclass="HTTPSampler" testname="Web Testing" enabled="true">
19
          <HTTPSampler guiclass="HttpTestSampleGui" testclass="HTTPSampler" testname="Web Testing" enabled="true">
19
            <stringProp name="HTTPSampler.path">/xdx/admin/inspect_job.jsp</stringProp>
20
            <stringProp name="HTTPSampler.method">GET</stringProp>
21
            <boolProp name="HTTPSampler.use_keepalive">false</boolProp>
22
            <stringProp name="HTTPSampler.protocol">http</stringProp>
23
            <boolProp name="HTTPSampler.image_parser">false</boolProp>
24
            <boolProp name="HTTPSampler.follow_redirects">false</boolProp>
25
            <elementProp name="HTTPsampler.Arguments" elementType="Arguments" guiclass="HTTPArgumentsPanel" testclass="Arguments" enabled="true">
20
            <elementProp name="HTTPsampler.Arguments" elementType="Arguments" guiclass="HTTPArgumentsPanel" testclass="Arguments" enabled="true">
26
              <collectionProp name="Arguments.arguments">
21
              <collectionProp name="Arguments.arguments">
27
                <elementProp name="" elementType="HTTPArgument">
22
                <elementProp name="request.job_id" elementType="HTTPArgument">
28
                  <stringProp name="Argument.metadata">=</stringProp>
23
                  <stringProp name="Argument.metadata">=</stringProp>
29
                  <stringProp name="Argument.value">.*</stringProp>
24
                  <stringProp name="Argument.value">.*</stringProp>
30
                  <boolProp name="HTTPArgument.use_equals">true</boolProp>
25
                  <boolProp name="HTTPArgument.use_equals">true</boolProp>
Lines 33-39 Link Here
33
                  <stringProp name="HTTPArgument.encoded_name">request.job_id</stringProp>
28
                  <stringProp name="HTTPArgument.encoded_name">request.job_id</stringProp>
34
                  <stringProp name="HTTPArgument.encoded_value">.*</stringProp>
29
                  <stringProp name="HTTPArgument.encoded_value">.*</stringProp>
35
                </elementProp>
30
                </elementProp>
36
                <elementProp name="" elementType="HTTPArgument">
31
                <elementProp name="request.action1" elementType="HTTPArgument">
37
                  <stringProp name="Argument.metadata">=</stringProp>
32
                  <stringProp name="Argument.metadata">=</stringProp>
38
                  <stringProp name="Argument.value">opjobadmin.action.inspect</stringProp>
33
                  <stringProp name="Argument.value">opjobadmin.action.inspect</stringProp>
39
                  <boolProp name="HTTPArgument.use_equals">true</boolProp>
34
                  <boolProp name="HTTPArgument.use_equals">true</boolProp>
Lines 44-66 Link Here
44
                </elementProp>
39
                </elementProp>
45
              </collectionProp>
40
              </collectionProp>
46
            </elementProp>
41
            </elementProp>
42
            <stringProp name="HTTPSampler.domain"></stringProp>
47
            <stringProp name="HTTPSampler.port">80</stringProp>
43
            <stringProp name="HTTPSampler.port">80</stringProp>
48
            <stringProp name="HTTPSampler.mimetype"></stringProp>
44
            <stringProp name="HTTPSampler.protocol">http</stringProp>
49
            <stringProp name="HTTPSampler.FILE_FIELD"></stringProp>
45
            <stringProp name="HTTPSampler.contentEncoding"></stringProp>
46
            <stringProp name="HTTPSampler.path">/xdx/admin/inspect_job.jsp</stringProp>
47
            <stringProp name="HTTPSampler.method">GET</stringProp>
48
            <boolProp name="HTTPSampler.follow_redirects">false</boolProp>
49
            <boolProp name="HTTPSampler.auto_redirects">false</boolProp>
50
            <boolProp name="HTTPSampler.use_keepalive">false</boolProp>
51
            <boolProp name="HTTPSampler.DO_MULTIPART_POST">false</boolProp>
52
            <elementProp name="HTTPsampler.Files" elementType="HTTPFileArgs" guiclass="HTTPFileArgsPanel" testclass="HTTPFileArgs" enabled="true">
53
              <collectionProp name="HTTPFileArgs.files"/>
54
            </elementProp>
50
            <stringProp name="HTTPSampler.monitor">false</stringProp>
55
            <stringProp name="HTTPSampler.monitor">false</stringProp>
51
            <stringProp name="HTTPSampler.domain"></stringProp>
56
            <stringProp name="HTTPSampler.embedded_url_re"></stringProp>
52
            <stringProp name="HTTPSampler.FILE_NAME"></stringProp>
53
            <boolProp name="HTTPSampler.auto_redirects">false</boolProp>
54
          </HTTPSampler>
57
          </HTTPSampler>
55
          <hashTree/>
58
          <hashTree/>
56
          <ConfigTestElement guiclass="HttpDefaultsGui" testclass="ConfigTestElement" testname="HTTP Request Defaults" enabled="true">
59
          <ConfigTestElement guiclass="HttpDefaultsGui" testclass="ConfigTestElement" testname="HTTP Request Defaults" enabled="true">
57
            <stringProp name="HTTPSampler.path"></stringProp>
58
            <stringProp name="HTTPSampler.domain">13.231.197.158</stringProp>
59
            <stringProp name="HTTPSampler.protocol"></stringProp>
60
            <stringProp name="HTTPSampler.port">80</stringProp>
61
            <elementProp name="HTTPsampler.Arguments" elementType="Arguments" guiclass="HTTPArgumentsPanel" testclass="Arguments" enabled="true">
60
            <elementProp name="HTTPsampler.Arguments" elementType="Arguments" guiclass="HTTPArgumentsPanel" testclass="Arguments" enabled="true">
62
              <collectionProp name="Arguments.arguments"/>
61
              <collectionProp name="Arguments.arguments"/>
63
            </elementProp>
62
            </elementProp>
63
            <stringProp name="HTTPSampler.domain">13.231.197.158</stringProp>
64
            <stringProp name="HTTPSampler.port">80</stringProp>
65
            <stringProp name="HTTPSampler.protocol"></stringProp>
66
            <stringProp name="HTTPSampler.contentEncoding"></stringProp>
67
            <stringProp name="HTTPSampler.path"></stringProp>
64
          </ConfigTestElement>
68
          </ConfigTestElement>
65
          <hashTree/>
69
          <hashTree/>
66
        </hashTree>
70
        </hashTree>
(-)bin/testfiles/InterleaveTestPlan.jmx (-41 / +49 lines)
Lines 1-5 Link Here
1
<?xml version="1.0" encoding="UTF-8"?>
1
<?xml version="1.0" encoding="UTF-8"?>
2
<jmeterTestPlan version="1.2" properties="1.8">
2
<jmeterTestPlan version="1.2" properties="2.0">
3
  <hashTree>
3
  <hashTree>
4
    <TestPlan guiclass="TestPlanGui" testclass="TestPlan" testname="Test Plan" enabled="true">
4
    <TestPlan guiclass="TestPlanGui" testclass="TestPlan" testname="Test Plan" enabled="true">
5
      <collectionProp name="TestPlan.thread_groups"/>
5
      <collectionProp name="TestPlan.thread_groups"/>
Lines 9-14 Link Here
9
      <boolProp name="TestPlan.serialize_threadgroups">false</boolProp>
9
      <boolProp name="TestPlan.serialize_threadgroups">false</boolProp>
10
      <boolProp name="TestPlan.functional_mode">false</boolProp>
10
      <boolProp name="TestPlan.functional_mode">false</boolProp>
11
      <stringProp name="TestPlan.comments"></stringProp>
11
      <stringProp name="TestPlan.comments"></stringProp>
12
      <stringProp name="TestPlan.user_define_classpath"></stringProp>
12
    </TestPlan>
13
    </TestPlan>
13
    <hashTree>
14
    <hashTree>
14
      <ThreadGroup guiclass="ThreadGroupGui" testclass="ThreadGroup" testname="Jakarta Users" enabled="true">
15
      <ThreadGroup guiclass="ThreadGroupGui" testclass="ThreadGroup" testname="Jakarta Users" enabled="true">
Lines 18-25 Link Here
18
        <stringProp name="ThreadGroup.num_threads">2</stringProp>
19
        <stringProp name="ThreadGroup.num_threads">2</stringProp>
19
        <boolProp name="ThreadGroup.scheduler">false</boolProp>
20
        <boolProp name="ThreadGroup.scheduler">false</boolProp>
20
        <elementProp name="ThreadGroup.main_controller" elementType="LoopController" guiclass="LoopControlPanel" testclass="LoopController" testname="Loop Controller" enabled="true">
21
        <elementProp name="ThreadGroup.main_controller" elementType="LoopController" guiclass="LoopControlPanel" testclass="LoopController" testname="Loop Controller" enabled="true">
22
          <boolProp name="LoopController.continue_forever">false</boolProp>
21
          <stringProp name="LoopController.loops">5</stringProp>
23
          <stringProp name="LoopController.loops">5</stringProp>
22
          <boolProp name="LoopController.continue_forever">false</boolProp>
23
        </elementProp>
24
        </elementProp>
24
        <longProp name="ThreadGroup.end_time">0</longProp>
25
        <longProp name="ThreadGroup.end_time">0</longProp>
25
        <stringProp name="ThreadGroup.on_sample_error">continue</stringProp>
26
        <stringProp name="ThreadGroup.on_sample_error">continue</stringProp>
Lines 31-105 Link Here
31
        </InterleaveControl>
32
        </InterleaveControl>
32
        <hashTree>
33
        <hashTree>
33
          <ConfigTestElement guiclass="HttpDefaultsGui" testclass="ConfigTestElement" testname="Defaults" enabled="true">
34
          <ConfigTestElement guiclass="HttpDefaultsGui" testclass="ConfigTestElement" testname="Defaults" enabled="true">
34
            <stringProp name="HTTPSampler.path"></stringProp>
35
            <stringProp name="HTTPSampler.domain"></stringProp>
36
            <stringProp name="HTTPSampler.protocol"></stringProp>
37
            <stringProp name="HTTPSampler.port"></stringProp>
38
            <elementProp name="HTTPsampler.Arguments" elementType="Arguments" guiclass="HTTPArgumentsPanel" testclass="Arguments" enabled="true">
35
            <elementProp name="HTTPsampler.Arguments" elementType="Arguments" guiclass="HTTPArgumentsPanel" testclass="Arguments" enabled="true">
39
              <collectionProp name="Arguments.arguments"/>
36
              <collectionProp name="Arguments.arguments"/>
40
            </elementProp>
37
            </elementProp>
38
            <stringProp name="HTTPSampler.domain"></stringProp>
39
            <stringProp name="HTTPSampler.port"></stringProp>
40
            <stringProp name="HTTPSampler.protocol"></stringProp>
41
            <stringProp name="HTTPSampler.contentEncoding"></stringProp>
42
            <stringProp name="HTTPSampler.path"></stringProp>
41
          </ConfigTestElement>
43
          </ConfigTestElement>
42
          <hashTree/>
44
          <hashTree/>
43
          <HTTPSampler guiclass="HttpTestSampleGui" testclass="HTTPSampler" testname="News Page" enabled="true">
45
          <HTTPSampler guiclass="HttpTestSampleGui" testclass="HTTPSampler" testname="News Page" enabled="true">
46
            <elementProp name="HTTPsampler.Arguments" elementType="Arguments" guiclass="HTTPArgumentsPanel" testclass="Arguments" enabled="true">
47
              <collectionProp name="Arguments.arguments"/>
48
            </elementProp>
49
            <stringProp name="HTTPSampler.domain"></stringProp>
50
            <stringProp name="HTTPSampler.port"></stringProp>
51
            <stringProp name="HTTPSampler.protocol">http</stringProp>
52
            <stringProp name="HTTPSampler.contentEncoding"></stringProp>
44
            <stringProp name="HTTPSampler.path">/site/news.html</stringProp>
53
            <stringProp name="HTTPSampler.path">/site/news.html</stringProp>
45
            <stringProp name="HTTPSampler.method">GET</stringProp>
54
            <stringProp name="HTTPSampler.method">GET</stringProp>
55
            <boolProp name="HTTPSampler.follow_redirects">false</boolProp>
56
            <boolProp name="HTTPSampler.auto_redirects">false</boolProp>
46
            <boolProp name="HTTPSampler.use_keepalive">false</boolProp>
57
            <boolProp name="HTTPSampler.use_keepalive">false</boolProp>
47
            <stringProp name="HTTPSampler.protocol">http</stringProp>
58
            <boolProp name="HTTPSampler.DO_MULTIPART_POST">false</boolProp>
48
            <boolProp name="HTTPSampler.image_parser">false</boolProp>
59
            <elementProp name="HTTPsampler.Files" elementType="HTTPFileArgs" guiclass="HTTPFileArgsPanel" testclass="HTTPFileArgs" enabled="true">
49
            <boolProp name="HTTPSampler.follow_redirects">false</boolProp>
60
              <collectionProp name="HTTPFileArgs.files"/>
50
            <elementProp name="HTTPsampler.Arguments" elementType="Arguments" guiclass="HTTPArgumentsPanel" testclass="Arguments" enabled="true">
51
              <collectionProp name="Arguments.arguments"/>
52
            </elementProp>
61
            </elementProp>
53
            <stringProp name="HTTPSampler.port"></stringProp>
54
            <stringProp name="HTTPSampler.mimetype"></stringProp>
55
            <stringProp name="HTTPSampler.FILE_FIELD"></stringProp>
56
            <stringProp name="HTTPSampler.monitor">false</stringProp>
62
            <stringProp name="HTTPSampler.monitor">false</stringProp>
57
            <stringProp name="HTTPSampler.domain"></stringProp>
63
            <stringProp name="HTTPSampler.embedded_url_re"></stringProp>
58
            <stringProp name="HTTPSampler.FILE_NAME"></stringProp>
59
            <boolProp name="HTTPSampler.auto_redirects">false</boolProp>
60
          </HTTPSampler>
64
          </HTTPSampler>
61
          <hashTree/>
65
          <hashTree/>
62
          <HTTPSampler guiclass="HttpTestSampleGui" testclass="HTTPSampler" testname="FAQ Page" enabled="true">
66
          <HTTPSampler guiclass="HttpTestSampleGui" testclass="HTTPSampler" testname="FAQ Page" enabled="true">
67
            <elementProp name="HTTPsampler.Arguments" elementType="Arguments" guiclass="HTTPArgumentsPanel" testclass="Arguments" enabled="true">
68
              <collectionProp name="Arguments.arguments"/>
69
            </elementProp>
70
            <stringProp name="HTTPSampler.domain"></stringProp>
71
            <stringProp name="HTTPSampler.port"></stringProp>
72
            <stringProp name="HTTPSampler.protocol">http</stringProp>
73
            <stringProp name="HTTPSampler.contentEncoding"></stringProp>
63
            <stringProp name="HTTPSampler.path">/site/faqs.html</stringProp>
74
            <stringProp name="HTTPSampler.path">/site/faqs.html</stringProp>
64
            <stringProp name="HTTPSampler.method">GET</stringProp>
75
            <stringProp name="HTTPSampler.method">GET</stringProp>
76
            <boolProp name="HTTPSampler.follow_redirects">false</boolProp>
77
            <boolProp name="HTTPSampler.auto_redirects">false</boolProp>
65
            <boolProp name="HTTPSampler.use_keepalive">false</boolProp>
78
            <boolProp name="HTTPSampler.use_keepalive">false</boolProp>
66
            <stringProp name="HTTPSampler.protocol">http</stringProp>
79
            <boolProp name="HTTPSampler.DO_MULTIPART_POST">false</boolProp>
67
            <boolProp name="HTTPSampler.image_parser">false</boolProp>
80
            <elementProp name="HTTPsampler.Files" elementType="HTTPFileArgs" guiclass="HTTPFileArgsPanel" testclass="HTTPFileArgs" enabled="true">
68
            <boolProp name="HTTPSampler.follow_redirects">false</boolProp>
81
              <collectionProp name="HTTPFileArgs.files"/>
69
            <elementProp name="HTTPsampler.Arguments" elementType="Arguments" guiclass="HTTPArgumentsPanel" testclass="Arguments" enabled="true">
70
              <collectionProp name="Arguments.arguments"/>
71
            </elementProp>
82
            </elementProp>
72
            <stringProp name="HTTPSampler.port"></stringProp>
73
            <stringProp name="HTTPSampler.mimetype"></stringProp>
74
            <stringProp name="HTTPSampler.FILE_FIELD"></stringProp>
75
            <stringProp name="HTTPSampler.monitor">false</stringProp>
83
            <stringProp name="HTTPSampler.monitor">false</stringProp>
76
            <stringProp name="HTTPSampler.domain"></stringProp>
84
            <stringProp name="HTTPSampler.embedded_url_re"></stringProp>
77
            <stringProp name="HTTPSampler.FILE_NAME"></stringProp>
78
            <boolProp name="HTTPSampler.auto_redirects">false</boolProp>
79
          </HTTPSampler>
85
          </HTTPSampler>
80
          <hashTree/>
86
          <hashTree/>
81
          <HTTPSampler guiclass="HttpTestSampleGui" testclass="HTTPSampler" testname="Gump Page" enabled="true">
87
          <HTTPSampler guiclass="HttpTestSampleGui" testclass="HTTPSampler" testname="Gump Page" enabled="true">
88
            <elementProp name="HTTPsampler.Arguments" elementType="Arguments" guiclass="HTTPArgumentsPanel" testclass="Arguments" enabled="true">
89
              <collectionProp name="Arguments.arguments"/>
90
            </elementProp>
91
            <stringProp name="HTTPSampler.domain"></stringProp>
92
            <stringProp name="HTTPSampler.port"></stringProp>
93
            <stringProp name="HTTPSampler.protocol">http</stringProp>
94
            <stringProp name="HTTPSampler.contentEncoding"></stringProp>
82
            <stringProp name="HTTPSampler.path">/gump</stringProp>
95
            <stringProp name="HTTPSampler.path">/gump</stringProp>
83
            <stringProp name="HTTPSampler.method">GET</stringProp>
96
            <stringProp name="HTTPSampler.method">GET</stringProp>
97
            <boolProp name="HTTPSampler.follow_redirects">false</boolProp>
98
            <boolProp name="HTTPSampler.auto_redirects">false</boolProp>
84
            <boolProp name="HTTPSampler.use_keepalive">false</boolProp>
99
            <boolProp name="HTTPSampler.use_keepalive">false</boolProp>
85
            <stringProp name="HTTPSampler.protocol">http</stringProp>
100
            <boolProp name="HTTPSampler.DO_MULTIPART_POST">false</boolProp>
86
            <boolProp name="HTTPSampler.image_parser">false</boolProp>
101
            <elementProp name="HTTPsampler.Files" elementType="HTTPFileArgs" guiclass="HTTPFileArgsPanel" testclass="HTTPFileArgs" enabled="true">
87
            <boolProp name="HTTPSampler.follow_redirects">false</boolProp>
102
              <collectionProp name="HTTPFileArgs.files"/>
88
            <elementProp name="HTTPsampler.Arguments" elementType="Arguments" guiclass="HTTPArgumentsPanel" testclass="Arguments" enabled="true">
89
              <collectionProp name="Arguments.arguments"/>
90
            </elementProp>
103
            </elementProp>
91
            <stringProp name="HTTPSampler.port"></stringProp>
92
            <stringProp name="HTTPSampler.mimetype"></stringProp>
93
            <stringProp name="HTTPSampler.FILE_FIELD"></stringProp>
94
            <stringProp name="HTTPSampler.monitor">false</stringProp>
104
            <stringProp name="HTTPSampler.monitor">false</stringProp>
95
            <stringProp name="HTTPSampler.domain"></stringProp>
105
            <stringProp name="HTTPSampler.embedded_url_re"></stringProp>
96
            <stringProp name="HTTPSampler.FILE_NAME"></stringProp>
97
            <boolProp name="HTTPSampler.auto_redirects">false</boolProp>
98
          </HTTPSampler>
106
          </HTTPSampler>
99
          <hashTree/>
107
          <hashTree/>
100
        </hashTree>
108
        </hashTree>
101
        <ResultCollector guiclass="GraphVisualizer" testclass="ResultCollector" testname="File Reporter" enabled="true">
109
        <ResultCollector guiclass="GraphVisualizer" testclass="ResultCollector" testname="File Reporter" enabled="true">
110
          <boolProp name="ResultCollector.error_logging">false</boolProp>
102
          <objProp>
111
          <objProp>
112
            <name>saveConfig</name>
103
            <value class="SampleSaveConfiguration">
113
            <value class="SampleSaveConfiguration">
104
              <time>true</time>
114
              <time>true</time>
105
              <latency>true</latency>
115
              <latency>true</latency>
Lines 123-132 Link Here
123
              <saveAssertionResultsFailureMessage>false</saveAssertionResultsFailureMessage>
133
              <saveAssertionResultsFailureMessage>false</saveAssertionResultsFailureMessage>
124
              <assertionsResultsToSave>0</assertionsResultsToSave>
134
              <assertionsResultsToSave>0</assertionsResultsToSave>
125
            </value>
135
            </value>
126
            <name>saveConfig</name>
127
          </objProp>
136
          </objProp>
128
          <stringProp name="filename">interleave-test.dat</stringProp>
137
          <stringProp name="filename">interleave-test.dat</stringProp>
129
          <boolProp name="ResultCollector.error_logging">false</boolProp>
130
        </ResultCollector>
138
        </ResultCollector>
131
        <hashTree/>
139
        <hashTree/>
132
      </hashTree>
140
      </hashTree>
(-)bin/testfiles/SimpleTestPlan.jmx (-52 / +62 lines)
Lines 1-5 Link Here
1
<?xml version="1.0" encoding="UTF-8"?>
1
<?xml version="1.0" encoding="UTF-8"?>
2
<jmeterTestPlan version="1.2" properties="1.8">
2
<jmeterTestPlan version="1.2" properties="2.0">
3
  <hashTree>
3
  <hashTree>
4
    <TestPlan guiclass="TestPlanGui" testclass="TestPlan" testname="TestPlan" enabled="true">
4
    <TestPlan guiclass="TestPlanGui" testclass="TestPlan" testname="TestPlan" enabled="true">
5
      <collectionProp name="TestPlan.thread_groups"/>
5
      <collectionProp name="TestPlan.thread_groups"/>
Lines 9-14 Link Here
9
      <boolProp name="TestPlan.serialize_threadgroups">false</boolProp>
9
      <boolProp name="TestPlan.serialize_threadgroups">false</boolProp>
10
      <boolProp name="TestPlan.functional_mode">false</boolProp>
10
      <boolProp name="TestPlan.functional_mode">false</boolProp>
11
      <stringProp name="TestPlan.comments"></stringProp>
11
      <stringProp name="TestPlan.comments"></stringProp>
12
      <stringProp name="TestPlan.user_define_classpath"></stringProp>
12
    </TestPlan>
13
    </TestPlan>
13
    <hashTree>
14
    <hashTree>
14
      <ThreadGroup guiclass="ThreadGroupGui" testclass="ThreadGroup" testname="Jakarta Users" enabled="true">
15
      <ThreadGroup guiclass="ThreadGroupGui" testclass="ThreadGroup" testname="Jakarta Users" enabled="true">
Lines 18-25 Link Here
18
        <stringProp name="ThreadGroup.num_threads">1</stringProp>
19
        <stringProp name="ThreadGroup.num_threads">1</stringProp>
19
        <boolProp name="ThreadGroup.scheduler">false</boolProp>
20
        <boolProp name="ThreadGroup.scheduler">false</boolProp>
20
        <elementProp name="ThreadGroup.main_controller" elementType="LoopController" guiclass="LoopControlPanel" testclass="LoopController" testname="LoopController" enabled="true">
21
        <elementProp name="ThreadGroup.main_controller" elementType="LoopController" guiclass="LoopControlPanel" testclass="LoopController" testname="LoopController" enabled="true">
22
          <boolProp name="LoopController.continue_forever">false</boolProp>
21
          <stringProp name="LoopController.loops">1</stringProp>
23
          <stringProp name="LoopController.loops">1</stringProp>
22
          <boolProp name="LoopController.continue_forever">false</boolProp>
23
        </elementProp>
24
        </elementProp>
24
        <longProp name="ThreadGroup.end_time">0</longProp>
25
        <longProp name="ThreadGroup.end_time">0</longProp>
25
        <stringProp name="ThreadGroup.on_sample_error">continue</stringProp>
26
        <stringProp name="ThreadGroup.on_sample_error">continue</stringProp>
Lines 27-125 Link Here
27
      </ThreadGroup>
28
      </ThreadGroup>
28
      <hashTree>
29
      <hashTree>
29
        <ConfigTestElement guiclass="HttpDefaultsGui" testclass="ConfigTestElement" testname="Defaults" enabled="true">
30
        <ConfigTestElement guiclass="HttpDefaultsGui" testclass="ConfigTestElement" testname="Defaults" enabled="true">
30
          <stringProp name="HTTPSampler.path">/</stringProp>
31
          <stringProp name="HTTPSampler.domain">jakarta.apache.org</stringProp>
32
          <stringProp name="HTTPSampler.protocol"></stringProp>
33
          <stringProp name="HTTPSampler.port"></stringProp>
34
          <elementProp name="HTTPsampler.Arguments" elementType="Arguments" guiclass="HTTPArgumentsPanel" testclass="Arguments" enabled="true">
31
          <elementProp name="HTTPsampler.Arguments" elementType="Arguments" guiclass="HTTPArgumentsPanel" testclass="Arguments" enabled="true">
35
            <collectionProp name="Arguments.arguments"/>
32
            <collectionProp name="Arguments.arguments"/>
36
          </elementProp>
33
          </elementProp>
34
          <stringProp name="HTTPSampler.domain">jakarta.apache.org</stringProp>
35
          <stringProp name="HTTPSampler.port"></stringProp>
36
          <stringProp name="HTTPSampler.protocol"></stringProp>
37
          <stringProp name="HTTPSampler.contentEncoding"></stringProp>
38
          <stringProp name="HTTPSampler.path">/</stringProp>
37
        </ConfigTestElement>
39
        </ConfigTestElement>
38
        <hashTree/>
40
        <hashTree/>
39
        <GenericController guiclass="LogicControllerGui" testclass="GenericController" testname="Ant Pages" enabled="true"/>
41
        <GenericController guiclass="LogicControllerGui" testclass="GenericController" testname="Ant Pages" enabled="true"/>
40
        <hashTree>
42
        <hashTree>
41
          <HTTPSampler guiclass="HttpTestSampleGui" testclass="HTTPSampler" testname="Home Page" enabled="true">
43
          <HTTPSampler guiclass="HttpTestSampleGui" testclass="HTTPSampler" testname="Home Page" enabled="true">
44
            <elementProp name="HTTPsampler.Arguments" elementType="Arguments" guiclass="HTTPArgumentsPanel" testclass="Arguments" enabled="true">
45
              <collectionProp name="Arguments.arguments"/>
46
            </elementProp>
47
            <stringProp name="HTTPSampler.domain"></stringProp>
48
            <stringProp name="HTTPSampler.port"></stringProp>
49
            <stringProp name="HTTPSampler.protocol">http</stringProp>
50
            <stringProp name="HTTPSampler.contentEncoding"></stringProp>
42
            <stringProp name="HTTPSampler.path">/ant/index.html</stringProp>
51
            <stringProp name="HTTPSampler.path">/ant/index.html</stringProp>
43
            <stringProp name="HTTPSampler.method">GET</stringProp>
52
            <stringProp name="HTTPSampler.method">GET</stringProp>
53
            <boolProp name="HTTPSampler.follow_redirects">false</boolProp>
54
            <boolProp name="HTTPSampler.auto_redirects">false</boolProp>
44
            <boolProp name="HTTPSampler.use_keepalive">false</boolProp>
55
            <boolProp name="HTTPSampler.use_keepalive">false</boolProp>
45
            <stringProp name="HTTPSampler.protocol">http</stringProp>
56
            <boolProp name="HTTPSampler.DO_MULTIPART_POST">false</boolProp>
46
            <boolProp name="HTTPSampler.image_parser">false</boolProp>
57
            <elementProp name="HTTPsampler.Files" elementType="HTTPFileArgs" guiclass="HTTPFileArgsPanel" testclass="HTTPFileArgs" enabled="true">
47
            <boolProp name="HTTPSampler.follow_redirects">false</boolProp>
58
              <collectionProp name="HTTPFileArgs.files"/>
48
            <elementProp name="HTTPsampler.Arguments" elementType="Arguments" guiclass="HTTPArgumentsPanel" testclass="Arguments" enabled="true">
49
              <collectionProp name="Arguments.arguments"/>
50
            </elementProp>
59
            </elementProp>
51
            <stringProp name="HTTPSampler.port"></stringProp>
52
            <stringProp name="HTTPSampler.mimetype"></stringProp>
53
            <stringProp name="HTTPSampler.FILE_FIELD"></stringProp>
54
            <stringProp name="HTTPSampler.monitor">false</stringProp>
60
            <stringProp name="HTTPSampler.monitor">false</stringProp>
55
            <stringProp name="HTTPSampler.domain"></stringProp>
61
            <stringProp name="HTTPSampler.embedded_url_re"></stringProp>
56
            <stringProp name="HTTPSampler.FILE_NAME"></stringProp>
57
            <boolProp name="HTTPSampler.auto_redirects">false</boolProp>
58
          </HTTPSampler>
62
          </HTTPSampler>
59
          <hashTree/>
63
          <hashTree/>
60
          <HTTPSampler guiclass="HttpTestSampleGui" testclass="HTTPSampler" testname="News Page" enabled="true">
64
          <HTTPSampler guiclass="HttpTestSampleGui" testclass="HTTPSampler" testname="News Page" enabled="true">
65
            <elementProp name="HTTPsampler.Arguments" elementType="Arguments" guiclass="HTTPArgumentsPanel" testclass="Arguments" enabled="true">
66
              <collectionProp name="Arguments.arguments"/>
67
            </elementProp>
68
            <stringProp name="HTTPSampler.domain"></stringProp>
69
            <stringProp name="HTTPSampler.port"></stringProp>
70
            <stringProp name="HTTPSampler.protocol">http</stringProp>
71
            <stringProp name="HTTPSampler.contentEncoding"></stringProp>
61
            <stringProp name="HTTPSampler.path">/ant/antnews.html</stringProp>
72
            <stringProp name="HTTPSampler.path">/ant/antnews.html</stringProp>
62
            <stringProp name="HTTPSampler.method">GET</stringProp>
73
            <stringProp name="HTTPSampler.method">GET</stringProp>
74
            <boolProp name="HTTPSampler.follow_redirects">false</boolProp>
75
            <boolProp name="HTTPSampler.auto_redirects">false</boolProp>
63
            <boolProp name="HTTPSampler.use_keepalive">false</boolProp>
76
            <boolProp name="HTTPSampler.use_keepalive">false</boolProp>
64
            <stringProp name="HTTPSampler.protocol">http</stringProp>
77
            <boolProp name="HTTPSampler.DO_MULTIPART_POST">false</boolProp>
65
            <boolProp name="HTTPSampler.image_parser">false</boolProp>
78
            <elementProp name="HTTPsampler.Files" elementType="HTTPFileArgs" guiclass="HTTPFileArgsPanel" testclass="HTTPFileArgs" enabled="true">
66
            <boolProp name="HTTPSampler.follow_redirects">false</boolProp>
79
              <collectionProp name="HTTPFileArgs.files"/>
67
            <elementProp name="HTTPsampler.Arguments" elementType="Arguments" guiclass="HTTPArgumentsPanel" testclass="Arguments" enabled="true">
68
              <collectionProp name="Arguments.arguments"/>
69
            </elementProp>
80
            </elementProp>
70
            <stringProp name="HTTPSampler.port"></stringProp>
71
            <stringProp name="HTTPSampler.mimetype"></stringProp>
72
            <stringProp name="HTTPSampler.FILE_FIELD"></stringProp>
73
            <stringProp name="HTTPSampler.monitor">false</stringProp>
81
            <stringProp name="HTTPSampler.monitor">false</stringProp>
74
            <stringProp name="HTTPSampler.domain"></stringProp>
82
            <stringProp name="HTTPSampler.embedded_url_re"></stringProp>
75
            <stringProp name="HTTPSampler.FILE_NAME"></stringProp>
76
            <boolProp name="HTTPSampler.auto_redirects">false</boolProp>
77
          </HTTPSampler>
83
          </HTTPSampler>
78
          <hashTree/>
84
          <hashTree/>
79
        </hashTree>
85
        </hashTree>
80
        <GenericController guiclass="LogicControllerGui" testclass="GenericController" testname="Log4J Pages" enabled="true"/>
86
        <GenericController guiclass="LogicControllerGui" testclass="GenericController" testname="Log4J Pages" enabled="true"/>
81
        <hashTree>
87
        <hashTree>
82
          <HTTPSampler guiclass="HttpTestSampleGui" testclass="HTTPSampler" testname="Home Page" enabled="true">
88
          <HTTPSampler guiclass="HttpTestSampleGui" testclass="HTTPSampler" testname="Home Page" enabled="true">
89
            <elementProp name="HTTPsampler.Arguments" elementType="Arguments" guiclass="HTTPArgumentsPanel" testclass="Arguments" enabled="true">
90
              <collectionProp name="Arguments.arguments"/>
91
            </elementProp>
92
            <stringProp name="HTTPSampler.domain"></stringProp>
93
            <stringProp name="HTTPSampler.port"></stringProp>
94
            <stringProp name="HTTPSampler.protocol">http</stringProp>
95
            <stringProp name="HTTPSampler.contentEncoding"></stringProp>
83
            <stringProp name="HTTPSampler.path">/log4j/index.html</stringProp>
96
            <stringProp name="HTTPSampler.path">/log4j/index.html</stringProp>
84
            <stringProp name="HTTPSampler.method">GET</stringProp>
97
            <stringProp name="HTTPSampler.method">GET</stringProp>
98
            <boolProp name="HTTPSampler.follow_redirects">false</boolProp>
99
            <boolProp name="HTTPSampler.auto_redirects">false</boolProp>
85
            <boolProp name="HTTPSampler.use_keepalive">false</boolProp>
100
            <boolProp name="HTTPSampler.use_keepalive">false</boolProp>
86
            <stringProp name="HTTPSampler.protocol">http</stringProp>
101
            <boolProp name="HTTPSampler.DO_MULTIPART_POST">false</boolProp>
87
            <boolProp name="HTTPSampler.image_parser">false</boolProp>
102
            <elementProp name="HTTPsampler.Files" elementType="HTTPFileArgs" guiclass="HTTPFileArgsPanel" testclass="HTTPFileArgs" enabled="true">
88
            <boolProp name="HTTPSampler.follow_redirects">false</boolProp>
103
              <collectionProp name="HTTPFileArgs.files"/>
89
            <elementProp name="HTTPsampler.Arguments" elementType="Arguments" guiclass="HTTPArgumentsPanel" testclass="Arguments" enabled="true">
90
              <collectionProp name="Arguments.arguments"/>
91
            </elementProp>
104
            </elementProp>
92
            <stringProp name="HTTPSampler.port"></stringProp>
93
            <stringProp name="HTTPSampler.mimetype"></stringProp>
94
            <stringProp name="HTTPSampler.FILE_FIELD"></stringProp>
95
            <stringProp name="HTTPSampler.monitor">false</stringProp>
105
            <stringProp name="HTTPSampler.monitor">false</stringProp>
96
            <stringProp name="HTTPSampler.domain"></stringProp>
106
            <stringProp name="HTTPSampler.embedded_url_re"></stringProp>
97
            <stringProp name="HTTPSampler.FILE_NAME"></stringProp>
98
            <boolProp name="HTTPSampler.auto_redirects">false</boolProp>
99
          </HTTPSampler>
107
          </HTTPSampler>
100
          <hashTree/>
108
          <hashTree/>
101
          <HTTPSampler guiclass="HttpTestSampleGui" testclass="HTTPSampler" testname="History Page" enabled="true">
109
          <HTTPSampler guiclass="HttpTestSampleGui" testclass="HTTPSampler" testname="History Page" enabled="true">
110
            <elementProp name="HTTPsampler.Arguments" elementType="Arguments" guiclass="HTTPArgumentsPanel" testclass="Arguments" enabled="true">
111
              <collectionProp name="Arguments.arguments"/>
112
            </elementProp>
113
            <stringProp name="HTTPSampler.domain"></stringProp>
114
            <stringProp name="HTTPSampler.port"></stringProp>
115
            <stringProp name="HTTPSampler.protocol">http</stringProp>
116
            <stringProp name="HTTPSampler.contentEncoding"></stringProp>
102
            <stringProp name="HTTPSampler.path">/log4j/docs/history.html</stringProp>
117
            <stringProp name="HTTPSampler.path">/log4j/docs/history.html</stringProp>
103
            <stringProp name="HTTPSampler.method">GET</stringProp>
118
            <stringProp name="HTTPSampler.method">GET</stringProp>
119
            <boolProp name="HTTPSampler.follow_redirects">false</boolProp>
120
            <boolProp name="HTTPSampler.auto_redirects">false</boolProp>
104
            <boolProp name="HTTPSampler.use_keepalive">false</boolProp>
121
            <boolProp name="HTTPSampler.use_keepalive">false</boolProp>
105
            <stringProp name="HTTPSampler.protocol">http</stringProp>
122
            <boolProp name="HTTPSampler.DO_MULTIPART_POST">false</boolProp>
106
            <boolProp name="HTTPSampler.image_parser">false</boolProp>
123
            <elementProp name="HTTPsampler.Files" elementType="HTTPFileArgs" guiclass="HTTPFileArgsPanel" testclass="HTTPFileArgs" enabled="true">
107
            <boolProp name="HTTPSampler.follow_redirects">false</boolProp>
124
              <collectionProp name="HTTPFileArgs.files"/>
108
            <elementProp name="HTTPsampler.Arguments" elementType="Arguments" guiclass="HTTPArgumentsPanel" testclass="Arguments" enabled="true">
109
              <collectionProp name="Arguments.arguments"/>
110
            </elementProp>
125
            </elementProp>
111
            <stringProp name="HTTPSampler.port"></stringProp>
112
            <stringProp name="HTTPSampler.mimetype"></stringProp>
113
            <stringProp name="HTTPSampler.FILE_FIELD"></stringProp>
114
            <stringProp name="HTTPSampler.monitor">false</stringProp>
126
            <stringProp name="HTTPSampler.monitor">false</stringProp>
115
            <stringProp name="HTTPSampler.domain"></stringProp>
127
            <stringProp name="HTTPSampler.embedded_url_re"></stringProp>
116
            <stringProp name="HTTPSampler.FILE_NAME"></stringProp>
117
            <boolProp name="HTTPSampler.auto_redirects">false</boolProp>
118
          </HTTPSampler>
128
          </HTTPSampler>
119
          <hashTree/>
129
          <hashTree/>
120
        </hashTree>
130
        </hashTree>
121
        <ResultCollector guiclass="GraphVisualizer" testclass="ResultCollector" testname="File Reporter" enabled="true">
131
        <ResultCollector guiclass="GraphVisualizer" testclass="ResultCollector" testname="File Reporter" enabled="true">
132
          <boolProp name="ResultCollector.error_logging">false</boolProp>
122
          <objProp>
133
          <objProp>
134
            <name>saveConfig</name>
123
            <value class="SampleSaveConfiguration">
135
            <value class="SampleSaveConfiguration">
124
              <time>true</time>
136
              <time>true</time>
125
              <latency>true</latency>
137
              <latency>true</latency>
Lines 143-152 Link Here
143
              <saveAssertionResultsFailureMessage>false</saveAssertionResultsFailureMessage>
155
              <saveAssertionResultsFailureMessage>false</saveAssertionResultsFailureMessage>
144
              <assertionsResultsToSave>0</assertionsResultsToSave>
156
              <assertionsResultsToSave>0</assertionsResultsToSave>
145
            </value>
157
            </value>
146
            <name>saveConfig</name>
147
          </objProp>
158
          </objProp>
148
          <stringProp name="filename">simple-test.dat</stringProp>
159
          <stringProp name="filename">simple-test.dat</stringProp>
149
          <boolProp name="ResultCollector.error_logging">false</boolProp>
150
        </ResultCollector>
160
        </ResultCollector>
151
        <hashTree/>
161
        <hashTree/>
152
      </hashTree>
162
      </hashTree>
(-)bin/saveservice.properties (+3 lines)
Lines 113-118 Link Here
113
HTMLReportWriterGui=org.apache.jmeter.report.writers.gui.HTMLReportWriterGui
113
HTMLReportWriterGui=org.apache.jmeter.report.writers.gui.HTMLReportWriterGui
114
HTTPArgument=org.apache.jmeter.protocol.http.util.HTTPArgument
114
HTTPArgument=org.apache.jmeter.protocol.http.util.HTTPArgument
115
HTTPArgumentsPanel=org.apache.jmeter.protocol.http.gui.HTTPArgumentsPanel
115
HTTPArgumentsPanel=org.apache.jmeter.protocol.http.gui.HTTPArgumentsPanel
116
HTTPFileArg=org.apache.jmeter.protocol.http.util.HTTPFileArg
117
HTTPFileArgs=org.apache.jmeter.protocol.http.util.HTTPFileArgs
118
HTTPFileArgsPanel=org.apache.jmeter.protocol.http.gui.HTTPFileArgsPanel
116
HttpDefaultsGui=org.apache.jmeter.protocol.http.config.gui.HttpDefaultsGui
119
HttpDefaultsGui=org.apache.jmeter.protocol.http.config.gui.HttpDefaultsGui
117
HttpGenericSampler=org.apache.jmeter.protocol.http.sampler.HttpGenericSampler
120
HttpGenericSampler=org.apache.jmeter.protocol.http.sampler.HttpGenericSampler
118
HttpGenericSamplerGui=org.apache.jmeter.protocol.http.control.gui.HttpGenericSamplerGui
121
HttpGenericSamplerGui=org.apache.jmeter.protocol.http.control.gui.HttpGenericSamplerGui

Return to bug 19128