jmeter-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ago...@apache.org
Subject svn commit: r1814992 - in /jmeter/trunk: docs/images/screenshots/ src/protocol/http/org/apache/jmeter/protocol/http/proxy/ src/protocol/http/org/apache/jmeter/protocol/http/proxy/gui/
Date Sat, 11 Nov 2017 22:21:09 GMT
Author: agomes
Date: Sat Nov 11 22:21:09 2017
New Revision: 1814992

URL: http://svn.apache.org/viewvc?rev=1814992&view=rev
Log:
Bug 61672 - add tht choice between prefix and transaction name to name sampler during recording
: Philippe catch

Modified:
    jmeter/trunk/docs/images/screenshots/proxy_control.png
    jmeter/trunk/src/protocol/http/org/apache/jmeter/protocol/http/proxy/DefaultSamplerCreator.java
    jmeter/trunk/src/protocol/http/org/apache/jmeter/protocol/http/proxy/ProxyControl.java
    jmeter/trunk/src/protocol/http/org/apache/jmeter/protocol/http/proxy/gui/ProxyControlGui.java

Modified: jmeter/trunk/docs/images/screenshots/proxy_control.png
URL: http://svn.apache.org/viewvc/jmeter/trunk/docs/images/screenshots/proxy_control.png?rev=1814992&r1=1814991&r2=1814992&view=diff
==============================================================================
Binary files - no diff available.

