jmeter-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From pmoua...@apache.org
Subject svn commit: r1226099 - in /jmeter/trunk: src/core/org/apache/jmeter/util/ src/protocol/java/org/apache/jmeter/protocol/java/control/gui/ src/protocol/java/org/apache/jmeter/protocol/java/sampler/ xdocs/
Date Sat, 31 Dec 2011 15:25:07 GMT
Author: pmouawad
Date: Sat Dec 31 15:25:06 2011
New Revision: 1226099

URL: http://svn.apache.org/viewvc?rev=1226099&view=rev
Log:
Bug 52048 - BSFSampler, BSFPreProcessor and BSFPostProcessor should share the same GUI

Added:
    jmeter/trunk/src/protocol/java/org/apache/jmeter/protocol/java/sampler/BSFSamplerBeanInfo.java
  (with props)
    jmeter/trunk/src/protocol/java/org/apache/jmeter/protocol/java/sampler/BSFSamplerResources.properties
  (with props)
    jmeter/trunk/src/protocol/java/org/apache/jmeter/protocol/java/sampler/BSFSamplerResources_fr.properties
  (with props)
Removed:
    jmeter/trunk/src/protocol/java/org/apache/jmeter/protocol/java/control/gui/BSFSamplerGui.java
Modified:
    jmeter/trunk/src/core/org/apache/jmeter/util/BSFBeanInfoSupport.java
    jmeter/trunk/src/protocol/java/org/apache/jmeter/protocol/java/sampler/BSFSampler.java
    jmeter/trunk/xdocs/changes.xml

Modified: jmeter/trunk/src/core/org/apache/jmeter/util/BSFBeanInfoSupport.java
URL: http://svn.apache.org/viewvc/jmeter/trunk/src/core/org/apache/jmeter/util/BSFBeanInfoSupport.java?rev=1226099&r1=1226098&r2=1226099&view=diff
==============================================================================
--- jmeter/trunk/src/core/org/apache/jmeter/util/BSFBeanInfoSupport.java (original)
+++ jmeter/trunk/src/core/org/apache/jmeter/util/BSFBeanInfoSupport.java Sat Dec 31 15:25:06
2011
@@ -19,8 +19,10 @@
 package org.apache.jmeter.util;
 
 import java.beans.PropertyDescriptor;
+import java.util.Properties;
 
 import org.apache.jmeter.testbeans.BeanInfoSupport;
