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

(-)a/src/core/org/apache/jmeter/resources/messages.properties (+3 lines)
Lines 777-787 Link Here
777
proxy_general_lifecycle=State
777
proxy_general_lifecycle=State
778
proxy_general_settings=Global Settings
778
proxy_general_settings=Global Settings
779
proxy_headers=Capture HTTP Headers
779
proxy_headers=Capture HTTP Headers
780
proxy_pause_http_sampler=Pause between HTTP requests (ms)\:
780
proxy_prefix_http_sampler_name=Prefix\:
781
proxy_prefix_http_sampler_name=Prefix\:
781
proxy_regex=Regex matching
782
proxy_regex=Regex matching
782
proxy_sampler_settings=HTTP Sampler settings
783
proxy_sampler_settings=HTTP Sampler settings
783
proxy_sampler_type=Type\:
784
proxy_sampler_type=Type\:
784
proxy_separators=Add Separators
785
proxy_separators=Add Separators
786
proxy_settings_pause_error_digits=Only digits allowed
787
proxy_settings_pause_error_invalid_data=Invalid data
785
proxy_settings_port_error_digits=Only digits allowed
788
proxy_settings_port_error_digits=Only digits allowed
786
proxy_settings_port_error_invalid_data=Invalid data
789
proxy_settings_port_error_invalid_data=Invalid data
787
proxy_target=Target Controller\:
790
proxy_target=Target Controller\:
(-)a/src/core/org/apache/jmeter/resources/messages_fr.properties (+3 lines)
Lines 767-777 Link Here
767
proxy_general_lifecycle=Etat
767
proxy_general_lifecycle=Etat
768
proxy_general_settings=Param\u00E8tres g\u00E9n\u00E9raux
768
proxy_general_settings=Param\u00E8tres g\u00E9n\u00E9raux
769
proxy_headers=Capturer les ent\u00EAtes HTTP
769
proxy_headers=Capturer les ent\u00EAtes HTTP
770
proxy_pause_http_sampler=Pause entre chaque requ\u00EAte HTTP (ms) \:
770
proxy_prefix_http_sampler_name=Pr\u00E9fixe \:
771
proxy_prefix_http_sampler_name=Pr\u00E9fixe \:
771
proxy_regex=Correspondance des variables par regex ?
772
proxy_regex=Correspondance des variables par regex ?
772
proxy_sampler_settings=Param\u00E8tres Echantillon HTTP
773
proxy_sampler_settings=Param\u00E8tres Echantillon HTTP
773
proxy_sampler_type=Type \:
774
proxy_sampler_type=Type \:
774
proxy_separators=Ajouter des s\u00E9parateurs
775
proxy_separators=Ajouter des s\u00E9parateurs
776
proxy_settings_pause_error_digits=Seuls les chiffres sont autoris\u00E9s.
777
proxy_settings_pause_error_invalid_data=Donn\u00E9es invalides
775
proxy_settings_port_error_digits=Seuls les chiffres sont autoris\u00E9s.
778
proxy_settings_port_error_digits=Seuls les chiffres sont autoris\u00E9s.
776
proxy_settings_port_error_invalid_data=Donn\u00E9es invalides
779
proxy_settings_port_error_invalid_data=Donn\u00E9es invalides
777
proxy_target=Contr\u00F4leur Cible \:
780
proxy_target=Contr\u00F4leur Cible \:
(-)a/src/protocol/http/org/apache/jmeter/protocol/http/proxy/ProxyControl.java (-2 / +16 lines)
Lines 158-163 Link Here
158
    private static final String SAMPLER_DOWNLOAD_IMAGES = "ProxyControlGui.sampler_download_images"; // $NON-NLS-1$
158
    private static final String SAMPLER_DOWNLOAD_IMAGES = "ProxyControlGui.sampler_download_images"; // $NON-NLS-1$
159
    
159
    
160
    private static final String PREFIX_HTTP_SAMPLER_NAME = "ProxyControlGui.proxy_prefix_http_sampler_name"; // $NON-NLS-1$