Modified: jmeter/trunk/src/protocol/http/org/apache/jmeter/protocol/http/proxy/DefaultSamplerCreator.java
URL: http://svn.apache.org/viewvc/jmeter/trunk/src/protocol/http/org/apache/jmeter/protocol/http/proxy/DefaultSamplerCreator.java?rev=1814992&r1=1814991&r2=1814992&view=diff
==============================================================================
--- jmeter/trunk/src/protocol/http/org/apache/jmeter/protocol/http/proxy/DefaultSamplerCreator.java
(original)
+++ jmeter/trunk/src/protocol/http/org/apache/jmeter/protocol/http/proxy/DefaultSamplerCreator.java
Sat Nov 11 22:21:09 2017
@@ -281,12 +281,12 @@ public class DefaultSamplerCreator exten
     protected void computeSamplerName(HTTPSamplerBase sampler,
             HttpRequestHdr request) {
         String prefix = request.getPrefix();
-        int HttpSampleNameMode = request.getHttpSampleNameMode();
+        int httpSampleNameMode = request.getHttpSampleNameMode();
         if (!HTTPConstants.CONNECT.equals(request.getMethod()) && isNumberRequests())
{
             if(!StringUtils.isEmpty(prefix)) {
-                if (HttpSampleNameMode==SAMPLER_NAME_NAMING_MODE_PREFIX) {
+                if (httpSampleNameMode==SAMPLER_NAME_NAMING_MODE_PREFIX) {
                 sampler.setName(prefix + incrementRequestNumberAndGet() + " " + sampler.getPath());
-                } else if (HttpSampleNameMode==SAMPLER_NAME_NAMING_MODE_COMPLETE) {
+                } else if (httpSampleNameMode==SAMPLER_NAME_NAMING_MODE_COMPLETE) {
                     sampler.setName(incrementRequestNumberAndGet() + " " + prefix);
                 } else {
                     log.debug("Sampler name naming mode not recognized");
@@ -296,9 +296,9 @@ public class DefaultSamplerCreator exten
             }
         } else {
             if(!StringUtils.isEmpty(prefix)) {
-                if (HttpSampleNameMode==SAMPLER_NAME_NAMING_MODE_PREFIX) {
+                if (httpSampleNameMode==SAMPLER_NAME_NAMING_MODE_PREFIX) {
                     sampler.setName(prefix+sampler.getPath());
-                } else if (HttpSampleNameMode==SAMPLER_NAME_NAMING_MODE_COMPLETE) {
+                } else if (httpSampleNameMode==SAMPLER_NAME_NAMING_MODE_COMPLETE) {
                     sampler.setName(prefix);
                 } else {
                     log.debug("Sampler name naming mode not recognized");

Modified: jmeter/trunk/src/protocol/http/org/apache/jmeter/protocol/http/proxy/ProxyControl.java
URL: http://svn.apache.org/viewvc/jmeter/trunk/src/protocol/http/org/apache/jmeter/protocol/http/proxy/ProxyControl.java?rev=1814992&r1=1814991&r2=1814992&view=diff
==============================================================================
--- jmeter/trunk/src/protocol/http/org/apache/jmeter/protocol/http/proxy/ProxyControl.java
(original)
+++ jmeter/trunk/src/protocol/http/org/apache/jmeter/protocol/http/proxy/ProxyControl.java
Sat Nov 11 22:21:09 2017
@@ -392,8 +392,8 @@ public class ProxyControl extends Generi
         setProperty(new BooleanProperty(SAMPLER_DOWNLOAD_IMAGES, b));
     }
 
-    public void setHTTPSampleNamingMode(int HTTPNamingMode) {
-        setProperty(new IntegerProperty(HTTP_SAMPLER_NAMING_MODE, HTTPNamingMode));
+    public void setHTTPSampleNamingMode(int httpNamingMode) {
+        setProperty(new IntegerProperty(HTTP_SAMPLER_NAMING_MODE, httpNamingMode));
     }
     
     public void setPrefixHTTPSampleName(String prefixHTTPSampleName) {

Modified: jmeter/trunk/src/protocol/http/org/apache/jmeter/protocol/http/proxy/gui/ProxyControlGui.java
URL: http://svn.apache.org/viewvc/jmeter/trunk/src/protocol/http/org/apache/jmeter/protocol/http/proxy/gui/ProxyControlGui.java?rev=1814992&r1=1814991&r2=1814992&view=diff
==============================================================================
--- jmeter/trunk/src/protocol/http/org/apache/jmeter/protocol/http/proxy/gui/ProxyControlGui.java
(original)
+++ jmeter/trunk/src/protocol/http/org/apache/jmeter/protocol/http/proxy/gui/ProxyControlGui.java
Sat Nov 11 22:21:09 2017
@@ -159,7 +159,7 @@ public class ProxyControlGui extends Log
     /**
      * To choose between a prefix or a transaction name
      */
-    private JComboBox<String> HTTPSampleNamingMode;
+    private JComboBox<String> httpSampleNamingMode;
     
     /**
      * Add a prefix/transaction name to HTTP sample name recorded
@@ -291,7 +291,7 @@ public class ProxyControlGui extends Log
             model.setSamplerFollowRedirects(samplerFollowRedirects.isSelected());
             model.setUseKeepAlive(useKeepAlive.isSelected());
             model.setSamplerDownloadImages(samplerDownloadImages.isSelected());
-            model.setHTTPSampleNamingMode(HTTPSampleNamingMode.getSelectedIndex());
+            model.setHTTPSampleNamingMode(httpSampleNamingMode.getSelectedIndex());
             model.setPrefixHTTPSampleName(prefixHTTPSampleName.getText());
             model.setProxyPauseHTTPSample(proxyPauseHTTPSample.getText());
             model.setNotifyChildSamplerListenerOfFilteredSamplers(notifyChildSamplerListenerOfFilteredSamplersCB.isSelected());
@@ -354,7 +354,7 @@ public class ProxyControlGui extends Log
         samplerFollowRedirects.setSelected(model.getSamplerFollowRedirects());
         useKeepAlive.setSelected(model.getUseKeepalive());
         samplerDownloadImages.setSelected(model.getSamplerDownloadImages());
-        HTTPSampleNamingMode.setSelectedIndex(model.getHTTPSampleNamingMode());
+        httpSampleNamingMode.setSelectedIndex(model.getHTTPSampleNamingMode());
         prefixHTTPSampleName.setText(model.getPrefixHTTPSampleName());
         proxyPauseHTTPSample.setText(model.getProxyPauseHTTPSample());
         notifyChildSamplerListenerOfFilteredSamplersCB.setSelected(model.getNotifyChildSamplerListenerOfFilteredSamplers());
@@ -389,7 +389,7 @@ public class ProxyControlGui extends Log
         if (e.getSource() instanceof JComboBox) {
             JComboBox combo = (JComboBox) e.getSource();
             if(HTTP_SAMPLER_NAMING_MODE.equals(combo.getName())){
-                model.setHTTPSampleNamingMode(HTTPSampleNamingMode.getSelectedIndex());
+                model.setHTTPSampleNamingMode(httpSampleNamingMode.getSelectedIndex());
                 }
             }
         else {
@@ -854,9 +854,9 @@ public class ProxyControlGui extends Log
         DefaultComboBoxModel<String> choice = new DefaultComboBoxModel<>();
         choice.addElement(JMeterUtils.getResString("sample_name_prefix")); // $NON-NLS-1$
         choice.addElement(JMeterUtils.getResString("sample_name_transaction")); // $NON-NLS-1$
-        HTTPSampleNamingMode = new JComboBox<>(choice);
-        HTTPSampleNamingMode.setName(HTTP_SAMPLER_NAMING_MODE);
-        HTTPSampleNamingMode.addItemListener(this);
+        httpSampleNamingMode = new JComboBox<>(choice);
+        httpSampleNamingMode.setName(HTTP_SAMPLER_NAMING_MODE);
+        httpSampleNamingMode.addItemListener(this);
         
         prefixHTTPSampleName = new JTextField(4);
         prefixHTTPSampleName.addKeyListener(this);
@@ -885,7 +885,7 @@ public class ProxyControlGui extends Log
         JPanel panel = new JPanel(gridBagLayout);
         panel.setBorder(BorderFactory.createTitledBorder(BorderFactory.createEtchedBorder(),
                 JMeterUtils.getResString("proxy_sampler_settings"))); // $NON-NLS-1$
-        panel.add(HTTPSampleNamingMode, gbc.clone());
+        panel.add(httpSampleNamingMode, gbc.clone());
         gbc.gridx++;
         gbc.weightx = 3;
         gbc.fill=GridBagConstraints.HORIZONTAL;



Mime
View raw message