cvs commit: jakarta-jmeter/src/core/org/apache/jmeter/testbeans/gui PackageTest.java
sebb2004/01/21 05:50:31 Modified:src/core/org/apache/jmeter/testbeans/gui PackageTest.java Log: Locale(language) is JDK 1.4 only Revision ChangesPath 1.2 +6 -5 jakarta-jmeter/src/core/org/apache/jmeter/testbeans/gui/PackageTest.java Index: PackageTest.java === RCS file: /home/cvs/jakarta-jmeter/src/core/org/apache/jmeter/testbeans/gui/PackageTest.java,v retrieving revision 1.1 retrieving revision 1.2 diff -u -r1.1 -r1.2 --- PackageTest.java 20 Jan 2004 17:34:35 - 1.1 +++ PackageTest.java 21 Jan 2004 13:50:31 - 1.2 @@ -67,6 +67,7 @@ import java.util.Locale; import java.util.ResourceBundle; +import org.apache.jmeter.junit.JMeterTestCase; import org.apache.jmeter.testbeans.TestBean; import org.apache.jmeter.testelement.TestElement; import org.apache.jmeter.util.JMeterUtils; @@ -75,7 +76,7 @@ import org.apache.log.Logger; import junit.framework.Test; -import junit.framework.TestCase; +//import junit.framework.TestCase; import junit.framework.TestSuite; /* @@ -85,7 +86,7 @@ * except for beans whose name contains Experimental or Alpha. * TODO: - Check property files don't have duplicate keys (is this important) */ -public class PackageTest extends TestCase +public class PackageTest extends JMeterTestCase { private static Logger log = LoggingManager.getLoggerForClass(); @@ -109,7 +110,7 @@ public void setUp() { - JMeterUtils.setLocale(new Locale(language)); + JMeterUtils.setLocale(new Locale(language,)); try { beanInfo= Introspector.getBeanInfo(testBeanClass, TestBean.class); @@ -198,7 +199,7 @@ while (iter.hasNext()) { Class testBeanClass= Class.forName((String)iter.next()); - JMeterUtils.setLocale(new Locale(defaultLanguage)); + JMeterUtils.setLocale(new Locale(defaultLanguage,)); ResourceBundle defaultBundle; try { - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
cvs commit: jakarta-jmeter/src/jorphan/org/apache/jorphan/test AllTests.java
sebb2004/01/21 06:03:29 Modified:src/jorphan/org/apache/jorphan/test AllTests.java Log: Log some more environmental inforrmation Revision ChangesPath 1.19 +18 -2 jakarta-jmeter/src/jorphan/org/apache/jorphan/test/AllTests.java Index: AllTests.java === RCS file: /home/cvs/jakarta-jmeter/src/jorphan/org/apache/jorphan/test/AllTests.java,v retrieving revision 1.18 retrieving revision 1.19 diff -u -r1.18 -r1.19 --- AllTests.java 20 Jan 2004 16:41:27 - 1.18 +++ AllTests.java 21 Jan 2004 14:03:29 - 1.19 @@ -65,6 +65,7 @@ import junit.framework.TestSuite; import junit.textui.TestRunner; +import org.apache.jmeter.util.JMeterUtils; import org.apache.jorphan.logging.LoggingManager; import org.apache.jorphan.reflect.ClassFinder; import org.apache.jorphan.util.JOrphanUtils; @@ -164,8 +165,23 @@ logprop(java.version); logprop(java.vendor); + logprop(java.home); + logprop(user.home); + logprop(user.dir); + logprop(os.name); + logprop(os.version); + logprop(os.arch); logprop(java.class.version); - logprop(java.class.path); + //logprop(java.class.path); + String cp = System.getProperty(java.class.path); + String cpe[]= JMeterUtils.split(cp,;,); + StringBuffer sb = new StringBuffer(3000); + for (int i=0;icpe.length;i++){ + sb.append(cpe[i]); + sb.append(\n); + } + log.info(sb.toString()); + //++ // GUI tests throw the error // testArgumentCreation(org.apache.jmeter.config.gui.ArgumentsPanel$Test)java.lang.NoClassDefFoundError - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
cvs commit: jakarta-jmeter build.xml
sebb2004/01/21 07:54:07 Modified:.build.xml Log: Tweaks to jar creation: - only classes are now picked up from build tree - properties are now picked up from all branches of source tree Revision ChangesPath 1.158 +66 -18jakarta-jmeter/build.xml Index: build.xml === RCS file: /home/cvs/jakarta-jmeter/build.xml,v retrieving revision 1.157 retrieving revision 1.158 diff -u -r1.157 -r1.158 --- build.xml 14 Jan 2004 22:32:03 - 1.157 +++ build.xml 21 Jan 2004 15:54:07 - 1.158 @@ -580,28 +580,76 @@ -- target name=package-only description=Package already-compiled classes (shortcut for IDE users) mkdir dir=${dest.jar}/ -jar jarfile=${dest.jar}/ApacheJMeter_core.jar excludes=**/NewDriver* manifest=${src.core}/MANIFEST - !-- Only include class files - see above -- + +!-- perhaps ought to include a basic jmeter.properties file in one of the jars, +given that JMeterUtils looks for it if it cannot find the external one +- otherwise, change utils to ignore it -- + +!-- JMeter launch jar -- +jar jarfile=${dest.jar.jmeter}/ApacheJMeter.jar includes=**/NewDriver* +manifest=${src.core}/MANIFEST +basedir=${build.core}/ + +!-- core -- +jar jarfile=${dest.jar}/ApacheJMeter_core.jar excludes=**/NewDriver* + !-- Only include class files from build tree - see above -- fileset dir=${build.core} includes=**/*.class/ fileset dir=${src.core} includes=org/apache/jmeter/images// - fileset dir=${src.core} includes=org/apache/jmeter/resources/ + fileset dir=${src.core} includes=**/*.properties exclude name=*eucJP*/ /fileset !-- This file is used by the jmeter -h option -- fileset dir=${src.core} includes=org/apache/jmeter/help.txt/ /jar -jar jarfile=${dest.jar.jmeter}/ApacheJMeter.jar includes=**/NewDriver* manifest=${src.core}/MANIFEST basedir=${build.core}/ -!-- perhaps ought to include a basic jmeter.properties file in one of the jars, -given that JMeterUtils looks for it if it cannot find the external one -- otherwise, change utils to ignore it -- -jar jarfile=${dest.jar}/ApacheJMeter_components.jar basedir=${build.components}/ -jar jarfile=${dest.jar}/ApacheJMeter_functions.jar basedir=${build.functions}/ -jar jarfile=${dest.jar}/ApacheJMeter_http.jar basedir=${build.http}/ -jar jarfile=${dest.jar}/ApacheJMeter_ftp.jar basedir=${build.ftp}/ -jar jarfile=${dest.jar}/ApacheJMeter_jdbc.jar basedir=${build.jdbc}/ -jar jarfile=${dest.jar}/ApacheJMeter_java.jar basedir=${build.java}/ -jar jarfile=${dest.jar}/ApacheJMeter_ldap.jar basedir=${build.ldap}/ -jar jarfile=${dest.jar}/ApacheJMeter_tcp.jar basedir=${build.tcp}/ + +!-- components -- +jar jarfile=${dest.jar}/ApacheJMeter_components.jar + fileset dir=${build.components} includes=**/*.class / + fileset dir=${src.components} includes=**/*.properties / +/jar + +!-- functions -- +jar jarfile=${dest.jar}/ApacheJMeter_functions.jar + fileset dir=${build.functions} includes=**/*.class / + fileset dir=${src.functions} includes=**/*.properties / +/jar + +!-- http -- +jar jarfile=${dest.jar}/ApacheJMeter_http.jar + fileset dir=${build.http} includes=**/*.class / + fileset dir=${src.http} includes=**/*.properties / +/jar + +!-- ftp -- +jar jarfile=${dest.jar}/ApacheJMeter_ftp.jar + fileset dir=${build.ftp} includes=**/*.class / + fileset dir=${src.ftp} includes=**/*.properties / +/jar + +!-- jdbc -- +jar jarfile=${dest.jar}/ApacheJMeter_jdbc.jar + fileset dir=${build.jdbc} includes=**/*.class / + fileset dir=${src.jdbc} includes=**/*.properties / +/jar + +!-- java -- +jar jarfile=${dest.jar}/ApacheJMeter_java.jar + fileset dir=${build.java} includes=**/*.class / + fileset dir=${src.java} includes=**/*.properties / +/jar + +!-- ldap -- +jar jarfile=${dest.jar}/ApacheJMeter_ldap.jar + fileset dir=${build.ldap} includes=**/*.class / + fileset dir=${src.ldap} includes=**/*.properties / +/jar + +!-- tcp -- +jar jarfile=${dest.jar}/ApacheJMeter_tcp.jar + fileset dir=${build.tcp} includes=**/*.class / + fileset dir=${src.tcp} includes=**/*.properties / +/jar + jar jarfile=${lib.dir}/htmlparser.jar basedir=${build.htmlparser}/ jar jarfile=${lib.dir}/jorphan.jar basedir=${build.jorphan}/ /target - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
RE: cvs commit: jakarta-jmeter build.xml
Hopefully this will fix the following Gump test error: 2004/01/21 12:51:13 ERROR - jorphan.test.AllTests: error adding test : java.lang.reflect.InvocationTargetException at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39 ) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl .java:25) at java.lang.reflect.Method.invoke(Method.java:324) at org.apache.jorphan.test.AllTests.suite(AllTests.java:339) at org.apache.jorphan.test.AllTests.main(AllTests.java:201) Caused by: java.lang.Error: No default bundle for class org.apache.jmeter.timers.ConstantThroughputTimer at org.apache.jmeter.testbeans.gui.PackageTest.suite(PackageTest.java:219) In case you have not seen the error in local testing, and are wondering why, this is probably because: - by default Eclipse (and other IDEs?) copies properties files to the build directory - previously, when building components and other jars, build.xml slurped up all the contents of the build sub-tree. The change also means that the i18nEdit .metaprop files are no longer put in the jars. If you are using Eclipse, you might want change the project properties to suppress the copying non-java source files to the build directory. Makes it easier to find files using Ctrl+Shift+R. S. -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Sent: 21 January 2004 15:54 To: [EMAIL PROTECTED] Subject: cvs commit: jakarta-jmeter build.xml sebb2004/01/21 07:54:07 Modified:.build.xml Log: Tweaks to jar creation: - only classes are now picked up from build tree - properties are now picked up from all branches of source tree - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
patch for regexextracter
Hi all,. I made a small patch, to extract all matches from a given result. It works as follows: when using -1 for the matchNumber (instead of 0 for rando, or a positive integer) it will create seperate variables for all matches, this way you can extract all links on a page and test all these links (together with a foreach controller which I will post shortly as well) It stores the number of matches in a variable reference name_matchNr, and al succesive matches in reference name_1, ..._2 etc. If there is interest in it, and someone will have a look at it, I will also make some clearer documentation. I hope people will like it. Greetings, Dolf Smits - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Patch, adding foreach controller
Hi all, as promised also my setup forr an foreach controller give it some input variable, which consists of several variables each extended with a number, eg input vaibale searchlink, you need to have defined searchlink_1, searchlink_2 etc, it will se these values successive and place them in the output variable. I made the patch from the level core.org.apache.jmeter.control, so the following keys need to be added to the messages.properties as well. foreach_controller_title=ForEach Controller foreach_input=Name of input variable foreach_return=Name of return variable Hope people are interested and someone will commit. I will provide detailed usermanual in that case Greetings, Dolf Smits - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: cvs commit: jakarta-jmeter build.xml
Hi Sebb. Would it make sense to pack i18nedit.properties in the core .jar so that we can read the list of supported locales from it? Right now we have this list in at least three places (the GUI, the bean resources tests, the resources/messages.properties test). -- Salut, Jordi. En/na BAZLEY, Sebastian ha escrit: Hopefully this will fix the following Gump test error: 2004/01/21 12:51:13 ERROR - jorphan.test.AllTests: error adding test : java.lang.reflect.InvocationTargetException at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39 ) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl .java:25) at java.lang.reflect.Method.invoke(Method.java:324) at org.apache.jorphan.test.AllTests.suite(AllTests.java:339) at org.apache.jorphan.test.AllTests.main(AllTests.java:201) Caused by: java.lang.Error: No default bundle for class org.apache.jmeter.timers.ConstantThroughputTimer at org.apache.jmeter.testbeans.gui.PackageTest.suite(PackageTest.java:219) In case you have not seen the error in local testing, and are wondering why, this is probably because: - by default Eclipse (and other IDEs?) copies properties files to the build directory - previously, when building components and other jars, build.xml slurped up all the contents of the build sub-tree. The change also means that the i18nEdit .metaprop files are no longer put in the jars. If you are using Eclipse, you might want change the project properties to suppress the copying non-java source files to the build directory. Makes it easier to find files using Ctrl+Shift+R. S. -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Sent: 21 January 2004 15:54 To: [EMAIL PROTECTED] Subject: cvs commit: jakarta-jmeter build.xml sebb2004/01/21 07:54:07 Modified:.build.xml Log: Tweaks to jar creation: - only classes are now picked up from build tree - properties are now picked up from all branches of source tree - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
cvs commit: jakarta-jmeter/src/functions/org/apache/jmeter/functions CSVRead.java
sebb2004/01/21 15:22:23 Modified:src/functions/org/apache/jmeter/functions CSVRead.java Log: Handle missing file more gracefully Revision ChangesPath 1.10 +10 -4 jakarta-jmeter/src/functions/org/apache/jmeter/functions/CSVRead.java Index: CSVRead.java === RCS file: /home/cvs/jakarta-jmeter/src/functions/org/apache/jmeter/functions/CSVRead.java,v retrieving revision 1.9 retrieving revision 1.10 diff -u -r1.9 -r1.10 --- CSVRead.java 20 Jan 2004 01:30:06 - 1.9 +++ CSVRead.java 21 Jan 2004 23:22:23 - 1.10 @@ -55,6 +55,7 @@ package org.apache.jmeter.functions; import java.io.BufferedReader; +import java.io.FileNotFoundException; import java.io.FileReader; import java.io.IOException; import java.io.Serializable; @@ -181,7 +182,12 @@ try { int columnIndex = Integer.parseInt(columnOrNext); // what column is wanted? -myValue = (String) processedLines.get(columnIndex); +if (processedLines != null) { + myValue = (String) processedLines.get(columnIndex); +} else { + log.error(No file data found); +} + } catch (NumberFormatException e) { @@ -299,9 +305,9 @@ FileReader fis = new FileReader(fileName); myBread = new BufferedReader(fis); } -catch (Exception e) +catch (FileNotFoundException e) { -log.error(openFile, e); +log.error(e.toString()); } } - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
cvs commit: jakarta-jmeter/src/protocol/tcp/org/apache/jmeter/protocol/tcp/sampler TCPClientImpl.java TCPClient.java TCPSampler.java
sebb2004/01/21 15:33:56 Modified:src/protocol/tcp/org/apache/jmeter/protocol/tcp/sampler TCPClientImpl.java TCPClient.java TCPSampler.java Log: Add ASL Revision ChangesPath 1.4 +57 -1 jakarta-jmeter/src/protocol/tcp/org/apache/jmeter/protocol/tcp/sampler/TCPClientImpl.java Index: TCPClientImpl.java === RCS file: /home/cvs/jakarta-jmeter/src/protocol/tcp/org/apache/jmeter/protocol/tcp/sampler/TCPClientImpl.java,v retrieving revision 1.3 retrieving revision 1.4 diff -u -r1.3 -r1.4 --- TCPClientImpl.java8 Jan 2004 00:56:30 - 1.3 +++ TCPClientImpl.java21 Jan 2004 23:33:56 - 1.4 @@ -1,4 +1,60 @@ /* + * + * The Apache Software License, Version 1.1 + * + * Copyright (c) 2001,2004 The Apache Software Foundation. All rights + * reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in + * the documentation and/or other materials provided with the + * distribution. + * + * 3. The end-user documentation included with the redistribution, + * if any, must include the following acknowledgment: + * This product includes software developed by the + * Apache Software Foundation (http://www.apache.org/). + * Alternately, this acknowledgment may appear in the software itself, + * if and wherever such third-party acknowledgments normally appear. + * + * 4. The names Apache and Apache Software Foundation and + * Apache JMeter must not be used to endorse or promote products + * derived from this software without prior written permission. For + * written permission, please contact [EMAIL PROTECTED] + * + * 5. Products derived from this software may not be called Apache, + * Apache JMeter, nor may Apache appear in their name, without + * prior written permission of the Apache Software Foundation. + * + * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED + * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR + * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT + * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF + * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND + * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, + * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT + * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. + * + * + * This software consists of voluntary contributions made by many + * individuals on behalf of the Apache Software Foundation. For more + * information on the Apache Software Foundation, please see + * http://www.apache.org/. + */ + + +/* * Basic TCP Sampler Client class * * Can be used to test the TCP Sampler against an HTTP server 1.3 +56 -1 jakarta-jmeter/src/protocol/tcp/org/apache/jmeter/protocol/tcp/sampler/TCPClient.java Index: TCPClient.java === RCS file: /home/cvs/jakarta-jmeter/src/protocol/tcp/org/apache/jmeter/protocol/tcp/sampler/TCPClient.java,v retrieving revision 1.2 retrieving revision 1.3 diff -u -r1.2 -r1.3 --- TCPClient.java20 Jan 2004 02:12:37 - 1.2 +++ TCPClient.java21 Jan 2004 23:33:56 - 1.3 @@ -1,4 +1,59 @@ /* + * + * The Apache Software License, Version 1.1 + * + * Copyright (c) 2001,2004 The Apache Software Foundation. All rights + * reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in + * the documentation and/or other materials provided with the + * distribution. +