How can I develop Java classes, to prepare and execute a .jmx file (JMeter scenario) and retrieve wanted texts from its response?
Hello, I would like to develop a Java application, that executes a predefined jmeter test scenario, to programmatically send http requests towards a web application on Internet, and retrieve some wanted texts from the HTTP response. To do this, I need to make a jmx by JMeter's GUI interface, then, tag its HTTP parameters. and My Java app will parse the jmx file, replace the tags by real values, then execute the jmx and retrieve results. The final goal, is to submit programmatically HTML forms, that request a credit report from some credit rating agencies' Internet applications. These agencies haven't developed any distributed IT services (neither EJB nor Web Services) for such a purpose, and they plan to release a web service for requesting credit report, but only in late 2010. For example, this is a paragraph from my jmx file template that logs into an credit agency's web app with a login and a password: I shall replace programmatically @LOGIN and @PASSWORD with real credentials in my application, then generate a new jmx and execute it, and at last, run programmatically the new jmx and retrieve results (such as the id, date, content of a credit report). (The same process is only manually available on the credit agency's web app, and I would like to run it programmatically from a Java app.) elementProp name=login elementType=HTTPArgument boolProp name=HTTPArgument.always_encodefalse/boolProp stringProp name=Argument.value@LOGIN/stringProp stringProp name=Argument.metadata=/stringProp boolProp name=HTTPArgument.use_equalstrue/boolProp stringProp name=Argument.namelogin/stringProp /elementProp elementProp name=password elementType=HTTPArgument boolProp name=HTTPArgument.always_encodefalse/boolProp stringProp name=Argument.value@PASSWORD/stringProp stringProp name=Argument.metadata=/stringProp boolProp name=HTTPArgument.use_equalstrue/boolProp stringProp name=Argument.namepassword/stringProp /elementProp Could you tell me how to achieve this goal and where can I find some examples that works in a similar way? Thanks a lot. With my best wishes, Rosière -- View this message in context: http://old.nabble.com/How-can-I-develop-Java-classes%2C-to-prepare-and-execute-a-.jmx-file-%28JMeter-scenario%29-and-retrieve-wanted-texts-from-its-response--tp26339888p26339888.html Sent from the JMeter - Dev mailing list archive at Nabble.com. - To unsubscribe, e-mail: jmeter-dev-unsubscr...@jakarta.apache.org For additional commands, e-mail: jmeter-dev-h...@jakarta.apache.org
svn commit: r835924 - /jakarta/jmeter/trunk/build.xml
Author: sebb Date: Fri Nov 13 17:12:07 2009 New Revision: 835924 URL: http://svn.apache.org/viewvc?rev=835924view=rev Log: Bug 48183 - need to ensure build dir is created before downloading files Modified: jakarta/jmeter/trunk/build.xml Modified: jakarta/jmeter/trunk/build.xml URL: http://svn.apache.org/viewvc/jakarta/jmeter/trunk/build.xml?rev=835924r1=835923r2=835924view=diff == --- jakarta/jmeter/trunk/build.xml (original) +++ jakarta/jmeter/trunk/build.xml Fri Nov 13 17:12:07 2009 @@ -2004,6 +2004,8 @@ !-- Download all missing jars.-- target name=download_jars description=Download any missing jar files + !-- build.dir may be needed as a temporary work area -- + mkdir dir=${build.dir} / antcall target=_process_all_jars param name=_get_file value=true/ /antcall - To unsubscribe, e-mail: jmeter-dev-unsubscr...@jakarta.apache.org For additional commands, e-mail: jmeter-dev-h...@jakarta.apache.org
DO NOT REPLY [Bug 48183] ant doesn't create build directory in download_jars task
https://issues.apache.org/bugzilla/show_bug.cgi?id=48183 --- Comment #1 from Sebb s...@apache.org 2009-11-13 09:14:20 UTC --- Thanks, fixed (but done higher up in the calling sequence). URL: http://svn.apache.org/viewvc?rev=835924view=rev Log: Bug 48183 - need to ensure build dir is created before downloading files -- Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email --- You are receiving this mail because: --- You are the assignee for the bug. - To unsubscribe, e-mail: jmeter-dev-unsubscr...@jakarta.apache.org For additional commands, e-mail: jmeter-dev-h...@jakarta.apache.org
DO NOT REPLY [Bug 48163] JMeterTestCase for org.apache.jmeter.protocol.http.control.CacheManager
https://issues.apache.org/bugzilla/show_bug.cgi?id=48163 Sebb s...@apache.org changed: What|Removed |Added Status|NEW |NEEDINFO --- Comment #1 from Sebb s...@apache.org 2009-11-13 09:15:37 UTC --- There's no attachment... -- Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email --- You are receiving this mail because: --- You are the assignee for the bug. - To unsubscribe, e-mail: jmeter-dev-unsubscr...@jakarta.apache.org For additional commands, e-mail: jmeter-dev-h...@jakarta.apache.org
Re: How can I develop Java classes, to prepare and execute a .jmx file (JMeter scenario) and retrieve wanted texts from its response?
On 13/11/2009, rosiere shu.yi.eut...@gmail.com wrote: Hello, I would like to develop a Java application, that executes a predefined jmeter test scenario, to programmatically send http requests towards a web application on Internet, and retrieve some wanted texts from the HTTP response. To do this, I need to make a jmx by JMeter's GUI interface, then, tag its HTTP parameters. and My Java app will parse the jmx file, replace the tags by real values, then execute the jmx and retrieve results. The final goal, is to submit programmatically HTML forms, that request a credit report from some credit rating agencies' Internet applications. These agencies haven't developed any distributed IT services (neither EJB nor Web Services) for such a purpose, and they plan to release a web service for requesting credit report, but only in late 2010. For example, this is a paragraph from my jmx file template that logs into an credit agency's web app with a login and a password: I shall replace programmatically @LOGIN and @PASSWORD with real credentials in my application, then generate a new jmx and execute it, and at last, run programmatically the new jmx and retrieve results (such as the id, date, content of a credit report). (The same process is only manually available on the credit agency's web app, and I would like to run it programmatically from a Java app.) elementProp name=login elementType=HTTPArgument boolProp name=HTTPArgument.always_encodefalse/boolProp stringProp name=Argument.value@LOGIN/stringProp stringProp name=Argument.metadata=/stringProp boolProp name=HTTPArgument.use_equalstrue/boolProp stringProp name=Argument.namelogin/stringProp /elementProp elementProp name=password elementType=HTTPArgument boolProp name=HTTPArgument.always_encodefalse/boolProp stringProp name=Argument.value@PASSWORD/stringProp stringProp name=Argument.metadata=/stringProp boolProp name=HTTPArgument.use_equalstrue/boolProp stringProp name=Argument.namepassword/stringProp /elementProp Could you tell me how to achieve this goal and where can I find some examples that works in a similar way? Thanks a lot. This is not a suitable application for JMeter; it will involve a lot of unnecessary work. You would be much better off using a Java HTTP library such as Apache HttpClient (http://hc.apache.org/httpcomponents-client/index.html) or perhaps HttpUnit (http://httpunit.sourceforge.net/) With my best wishes, Rosière -- View this message in context: http://old.nabble.com/How-can-I-develop-Java-classes%2C-to-prepare-and-execute-a-.jmx-file-%28JMeter-scenario%29-and-retrieve-wanted-texts-from-its-response--tp26339888p26339888.html Sent from the JMeter - Dev mailing list archive at Nabble.com. - To unsubscribe, e-mail: jmeter-dev-unsubscr...@jakarta.apache.org For additional commands, e-mail: jmeter-dev-h...@jakarta.apache.org - To unsubscribe, e-mail: jmeter-dev-unsubscr...@jakarta.apache.org For additional commands, e-mail: jmeter-dev-h...@jakarta.apache.org
DO NOT REPLY [Bug 48163] JMeterTestCase for org.apache.jmeter.protocol.http.control.CacheManager
https://issues.apache.org/bugzilla/show_bug.cgi?id=48163 --- Comment #2 from John Samford john.samf...@ithaka.org 2009-11-13 10:07:46 UTC --- Created an attachment (id=24530) -- (https://issues.apache.org/bugzilla/attachment.cgi?id=24530) JMeterTestCase for CacheManager My apologies for not attaching the file. Here 'tis! -- Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email --- You are receiving this mail because: --- You are the assignee for the bug. - To unsubscribe, e-mail: jmeter-dev-unsubscr...@jakarta.apache.org For additional commands, e-mail: jmeter-dev-h...@jakarta.apache.org
DO NOT REPLY [Bug 48163] JMeterTestCase for org.apache.jmeter.protocol.http.control.CacheManager
https://issues.apache.org/bugzilla/show_bug.cgi?id=48163 Sebb s...@apache.org changed: What|Removed |Added Attachment #24530|application/octet-stream|text/plain mime type|| -- Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email --- You are receiving this mail because: --- You are the assignee for the bug. - To unsubscribe, e-mail: jmeter-dev-unsubscr...@jakarta.apache.org For additional commands, e-mail: jmeter-dev-h...@jakarta.apache.org
DO NOT REPLY [Bug 48163] JMeterTestCase for org.apache.jmeter.protocol.http.control.CacheManager
https://issues.apache.org/bugzilla/show_bug.cgi?id=48163 John Samford john.samf...@ithaka.org changed: What|Removed |Added Status|NEEDINFO|NEW -- Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email --- You are receiving this mail because: --- You are the assignee for the bug. - To unsubscribe, e-mail: jmeter-dev-unsubscr...@jakarta.apache.org For additional commands, e-mail: jmeter-dev-h...@jakarta.apache.org
svn commit: r835948 - /jakarta/jmeter/trunk/src/protocol/http/org/apache/jmeter/protocol/http/control/CacheManager.java
Author: sebb Date: Fri Nov 13 18:32:40 2009 New Revision: 835948 URL: http://svn.apache.org/viewvc?rev=835948view=rev Log: Allow access by unit-test cases Modified: jakarta/jmeter/trunk/src/protocol/http/org/apache/jmeter/protocol/http/control/CacheManager.java Modified: jakarta/jmeter/trunk/src/protocol/http/org/apache/jmeter/protocol/http/control/CacheManager.java URL: http://svn.apache.org/viewvc/jakarta/jmeter/trunk/src/protocol/http/org/apache/jmeter/protocol/http/control/CacheManager.java?rev=835948r1=835947r2=835948view=diff == --- jakarta/jmeter/trunk/src/protocol/http/org/apache/jmeter/protocol/http/control/CacheManager.java (original) +++ jakarta/jmeter/trunk/src/protocol/http/org/apache/jmeter/protocol/http/control/CacheManager.java Fri Nov 13 18:32:40 2009 @@ -61,7 +61,8 @@ * Holder for storing cache details. * Perhaps add original response later? */ -private static class CacheEntry{ +// package-protected to allow access by unit-test cases +static class CacheEntry{ private final String lastModified; private final String etag; public CacheEntry(String lastModified, String etag){ - To unsubscribe, e-mail: jmeter-dev-unsubscr...@jakarta.apache.org For additional commands, e-mail: jmeter-dev-h...@jakarta.apache.org
svn commit: r835949 - /jakarta/jmeter/trunk/test/src/org/apache/jmeter/protocol/http/control/TestCacheManager.java
Author: sebb Date: Fri Nov 13 18:36:22 2009 New Revision: 835949 URL: http://svn.apache.org/viewvc?rev=835949view=rev Log: Bug 48163 - TestCase for org.apache.jmeter.protocol.http.control.CacheManager Initial checkin Added: jakarta/jmeter/trunk/test/src/org/apache/jmeter/protocol/http/control/TestCacheManager.java (with props) Added: jakarta/jmeter/trunk/test/src/org/apache/jmeter/protocol/http/control/TestCacheManager.java URL: http://svn.apache.org/viewvc/jakarta/jmeter/trunk/test/src/org/apache/jmeter/protocol/http/control/TestCacheManager.java?rev=835949view=auto == --- jakarta/jmeter/trunk/test/src/org/apache/jmeter/protocol/http/control/TestCacheManager.java (added) +++ jakarta/jmeter/trunk/test/src/org/apache/jmeter/protocol/http/control/TestCacheManager.java Fri Nov 13 18:36:22 2009 @@ -0,0 +1,218 @@ +/* + * 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.http.control; + +import java.lang.reflect.Field; +import java.net.URL; +import java.net.URLConnection; +import java.text.SimpleDateFormat; +import java.util.Date; +import java.util.List; +import java.util.Map; +import java.util.SimpleTimeZone; + +import org.apache.commons.httpclient.Header; +import org.apache.commons.httpclient.HttpMethod; +import org.apache.commons.httpclient.URI; +import org.apache.commons.httpclient.methods.PostMethod; +import org.apache.commons.httpclient.util.HttpURLConnection; +import org.apache.jmeter.junit.JMeterTestCase; +import org.apache.jmeter.protocol.http.control.CacheManager.CacheEntry; +import org.apache.jmeter.protocol.http.util.HTTPConstantsInterface; +import org.apache.jmeter.samplers.SampleResult; + +public class TestCacheManager extends JMeterTestCase { + + private static final String APACHE = http://jakarta.apache.org/;; + private static final String EXPECTED_ETAG = 0xCAFEBABEDEADBEEF; + private CacheManager cacheManager; + private String currentTimeInGMT; + private URL url; + private URI uri; + private URLConnection urlConnection; + private HttpMethod httpMethod; + private HttpURLConnection httpUrlConnection; + + public TestCacheManager(String name) { + super(name); + } + + public void setUp() throws Exception { + super.setUp(); + this.cacheManager = new CacheManager(); + SimpleDateFormat simpleDateFormat = new SimpleDateFormat(); + simpleDateFormat.setTimeZone(new SimpleTimeZone(0, GMT)); + simpleDateFormat.applyPattern(EEE, dd MMM HH:mm:ss z); + this.currentTimeInGMT = simpleDateFormat.format(new Date()); + this.uri = new URI(APACHE, false); + this.url = new URL(APACHE); + this.urlConnection = this.url.openConnection(); + this.httpMethod = new PostMethod(); + this.httpUrlConnection = new HttpURLConnection(this.httpMethod, this.url); + } + + protected void tearDown() throws Exception { + this.httpUrlConnection = null; + this.httpMethod = null; + this.urlConnection = null; + this.url = null; + this.uri = null; + this.cacheManager = null; + this.currentTimeInGMT = null; + super.tearDown(); + } + + public void testGetClearEachIteration() throws Exception { + assertFalse(Should default not to clear after each iteration., this.cacheManager.getClearEachIteration()); + this.cacheManager.setClearEachIteration(true); + assertTrue(Should be settable to clear after each iteration., this.cacheManager.getClearEachIteration()); + this.cacheManager.setClearEachIteration(false); + assertFalse(Should be settable not to clear after each iteration., this.cacheManager.getClearEachIteration()); + } + + public void testSaveDetailsWithEmptySampleResultGivesNoCacheEntry() throws Exception { + saveDetailsWithConnectionAndSampleResultWithResponseCode(); +
svn commit: r835951 - /jakarta/jmeter/trunk/test/src/org/apache/jmeter/protocol/http/control/TestCacheManager.java
Author: sebb Date: Fri Nov 13 18:38:14 2009 New Revision: 835951 URL: http://svn.apache.org/viewvc?rev=835951view=rev Log: Add missing @Override tags and remove unnecessary casts Modified: jakarta/jmeter/trunk/test/src/org/apache/jmeter/protocol/http/control/TestCacheManager.java Modified: jakarta/jmeter/trunk/test/src/org/apache/jmeter/protocol/http/control/TestCacheManager.java URL: http://svn.apache.org/viewvc/jakarta/jmeter/trunk/test/src/org/apache/jmeter/protocol/http/control/TestCacheManager.java?rev=835951r1=835950r2=835951view=diff == --- jakarta/jmeter/trunk/test/src/org/apache/jmeter/protocol/http/control/TestCacheManager.java (original) +++ jakarta/jmeter/trunk/test/src/org/apache/jmeter/protocol/http/control/TestCacheManager.java Fri Nov 13 18:38:14 2009 @@ -53,7 +53,8 @@ super(name); } - public void setUp() throws Exception { + @Override +public void setUp() throws Exception { super.setUp(); this.cacheManager = new CacheManager(); SimpleDateFormat simpleDateFormat = new SimpleDateFormat(); @@ -67,7 +68,8 @@ this.httpUrlConnection = new HttpURLConnection(this.httpMethod, this.url); } - protected void tearDown() throws Exception { + @Override +protected void tearDown() throws Exception { this.httpUrlConnection = null; this.httpMethod = null; this.urlConnection = null; @@ -180,16 +182,16 @@ return sampleResult; } - @SuppressWarnings(unchecked) private MapString, CacheManager.CacheEntry getThreadCache() throws Exception { Field threadLocalfield = CacheManager.class.getDeclaredField(threadCache); threadLocalfield.setAccessible(true); + @SuppressWarnings(unchecked) ThreadLocalMapString, CacheEntry threadLocal = (ThreadLocalMapString, CacheManager.CacheEntry) threadLocalfield.get(this.cacheManager); - return (MapString, CacheManager.CacheEntry) threadLocal.get(); + return threadLocal.get(); } private CacheManager.CacheEntry getThreadCacheEntry(String url) throws Exception { - return (CacheManager.CacheEntry) getThreadCache().get(url); + return getThreadCache().get(url); } private void saveDetailsWithHttpMethodAndSampleResultWithResponseCode(String responseCode) throws Exception { - To unsubscribe, e-mail: jmeter-dev-unsubscr...@jakarta.apache.org For additional commands, e-mail: jmeter-dev-h...@jakarta.apache.org
DO NOT REPLY [Bug 48163] JMeterTestCase for org.apache.jmeter.protocol.http.control.CacheManager
https://issues.apache.org/bugzilla/show_bug.cgi?id=48163 Sebb s...@apache.org changed: What|Removed |Added Status|NEW |NEEDINFO --- Comment #3 from Sebb s...@apache.org 2009-11-13 10:46:31 UTC --- The test fails with the following error: junit.framework.AssertionFailedError: No property entry found for property If-None-Match at junit.framework.Assert.fail(Assert.java:47) at junit.framework.Assert.assertTrue(Assert.java:20) at junit.framework.Assert.assertNotNull(Assert.java:214) at org.apache.jmeter.protocol.http.control.TestCacheManager.checkProperty(TestCacheManager.java:174) at org.apache.jmeter.protocol.http.control.TestCacheManager.testSetHeadersHttpURLConnectionWithSampleResultWithResponseCode200GivesCacheEntry(TestCacheManager.java:147) 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:592) at junit.framework.TestCase.runTest(TestCase.java:168) at junit.framework.TestCase.runBare(TestCase.java:134) at junit.framework.TestResult$1.protect(TestResult.java:110) at junit.framework.TestResult.runProtected(TestResult.java:128) at junit.framework.TestResult.run(TestResult.java:113) at junit.framework.TestCase.run(TestCase.java:124) at junit.framework.TestSuite.runTest(TestSuite.java:232) at junit.framework.TestSuite.run(TestSuite.java:227) at org.junit.internal.runners.JUnit38ClassRunner.run(JUnit38ClassRunner.java:83) at org.eclipse.jdt.internal.junit4.runner.JUnit4TestReference.run(JUnit4TestReference.java:46) at org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.java:38) at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:467) at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:683) at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:390) at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:197) Any idea what causes that? -- Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email --- You are receiving this mail because: --- You are the assignee for the bug. - To unsubscribe, e-mail: jmeter-dev-unsubscr...@jakarta.apache.org For additional commands, e-mail: jmeter-dev-h...@jakarta.apache.org
Re: How can I develop Java classes, to prepare and execute a .jmx file (JMeter scenario) and retrieve wanted texts from its response?
On 13/11/2009, rosiere shu.yi.eut...@gmail.com wrote: Hello, I did find JMeter's API rich and complex. However the example I explained (login password) is just a simplified scenario. In fact, it may take a long time (up to several hours) to retrieve a credit report, so I need an asynchronous mechanism, between my j2ee web app (I forgot to explain that it should be a j2ee web app) and credit agencies' web app. JMeter assumes synchronous requests, so this would be another difficulty. Besides, the way of searching conclusion in a credit report in HTML, is specific to each credit agency, and I would like to code them in different use cases, and use the JMeter's variable and regular expression extractor to retrieve the credit report id, its issue date and its status (accepted or refused), and at last store them in the database that backs also my j2ee web app. Given these requirements, should I use JMeter or simply a pure simple Java HTTP client, and what examples in JMeter can I learn from, in order to fullfill these requirements? Again: this is not a suitable use for JMeter. This is not a suitable application for JMeter; it will involve a lot of unnecessary work. You would be much better off using a Java HTTP library such as Apache HttpClient (http://hc.apache.org/httpcomponents-client/index.html) or perhaps HttpUnit (http://httpunit.sourceforge.net/) For example, this is a paragraph from my jmx file template that logs into an credit agency's web app with a login and a password: I shall replace programmatically @LOGIN and @PASSWORD with real credentials in my application, then generate a new jmx and execute it, and at last, run programmatically the new jmx and retrieve results (such as the id, date, content of a credit report). (The same process is only manually available on the credit agency's web app, and I would like to run it programmatically from a Java app.) With my best wishes, Rosière -- View this message in context: http://old.nabble.com/How-can-I-develop-Java-classes%2C-to-prepare-and-execute-a-.jmx-file-%28JMeter-scenario%29-and-retrieve-wanted-texts-from-its-response--tp26339888p26339888.html Sent from the JMeter - Dev mailing list archive at Nabble.com. - To unsubscribe, e-mail: jmeter-dev-unsubscr...@jakarta.apache.org For additional commands, e-mail: jmeter-dev-h...@jakarta.apache.org - To unsubscribe, e-mail: jmeter-dev-unsubscr...@jakarta.apache.org For additional commands, e-mail: jmeter-dev-h...@jakarta.apache.org -- View this message in context: http://old.nabble.com/How-can-I-develop-Java-classes%2C-to-prepare-and-execute-a-.jmx-file-%28JMeter-scenario%29-and-retrieve-wanted-texts-from-its-response--tp26339888p26341800.html Sent from the JMeter - Dev mailing list archive at Nabble.com. - To unsubscribe, e-mail: jmeter-dev-unsubscr...@jakarta.apache.org For additional commands, e-mail: jmeter-dev-h...@jakarta.apache.org - To unsubscribe, e-mail: jmeter-dev-unsubscr...@jakarta.apache.org For additional commands, e-mail: jmeter-dev-h...@jakarta.apache.org
Re: How can I develop Java classes, to prepare and execute a .jmx file (JMeter scenario) and retrieve wanted texts from its response?
Hello, I did find JMeter's API rich and complex. However the example I explained (login password) is just a simplified scenario. In fact, it may take a long time (up to several hours) to retrieve a credit report, so I need an asynchronous mechanism, between my j2ee web app (I forgot to explain that it should be a j2ee web app) and credit agencies' web app. Besides, the way of searching conclusion in a credit report in HTML, is specific to each credit agency, and I would like to code them in different use cases, and use the JMeter's variable and regular expression extractor to retrieve the credit report id, its issue date and its status (accepted or refused), and at last store them in the database that backs also my j2ee web app. Given these requirements, should I use JMeter or simply a pure simple Java HTTP client, and what examples in JMeter can I learn from, in order to fullfill these requirements? This is not a suitable application for JMeter; it will involve a lot of unnecessary work. You would be much better off using a Java HTTP library such as Apache HttpClient (http://hc.apache.org/httpcomponents-client/index.html) or perhaps HttpUnit (http://httpunit.sourceforge.net/) For example, this is a paragraph from my jmx file template that logs into an credit agency's web app with a login and a password: I shall replace programmatically @LOGIN and @PASSWORD with real credentials in my application, then generate a new jmx and execute it, and at last, run programmatically the new jmx and retrieve results (such as the id, date, content of a credit report). (The same process is only manually available on the credit agency's web app, and I would like to run it programmatically from a Java app.) With my best wishes, Rosière -- View this message in context: http://old.nabble.com/How-can-I-develop-Java-classes%2C-to-prepare-and-execute-a-.jmx-file-%28JMeter-scenario%29-and-retrieve-wanted-texts-from-its-response--tp26339888p26339888.html Sent from the JMeter - Dev mailing list archive at Nabble.com. - To unsubscribe, e-mail: jmeter-dev-unsubscr...@jakarta.apache.org For additional commands, e-mail: jmeter-dev-h...@jakarta.apache.org - To unsubscribe, e-mail: jmeter-dev-unsubscr...@jakarta.apache.org For additional commands, e-mail: jmeter-dev-h...@jakarta.apache.org -- View this message in context: http://old.nabble.com/How-can-I-develop-Java-classes%2C-to-prepare-and-execute-a-.jmx-file-%28JMeter-scenario%29-and-retrieve-wanted-texts-from-its-response--tp26339888p26341800.html Sent from the JMeter - Dev mailing list archive at Nabble.com. - To unsubscribe, e-mail: jmeter-dev-unsubscr...@jakarta.apache.org For additional commands, e-mail: jmeter-dev-h...@jakarta.apache.org
DO NOT REPLY [Bug 48163] JMeterTestCase for org.apache.jmeter.protocol.http.control.CacheManager
https://issues.apache.org/bugzilla/show_bug.cgi?id=48163 John Samford john.samf...@ithaka.org changed: What|Removed |Added Status|NEEDINFO|NEW --- Comment #4 from John Samford john.samf...@ithaka.org 2009-11-13 12:52:14 UTC --- I do not understand why this test is failing for you. As you can see, it's supposed to check that the entry in the CacheManager created by a call to saveDetails is used to set the connection's property list: the If-None-Match set to the etag value and the If-Modified-Since set to the current time. It runs on my machine! with a fresh copy of the CacheManager downloaded a few moments ago, only changing the visibility of the CacheEntry inner class. Clearly the CacheEntry found in setHeaders has no etag. Therefore, the CacheEntry whose etag is set earlier in the test through reflection must not be the same CacheEntry used by setHeaders, despite the fact that they are indexed by the URL. If I could duplicate the problem, I could debug it. I wouldn't ask you to do my work and step through the test to see where it gets off the track but I cannot see how to proceed otherwise. I'd be curious whether the CacheEntry manipulated in the test's initialization is the same object as that used by setHeaders and since it probably is not, how the heck another got there. Thoughts? John Samford -- Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email --- You are receiving this mail because: --- You are the assignee for the bug. - To unsubscribe, e-mail: jmeter-dev-unsubscr...@jakarta.apache.org For additional commands, e-mail: jmeter-dev-h...@jakarta.apache.org
DO NOT REPLY [Bug 48163] JMeterTestCase for org.apache.jmeter.protocol.http.control.CacheManager
https://issues.apache.org/bugzilla/show_bug.cgi?id=48163 --- Comment #5 from Sebb s...@apache.org 2009-11-13 13:53:05 UTC --- (In reply to comment #4) I do not understand why this test is failing for you. As you can see, it's supposed to check that the entry in the CacheManager created by a call to saveDetails is used to set the connection's property list: the If-None-Match set to the etag value and the If-Modified-Since set to the current time. It runs on my machine! with a fresh copy of the CacheManager downloaded a few moments ago, only changing the visibility of the CacheEntry inner class. That should not be necessary, as I've already fixed that, so maybe you have not downloaded the current code. Clearly the CacheEntry found in setHeaders has no etag. Not according to the way I read the code - it is checking the properties which are obtained from this.httpUrlConnection.getRequestProperties(); Therefore, the CacheEntry whose etag is set earlier in the test through reflection must not be the same CacheEntry used by setHeaders, despite the fact that they are indexed by the URL. If I could duplicate the problem, I could debug it. I wouldn't ask you to do my work and step through the test to see where it gets off the track but I cannot see how to proceed otherwise. I'd be curious whether the CacheEntry manipulated in the test's initialization is the same object as that used by setHeaders and since it probably is not, how the heck another got there. Thoughts? See above; can you try downloading the current code from trunk? John Samford -- Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email --- You are receiving this mail because: --- You are the assignee for the bug. - To unsubscribe, e-mail: jmeter-dev-unsubscr...@jakarta.apache.org For additional commands, e-mail: jmeter-dev-h...@jakarta.apache.org
DO NOT REPLY [Bug 48163] JMeterTestCase for org.apache.jmeter.protocol.http.control.CacheManager
https://issues.apache.org/bugzilla/show_bug.cgi?id=48163 --- Comment #6 from Sebb s...@apache.org 2009-11-13 13:58:34 UTC --- One other point - it would be better if the CacheManager could be tested without requiring internet access. -- Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email --- You are receiving this mail because: --- You are the assignee for the bug. - To unsubscribe, e-mail: jmeter-dev-unsubscr...@jakarta.apache.org For additional commands, e-mail: jmeter-dev-h...@jakarta.apache.org
svn commit: r836014 - in /jakarta/jmeter/trunk: src/protocol/jms/org/apache/jmeter/protocol/jms/sampler/Receiver.java xdocs/changes.xml
Author: sebb Date: Fri Nov 13 21:59:56 2009 New Revision: 836014 URL: http://svn.apache.org/viewvc?rev=836014view=rev Log: Bug 47992 - JMS Point-to-Point Request - Response option doesn't work Modified: jakarta/jmeter/trunk/src/protocol/jms/org/apache/jmeter/protocol/jms/sampler/Receiver.java jakarta/jmeter/trunk/xdocs/changes.xml Modified: jakarta/jmeter/trunk/src/protocol/jms/org/apache/jmeter/protocol/jms/sampler/Receiver.java URL: http://svn.apache.org/viewvc/jakarta/jmeter/trunk/src/protocol/jms/org/apache/jmeter/protocol/jms/sampler/Receiver.java?rev=836014r1=836013r2=836014view=diff == --- jakarta/jmeter/trunk/src/protocol/jms/org/apache/jmeter/protocol/jms/sampler/Receiver.java (original) +++ jakarta/jmeter/trunk/src/protocol/jms/org/apache/jmeter/protocol/jms/sampler/Receiver.java Fri Nov 13 21:59:56 2009 @@ -81,7 +81,7 @@ if (reply.getJMSCorrelationID() == null) { log.warn(Received message with correlation id null. Discarding message ...); } else { - MessageAdmin.getAdmin().putReply(reply.getJMSMessageID(), reply); + MessageAdmin.getAdmin().putReply(reply.getJMSCorrelationID(), reply); } } Modified: jakarta/jmeter/trunk/xdocs/changes.xml URL: http://svn.apache.org/viewvc/jakarta/jmeter/trunk/xdocs/changes.xml?rev=836014r1=836013r2=836014view=diff == --- jakarta/jmeter/trunk/xdocs/changes.xml (original) +++ jakarta/jmeter/trunk/xdocs/changes.xml Fri Nov 13 21:59:56 2009 @@ -77,6 +77,7 @@ liBug 47870 - JMSSubscriber fails due to NPE/li liBug 47899 - NullPointerExceptions in ReceiveSubscriber constructor/li liBug 48144 - NPE in OnMessageSubscriber/li +liBug 47992 - JMS Point-to-Point Request - Response option doesn't work/li /ul h3Controllers/h3 - To unsubscribe, e-mail: jmeter-dev-unsubscr...@jakarta.apache.org For additional commands, e-mail: jmeter-dev-h...@jakarta.apache.org
DO NOT REPLY [Bug 47992] JMS Point-to-Point Request - Response option doesn't work for me
https://issues.apache.org/bugzilla/show_bug.cgi?id=47992 Sebb s...@apache.org changed: What|Removed |Added Status|NEW |RESOLVED Resolution||FIXED --- Comment #3 from Sebb s...@apache.org 2009-11-13 14:00:57 UTC --- Thanks, fixed in SVN: URL: http://svn.apache.org/viewvc?rev=836014view=rev Log: Bug 47992 - JMS Point-to-Point Request - Response option doesn't work -- Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email --- You are receiving this mail because: --- You are the assignee for the bug. - To unsubscribe, e-mail: jmeter-dev-unsubscr...@jakarta.apache.org For additional commands, e-mail: jmeter-dev-h...@jakarta.apache.org
DO NOT REPLY [Bug 48155] Multiple problems / enhancements with JMS protocol classes.
https://issues.apache.org/bugzilla/show_bug.cgi?id=48155 Sebb s...@apache.org changed: What|Removed |Added Status|NEW |NEEDINFO --- Comment #2 from Sebb s...@apache.org 2009-11-13 14:41:29 UTC --- Thanks for the suggestions. Unfortunately they cannot be applied as they stand, as the source code has changed, and the changes are provided as full source files which no longer provide sensible differences. Please can you provide the changes as patches in unified difference format? Ideally against the current version in SVN, but even differences from the source you based your changes on would probably be OK. -- Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email --- You are receiving this mail because: --- You are the assignee for the bug. - To unsubscribe, e-mail: jmeter-dev-unsubscr...@jakarta.apache.org For additional commands, e-mail: jmeter-dev-h...@jakarta.apache.org
DO NOT REPLY [Bug 47938] Adding some French translations for new elements and some better meaning to other elements
https://issues.apache.org/bugzilla/show_bug.cgi?id=47938 --- Comment #2 from Milamber milambersp...@gmail.com 2009-11-13 14:59:19 UTC --- Please, don't forget this translation patch for French people. Thanks -- Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email --- You are receiving this mail because: --- You are the assignee for the bug. - To unsubscribe, e-mail: jmeter-dev-unsubscr...@jakarta.apache.org For additional commands, e-mail: jmeter-dev-h...@jakarta.apache.org
svn commit: r836068 - in /jakarta/jmeter/trunk: src/components/org/apache/jmeter/assertions/CompareAssertionResources_fr.properties src/core/org/apache/jmeter/resources/messages_fr.properties xdocs/ch
Author: sebb Date: Sat Nov 14 00:05:16 2009 New Revision: 836068 URL: http://svn.apache.org/viewvc?rev=836068view=rev Log: Bug 47938 - Adding some French translations for new elements Added: jakarta/jmeter/trunk/src/components/org/apache/jmeter/assertions/CompareAssertionResources_fr.properties (with props) Modified: jakarta/jmeter/trunk/src/core/org/apache/jmeter/resources/messages_fr.properties jakarta/jmeter/trunk/xdocs/changes.xml Added: jakarta/jmeter/trunk/src/components/org/apache/jmeter/assertions/CompareAssertionResources_fr.properties URL: http://svn.apache.org/viewvc/jakarta/jmeter/trunk/src/components/org/apache/jmeter/assertions/CompareAssertionResources_fr.properties?rev=836068view=auto == --- jakarta/jmeter/trunk/src/components/org/apache/jmeter/assertions/CompareAssertionResources_fr.properties (added) +++ jakarta/jmeter/trunk/src/components/org/apache/jmeter/assertions/CompareAssertionResources_fr.properties Sat Nov 14 00:05:16 2009 @@ -0,0 +1,24 @@ +# 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. + +compareChoices.displayName=Type de comparaison +compareContent.displayName=Contenu +compareContent.shortDescription=V\u00E9rifie que tous les \u00E9chantillons fils d'un contr\u00F4leur retournent les m\u00EAmes donn\u00E9es +compareTime.displayName=Temps de r\u00E9ponse (ms) +compareTime.shortDescription=V\u00E9rifie que tous les \u00E9chantillons fils d'un contr\u00F4leur sont retourn\u00E9s dans un nombre donn\u00E9 de millisecondes +comparison_filters.displayName=Filtres de comparaison +displayName=Assertion Comparaison +stringsToSkip.displayName=Substitutions par expressions r\u00E9guli\u00E8res +stringsToSkip.shortDescription=Expressions r\u00E9guli\u00E8res pour substituer des \u00E9l\u00E9ments dans les donn\u00E9es de r\u00E9ponses avant la comparaison Propchange: jakarta/jmeter/trunk/src/components/org/apache/jmeter/assertions/CompareAssertionResources_fr.properties -- svn:eol-style = native Modified: jakarta/jmeter/trunk/src/core/org/apache/jmeter/resources/messages_fr.properties URL: http://svn.apache.org/viewvc/jakarta/jmeter/trunk/src/core/org/apache/jmeter/resources/messages_fr.properties?rev=836068r1=836067r2=836068view=diff == --- jakarta/jmeter/trunk/src/core/org/apache/jmeter/resources/messages_fr.properties (original) +++ jakarta/jmeter/trunk/src/core/org/apache/jmeter/resources/messages_fr.properties Sat Nov 14 00:05:16 2009 @@ -22,6 +22,7 @@ add_test=Ajout add_user=Ajouter un utilisateur add_value=Ajouter valeur +addtest=Ajout aggregate_graph=Graphique des statistiques aggregate_graph_column=Colonne aggregate_graph_display=G\u00E9n\u00E9rer le graphique @@ -58,10 +59,10 @@ argument_must_not_be_negative=L'argument ne peut pas \u00EAtre n\u00E9gatif \! assertion_assume_success=Ignorer le statut assertion_code_resp=Code de r\u00E9ponse -assertion_contains=Contient -assertion_equals=Est \u00E9gale \u00E0 +assertion_contains=Contient (exp. r\u00E9guli\u00E8re) +assertion_equals=Est \u00E9gale \u00E0 (texte brut) assertion_headers=Ent\u00EAtes de r\u00E9ponse -assertion_matches=Correspond \u00E0 +assertion_matches=Correspond \u00E0 (exp. r\u00E9guli\u00E8re) assertion_message_resp=Message de r\u00E9ponse assertion_not=Inverser assertion_pattern_match_rules=Type de correspondance du motif @@ -71,18 +72,20 @@ assertion_scope_all=L'\u00E9chantillon parent et ses sous-\u00E9chantillons assertion_scope_children=Seulement les sous-\u00E9chantillons assertion_scope_parent=Seulement l'\u00E9chantillon parent -assertion_substring=Commence par +assertion_substring=Contient (texte brut) assertion_text_resp=Texte de r\u00E9ponse assertion_textarea_label=Assertions \: assertion_title=Assertion R\u00E9ponse assertion_url_samp=URL Echantillon assertion_visualizer_title=R\u00E9sultats d'assertion +attribute=Attribut \: +attrs=Attributs auth_base_url=URL de base auth_manager_title=Gestionnaire d'autorisation HTTP auths_stored=Autorisations
DO NOT REPLY [Bug 47938] Adding some French translations for new elements and some better meaning to other elements
https://issues.apache.org/bugzilla/show_bug.cgi?id=47938 Sebb s...@apache.org changed: What|Removed |Added Status|NEW |RESOLVED Resolution||FIXED --- Comment #3 from Sebb s...@apache.org 2009-11-13 16:07:46 UTC --- URL: http://svn.apache.org/viewvc?rev=836068view=rev Log: Bug 47938 - Adding some French translations for new elements -- Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email --- You are receiving this mail because: --- You are the assignee for the bug. - To unsubscribe, e-mail: jmeter-dev-unsubscr...@jakarta.apache.org For additional commands, e-mail: jmeter-dev-h...@jakarta.apache.org
DO NOT REPLY [Bug 48155] Multiple problems / enhancements with JMS protocol classes.
https://issues.apache.org/bugzilla/show_bug.cgi?id=48155 --- Comment #3 from martinrl martinrl...@yahoo.com 2009-11-13 17:12:23 UTC --- I'm a newbie to submitting patch suggestions. I am attaching a ZIP file with the original and fixed files in separate folders. If you need me to do more, please let me know. I want to contribute in whatever way I can. Thank you for such a great tool! I am still learning it, but I see it as a very valuable tool, thank you very much! -- Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email --- You are receiving this mail because: --- You are the assignee for the bug. - To unsubscribe, e-mail: jmeter-dev-unsubscr...@jakarta.apache.org For additional commands, e-mail: jmeter-dev-h...@jakarta.apache.org
DO NOT REPLY [Bug 48155] Multiple problems / enhancements with JMS protocol classes.
https://issues.apache.org/bugzilla/show_bug.cgi?id=48155 --- Comment #4 from martinrl martinrl...@yahoo.com 2009-11-13 17:13:50 UTC --- Created an attachment (id=24531) -- (https://issues.apache.org/bugzilla/attachment.cgi?id=24531) Patches with original source -- Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email --- You are receiving this mail because: --- You are the assignee for the bug. - To unsubscribe, e-mail: jmeter-dev-unsubscr...@jakarta.apache.org For additional commands, e-mail: jmeter-dev-h...@jakarta.apache.org
DO NOT REPLY [Bug 48155] Multiple problems / enhancements with JMS protocol classes.
https://issues.apache.org/bugzilla/show_bug.cgi?id=48155 --- Comment #5 from martinrl martinrl...@yahoo.com 2009-11-13 17:23:00 UTC --- I re-read your response, what is a unified different format? Can you point me to a URL explaining how to do this? The files I provided can be diffd against each other. They are the original 2.3.4 source and the fixed source files. Please let me know if you want me to do something different. -- Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email --- You are receiving this mail because: --- You are the assignee for the bug. - To unsubscribe, e-mail: jmeter-dev-unsubscr...@jakarta.apache.org For additional commands, e-mail: jmeter-dev-h...@jakarta.apache.org
DO NOT REPLY [Bug 48155] Multiple problems / enhancements with JMS protocol classes.
https://issues.apache.org/bugzilla/show_bug.cgi?id=48155 Sebb s...@apache.org changed: What|Removed |Added Status|NEEDINFO|NEW --- Comment #6 from Sebb s...@apache.org 2009-11-13 18:50:47 UTC --- (In reply to comment #5) I re-read your response, what is a unified different format? Can you point me to a URL explaining how to do this? http://www.apache.org/dev/contributors.html#patches -- Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email --- You are receiving this mail because: --- You are the assignee for the bug. - To unsubscribe, e-mail: jmeter-dev-unsubscr...@jakarta.apache.org For additional commands, e-mail: jmeter-dev-h...@jakarta.apache.org
DO NOT REPLY [Bug 48155] Multiple problems / enhancements with JMS protocol classes.
https://issues.apache.org/bugzilla/show_bug.cgi?id=48155 martinrl martinrl...@yahoo.com changed: What|Removed |Added Attachment #24503|0 |1 is obsolete|| Attachment #24531|0 |1 is obsolete|| --- Comment #7 from martinrl martinrl...@yahoo.com 2009-11-13 19:50:25 UTC --- Created an attachment (id=24532) -- (https://issues.apache.org/bugzilla/attachment.cgi?id=24532) Proposed patches Thanks for guide on patches. Here's the resulting patch file. -- Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email --- You are receiving this mail because: --- You are the assignee for the bug. - To unsubscribe, e-mail: jmeter-dev-unsubscr...@jakarta.apache.org For additional commands, e-mail: jmeter-dev-h...@jakarta.apache.org