160
    private static final String PREFIX_HTTP_SAMPLER_NAME = "ProxyControlGui.proxy_prefix_http_sampler_name"; // $NON-NLS-1$
161
    
162
    private static final String PROXY_PAUSE_HTTP_SAMPLER = "ProxyControlGui.proxy_pause_http_sampler"; // $NON-NLS-1$
161
163
162
    private static final String REGEX_MATCH = "ProxyControlGui.regex_match"; // $NON-NLS-1$
164
    private static final String REGEX_MATCH = "ProxyControlGui.regex_match"; // $NON-NLS-1$
163
165
Lines 185-192 Link Here
185
    private static final String SAMPLER_TYPE_HTTP_SAMPLER_HC3_1 = "1";
187
    private static final String SAMPLER_TYPE_HTTP_SAMPLER_HC3_1 = "1";
186
    private static final String SAMPLER_TYPE_HTTP_SAMPLER_HC4 = "2";
188
    private static final String SAMPLER_TYPE_HTTP_SAMPLER_HC4 = "2";
187
189
188
    private static final long SAMPLE_GAP =
190
    private static long SAMPLE_GAP; // $NON-NLS-1$
189
        JMeterUtils.getPropDefault("proxy.pause", 5000); // $NON-NLS-1$
190
    // Detect if user has pressed a new link
191
    // Detect if user has pressed a new link
191
192
192
    // for ssl connection
193
    // for ssl connection
Lines 392-397 Link Here
392
    public void setPrefixHTTPSampleName(String prefixHTTPSampleName) {
393
    public void setPrefixHTTPSampleName(String prefixHTTPSampleName) {
393
        setProperty(PREFIX_HTTP_SAMPLER_NAME, prefixHTTPSampleName);
394
        setProperty(PREFIX_HTTP_SAMPLER_NAME, prefixHTTPSampleName);
394
    }
395
    }
396
    
397
    public void setProxyPauseHTTPSample(String proxyPauseHTTPSample) {
398
    setProperty(PROXY_PAUSE_HTTP_SAMPLER, proxyPauseHTTPSample);
399
    }