+import org.apache.jmeter.testbeans.gui.FileEditor;
 import org.apache.jmeter.testbeans.gui.TextAreaEditor;
 
 /**
@@ -28,6 +30,18 @@ import org.apache.jmeter.testbeans.gui.T
  */
 public abstract class BSFBeanInfoSupport extends BeanInfoSupport {
 
+    private final static String[] LANGUAGE_TAGS;
+
+    static {
+        Properties languages = JMeterUtils.loadProperties("org/apache/bsf/Languages.properties");
// $NON-NLS-1$
+        LANGUAGE_TAGS = new String[languages.size() + 1];
+        int i = 0;
+        for (Object language : languages.keySet()) {
+            LANGUAGE_TAGS[i++] = language.toString();
+        }
+        LANGUAGE_TAGS[i] = "jexl";
+    }
+
     protected BSFBeanInfoSupport(Class<?> beanClass) {
         super(beanClass);
         PropertyDescriptor p;
@@ -35,6 +49,7 @@ public abstract class BSFBeanInfoSupport
         p = property("scriptLanguage"); // $NON-NLS-1$
         p.setValue(NOT_UNDEFINED, Boolean.TRUE);
         p.setValue(DEFAULT, ""); // $NON-NLS-1$
+        p.setValue(TAGS, LANGUAGE_TAGS);
 
         createPropertyGroup("scriptingLanguage", // $NON-NLS-1$
                 new String[] { "scriptLanguage" }); // $NON-NLS-1$
@@ -49,6 +64,7 @@ public abstract class BSFBeanInfoSupport
         p = property("filename"); // $NON-NLS-1$
         p.setValue(NOT_UNDEFINED, Boolean.TRUE);
         p.setValue(DEFAULT, ""); // $NON-NLS-1$
+        p.setPropertyEditorClass(FileEditor.class);
 
         createPropertyGroup("filenameGroup",  // $NON-NLS-1$
                 new String[] { "filename" }); // $NON-NLS-1$

Modified: jmeter/trunk/src/protocol/java/org/apache/jmeter/protocol/java/sampler/BSFSampler.java
URL: http://svn.apache.org/viewvc/jmeter/trunk/src/protocol/java/org/apache/jmeter/protocol/java/sampler/BSFSampler.java?rev=1226099&r1=1226098&r2=1226099&view=diff
==============================================================================
--- jmeter/trunk/src/protocol/java/org/apache/jmeter/protocol/java/sampler/BSFSampler.java
(original)
+++ jmeter/trunk/src/protocol/java/org/apache/jmeter/protocol/java/sampler/BSFSampler.java
Sat Dec 31 15:25:06 2011
@@ -27,6 +27,7 @@ import org.apache.commons.io.IOUtils;
 import org.apache.jmeter.samplers.Entry;
 import org.apache.jmeter.samplers.SampleResult;
 import org.apache.jmeter.samplers.Sampler;
+import org.apache.jmeter.testbeans.TestBean;
 import org.apache.jmeter.util.BSFTestElement;
 import org.apache.jorphan.logging.LoggingManager;
 import org.apache.log.Logger;
@@ -35,7 +36,7 @@ import org.apache.log.Logger;
  * A sampler which understands BSF
  *
  */
-public class BSFSampler extends BSFTestElement implements Sampler {
+public class BSFSampler extends BSFTestElement implements Sampler, TestBean {
 
     private static final long serialVersionUID = 240L;
 

Added: jmeter/trunk/src/protocol/java/org/apache/jmeter/protocol/java/sampler/BSFSamplerBeanInfo.java
URL: http://svn.apache.org/viewvc/jmeter/trunk/src/protocol/java/org/apache/jmeter/protocol/java/sampler/BSFSamplerBeanInfo.java?rev=1226099&view=auto
==============================================================================
--- jmeter/trunk/src/protocol/java/org/apache/jmeter/protocol/java/sampler/BSFSamplerBeanInfo.java
(added)
+++ jmeter/trunk/src/protocol/java/org/apache/jmeter/protocol/java/sampler/BSFSamplerBeanInfo.java
Sat Dec 31 15:25:06 2011
@@ -0,0 +1,32 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
+ * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
+ * License for the specific language governing permissions and limitations
+ * under the License.
+ *
+ */
+
+package org.apache.jmeter.protocol.java.sampler;
+
+import org.apache.jmeter.util.BSFBeanInfoSupport;
+
+/**
+ * BSF Sampler Bean Info
+ */
+public class BSFSamplerBeanInfo extends BSFBeanInfoSupport {
+
+    public BSFSamplerBeanInfo() {
+        super(BSFSampler.class);
+    }
+
+}

Propchange: jmeter/trunk/src/protocol/java/org/apache/jmeter/protocol/java/sampler/BSFSamplerBeanInfo.java
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Added: jmeter/trunk/src/protocol/java/org/apache/jmeter/protocol/java/sampler/BSFSamplerResources.properties
URL: http://svn.apache.org/viewvc/jmeter/trunk/src/protocol/java/org/apache/jmeter/protocol/java/sampler/BSFSamplerResources.properties?rev=1226099&view=auto
==============================================================================
--- jmeter/trunk/src/protocol/java/org/apache/jmeter/protocol/java/sampler/BSFSamplerResources.properties
(added)
+++ jmeter/trunk/src/protocol/java/org/apache/jmeter/protocol/java/sampler/BSFSamplerResources.properties
Sat Dec 31 15:25:06 2011
@@ -0,0 +1,29 @@
+#   Licensed to the Apache Software Foundation (ASF) under one or more
+#   contributor license agreements.  See the NOTICE file distributed with
+#   this work for additional information regarding copyright ownership.
+#   The ASF licenses this file to You under the Apache License, Version 2.0
+#   (the "License"); you may not use this file except in compliance with
+#   the License.  You may obtain a copy of the License at
+# 
+#       http://www.apache.org/licenses/LICENSE-2.0
+# 
+#   Unless required by applicable law or agreed to in writing, software
+#   distributed under the License is distributed on an "AS IS" BASIS,
+#   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+#   See the License for the specific language governing permissions and
+#   limitations under the License.
+
+
+displayName=BSF Sampler
+filename.displayName=File Name
+filename.shortDescription=Script file (overrides script)
+filenameGroup.displayName=Script file (overrides script)
+parameterGroup.displayName=Parameters to be passed to script (=> String Parameters and
String []args)
+parameters.displayName=Parameters
+parameters.shortDescription=Parameters to be passed to the file or script
+script.displayName=Script
+script.shortDescription=Script in the appropriate BSF language
+scriptLanguage.displayName=Language
+scriptLanguage.shortDescription=Name of BSF language, e.g. beanshell, javascript, jexl
+scripting.displayName=Script (variables: ctx vars props SampleResult sampler log Label FileName
Parameters args[] OUT)
+scriptingLanguage.displayName=Script language (e.g. beanshell, javascript, jexl)

Propchange: jmeter/trunk/src/protocol/java/org/apache/jmeter/protocol/java/sampler/BSFSamplerResources.properties
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Added: jmeter/trunk/src/protocol/java/org/apache/jmeter/protocol/java/sampler/BSFSamplerResources_fr.properties
URL: http://svn.apache.org/viewvc/jmeter/trunk/src/protocol/java/org/apache/jmeter/protocol/java/sampler/BSFSamplerResources_fr.properties?rev=1226099&view=auto
==============================================================================
--- jmeter/trunk/src/protocol/java/org/apache/jmeter/protocol/java/sampler/BSFSamplerResources_fr.properties
(added)
+++ jmeter/trunk/src/protocol/java/org/apache/jmeter/protocol/java/sampler/BSFSamplerResources_fr.properties
Sat Dec 31 15:25:06 2011
@@ -0,0 +1,29 @@
+#   Licensed to the Apache Software Foundation (ASF) under one or more
+#   contributor license agreements.  See the NOTICE file distributed with
+#   this work for additional information regarding copyright ownership.
+#   The ASF licenses this file to You under the Apache License, Version 2.0
+#   (the "License"); you may not use this file except in compliance with
+#   the License.  You may obtain a copy of the License at
+# 
+#       http://www.apache.org/licenses/LICENSE-2.0
+# 
+#   Unless required by applicable law or agreed to in writing, software
+#   distributed under the License is distributed on an "AS IS" BASIS,
+#   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+#   See the License for the specific language governing permissions and
+#   limitations under the License.
+
+#Stored by I18NEdit, may be edited!
+displayName=Echantillon BSF
+filename.displayName=Nom de fichier 
+filename.shortDescription=Fichier script (remplace le script)
+filenameGroup.displayName=Fichier script (remplace le script)
+parameterGroup.displayName=Param\u00E8tres \u00E0 passer au script (\=> String Parameters
and String []args)
+parameters.displayName=Param\u00E8tres
+parameters.shortDescription=Param\u00E8tres \u00E0 passer au fichier ou au script
+script.displayName=Script
+script.shortDescription=Script dans le langage BSF appropri\u00E9
+scriptLanguage.displayName=Langage 
+scriptLanguage.shortDescription=Nom du langage BSF, ex. beanshell, javascript, jexl
+scripting.displayName=Script (variables\: ctx vars props SampleResult sampler log Label FileName
Parameters args[] OUT)
+scriptingLanguage.displayName=Langage de script (ex. beanshell, javascript, jexl)

Propchange: jmeter/trunk/src/protocol/java/org/apache/jmeter/protocol/java/sampler/BSFSamplerResources_fr.properties
------------------------------------------------------------------------------
    svn:mime-type = text/plain

Modified: jmeter/trunk/xdocs/changes.xml
URL: http://svn.apache.org/viewvc/jmeter/trunk/xdocs/changes.xml?rev=1226099&r1=1226098&r2=1226099&view=diff
==============================================================================
--- jmeter/trunk/xdocs/changes.xml (original)
+++ jmeter/trunk/xdocs/changes.xml Sat Dec 31 15:25:06 2011
@@ -183,6 +183,7 @@ This behaviour can be changed with prope
 <li>Bug 52115 - SOAP/XML-RPC should not send a POST request when file to send is not
found</li>
 <li>Bug 40750 - TCPSampler : Behaviour when sockets are closed by remote host</li>
 <li>Bug 52396 - TCP Sampler in "reuse connection mode" reuses previous sampler's connection
even if it's configured with other host, port, user or password</li>
+<li>Bug 52048 - BSFSampler, BSFPreProcessor and BSFPostProcessor should share the same
GUI</li>
 </ul>
 
 <h3>Controllers</h3>



Mime
View raw message