395
400
396
    public void setNotifyChildSamplerListenerOfFilteredSamplers(boolean b) {
401
    public void setNotifyChildSamplerListenerOfFilteredSamplers(boolean b) {
397
        notifyChildSamplerListenersOfFilteredSamples = b;
402
        notifyChildSamplerListenersOfFilteredSamples = b;
Lines 478-483 Link Here
478
    public String getPrefixHTTPSampleName() {
483
    public String getPrefixHTTPSampleName() {
479
        return getPropertyAsString(PREFIX_HTTP_SAMPLER_NAME);
484
        return getPropertyAsString(PREFIX_HTTP_SAMPLER_NAME);
480
    }
485
    }
486
    
487
    public String getProxyPauseHTTPSample() {
488
        return getPropertyAsString(PROXY_PAUSE_HTTP_SAMPLER);
489
        }
481
490
482
    public boolean getNotifyChildSamplerListenerOfFilteredSamplers() {
491
    public boolean getNotifyChildSamplerListenerOfFilteredSamplers() {
483
        return getPropertyAsBoolean(NOTIFY_CHILD_SAMPLER_LISTENERS_FILTERED, true);
492
        return getPropertyAsBoolean(NOTIFY_CHILD_SAMPLER_LISTENERS_FILTERED, true);
Lines 519-524 Link Here
519
        notifyTestListenersOfStart();
528
        notifyTestListenersOfStart();
520
        try {
529
        try {
521
            server = new Daemon(getPort(), this);
530
            server = new Daemon(getPort(), this);
531
            if (getProxyPauseHTTPSample().isEmpty()) {
532
                SAMPLE_GAP = JMeterUtils.getPropDefault("proxy.pause", 5000);
533
                } else {
534
                    SAMPLE_GAP = Long.parseLong(getProxyPauseHTTPSample().trim());
535
                }
522
            server.start();
536
            server.start();
523
            if (GuiPackage.getInstance() != null) {
537
            if (GuiPackage.getInstance() != null) {
524
                GuiPackage.getInstance().register(server);
538
                GuiPackage.getInstance().register(server);
(-)a/src/protocol/http/org/apache/jmeter/protocol/http/proxy/gui/ProxyControlGui.java (-1 / +37 lines)
Lines 160-165 Link Here
160
     * Add a prefix to HTTP sample name recorded
160
     * Add a prefix to HTTP sample name recorded
161
     */
161
     */
162
    private JTextField prefixHTTPSampleName;
162
    private JTextField prefixHTTPSampleName;
163
    
164
    /*
165
     * Delay between HTTP requests
166
     */
167
    private JTextField proxyPauseHTTPSample;
163
168
164
    /**
169
    /**
165
     * Regular expression to include results based on content type
170
     * Regular expression to include results based on content type
Lines 224-229 Link Here
224
    private static final String ADD_SUGGESTED_EXCLUDES = "exclude_suggested";
229
    private static final String ADD_SUGGESTED_EXCLUDES = "exclude_suggested";
225
230
226
    private static final String PREFIX_HTTP_SAMPLER_NAME = "proxy_prefix_http_sampler_name"; // $NON-NLS-1$
231
    private static final String PREFIX_HTTP_SAMPLER_NAME = "proxy_prefix_http_sampler_name"; // $NON-NLS-1$
232
    
233
    private static final String PROXY_PAUSE_HTTP_SAMPLER = "proxy_pause_http_sampler"; // $NON-NLS-1$
227
    //- action names
234
    //- action names
228
235
229
    // Resource names for column headers
236
    // Resource names for column headers
Lines 279-284 Link Here
279
            model.setUseKeepAlive(useKeepAlive.isSelected());
286
            model.setUseKeepAlive(useKeepAlive.isSelected());
280
            model.setSamplerDownloadImages(samplerDownloadImages.isSelected());
287
            model.setSamplerDownloadImages(samplerDownloadImages.isSelected());
281
            model.setPrefixHTTPSampleName(prefixHTTPSampleName.getText());
288
            model.setPrefixHTTPSampleName(prefixHTTPSampleName.getText());
289
            model.setProxyPauseHTTPSample(proxyPauseHTTPSample.getText());
282
            model.setNotifyChildSamplerListenerOfFilteredSamplers(notifyChildSamplerListenerOfFilteredSamplersCB.isSelected());
290
            model.setNotifyChildSamplerListenerOfFilteredSamplers(notifyChildSamplerListenerOfFilteredSamplersCB.isSelected());
283
            model.setRegexMatch(regexMatch.isSelected());
291
            model.setRegexMatch(regexMatch.isSelected());
284
            model.setContentTypeInclude(contentTypeInclude.getText());
292
            model.setContentTypeInclude(contentTypeInclude.getText());
Lines 631-636 Link Here
631
            enableRestart();
639
            enableRestart();
632
        } else if(fieldName.equals(PREFIX_HTTP_SAMPLER_NAME)) {
640
        } else if(fieldName.equals(PREFIX_HTTP_SAMPLER_NAME)) {
633
            model.setPrefixHTTPSampleName(prefixHTTPSampleName.getText());
641
            model.setPrefixHTTPSampleName(prefixHTTPSampleName.getText());
642
        } else if(fieldName.equals(PROXY_PAUSE_HTTP_SAMPLER)) {
643
            try {
644
                Integer.parseInt(proxyPauseHTTPSample.getText());
645
                } catch (NumberFormatException nfe) {
646
                    int length = proxyPauseHTTPSample.getText().length();
647
                    if (length > 0) {
648
                        JOptionPane.showMessageDialog(this, 
649
                                JMeterUtils.getResString("proxy_settings_pause_error_digits"), // $NON-NLS-1$
650
                                JMeterUtils.getResString("proxy_settings_pause_error_invalid_data"), // $NON-NLS-1$
651
                                JOptionPane.WARNING_MESSAGE);
652
                        // Drop the last character:
653
                        proxyPauseHTTPSample.setText(proxyPauseHTTPSample.getText().substring(0, length-1));
654
                        }
655
                    }
656
            enableRestart();
634
        }
657
        }
635
    }
658
    }
636
659
Lines 817-826 Link Here
817
        prefixHTTPSampleName = new JTextField(4);
840
        prefixHTTPSampleName = new JTextField(4);
818
        prefixHTTPSampleName.addKeyListener(this);
841
        prefixHTTPSampleName.addKeyListener(this);
819
        prefixHTTPSampleName.setName(PREFIX_HTTP_SAMPLER_NAME);
842
        prefixHTTPSampleName.setName(PREFIX_HTTP_SAMPLER_NAME);
820
        // TODO Not sure this is needed
821
        prefixHTTPSampleName.setActionCommand(ENABLE_RESTART);
843
        prefixHTTPSampleName.setActionCommand(ENABLE_RESTART);
822
        JLabel labelPrefix = new JLabel(JMeterUtils.getResString("proxy_prefix_http_sampler_name")); // $NON-NLS-1$
844
        JLabel labelPrefix = new JLabel(JMeterUtils.getResString("proxy_prefix_http_sampler_name")); // $NON-NLS-1$
823
        labelPrefix.setLabelFor(prefixHTTPSampleName);
845
        labelPrefix.setLabelFor(prefixHTTPSampleName);
846
847
        proxyPauseHTTPSample = new JTextField(6);
848
        proxyPauseHTTPSample.addKeyListener(this);
849
        proxyPauseHTTPSample.setName(PROXY_PAUSE_HTTP_SAMPLER);
850
        proxyPauseHTTPSample.setActionCommand(ENABLE_RESTART);
851
        JLabel labelProxyPause= new JLabel(JMeterUtils.getResString("proxy_pause_http_sampler")); // $NON-NLS-1$
852
        labelProxyPause.setLabelFor(proxyPauseHTTPSample);
824
853
825
        JLabel labelSamplerType = new JLabel(JMeterUtils.getResString("proxy_sampler_type")); // $NON-NLS-1$
854
        JLabel labelSamplerType = new JLabel(JMeterUtils.getResString("proxy_sampler_type")); // $NON-NLS-1$
826
        labelSamplerType.setLabelFor(samplerTypeName);
855
        labelSamplerType.setLabelFor(samplerTypeName);
Lines 843-848 Link Here
843
        gbc.weightx = 3;
872
        gbc.weightx = 3;
844
        gbc.fill=GridBagConstraints.HORIZONTAL;
873
        gbc.fill=GridBagConstraints.HORIZONTAL;
845
        panel.add(prefixHTTPSampleName, gbc.clone());
874
        panel.add(prefixHTTPSampleName, gbc.clone());
875
        gbc.gridx = 0;
876
        gbc.gridy++;
877
        panel.add(labelProxyPause, gbc.clone());
878
        gbc.gridx++;
879
        gbc.weightx = 3;
880
        gbc.fill=GridBagConstraints.HORIZONTAL;
881
        panel.add(proxyPauseHTTPSample, gbc.clone());
846
        gbc.weightx = 1;
882
        gbc.weightx = 1;
847
        gbc.gridx = 0;
883
        gbc.gridx = 0;
848
        gbc.gridy++;
884
        gbc.gridy++;
(-)a/xdocs/changes.xml (+1 lines)
Lines 97-102 Link Here
97
<ul>
97
<ul>
98
    <li><bug>61056</bug>HTTP : Support brotli decoding</li>
98
    <li><bug>61056</bug>HTTP : Support brotli decoding</li>
99
    <li><bug>61135</bug>CookieManager : Drop Implementation select box and cleanup class</li>
99
    <li><bug>61135</bug>CookieManager : Drop Implementation select box and cleanup class</li>
100
    <li><bug>61492</bug>HTTP(S) Test Script Recorder : Add the possibility to change the value of proxy.pause in the GUI</li>
100
</ul>
101
</ul>
101
102
102
<h3>Other samplers</h3>
103
<h3>Other samplers</h3>

Return to bug 61492