smartrics / jmeterrestsampler Goto Github PK
View Code? Open in Web Editor NEWA JMeter sampler for testing REST services.
Home Page: http://smartrics.blogspot.com/2009/04/jmeter-to-test-robustness-of-system.html
A JMeter sampler for testing REST services.
Home Page: http://smartrics.blogspot.com/2009/04/jmeter-to-test-robustness-of-system.html
When attempting to compile the code using ant, on line 195 of RestSampler.java, the method name setDefaultRequestHeaders(httpMethod); was not found. Changed it to setRequestHeaders(httpMethod.getRequestHeaders().toString()); and it compiled and seems to work.
RestSampler stopped working when I upgraded to JMeter 2.5.1.
I tracked this down to an API incompatibility in HTTPSampler2 that was introduced to some extent inadvertently (http://markmail.org/message/ztzijaqlccgxz2wz).
This has been fixed by JMeter folks, see https://issues.apache.org/bugzilla/show_bug.cgi?id=52371
However, there was a call from RestSampler to its superclass' (HTTPSampler2) method setDefaultRequestHeaders, which has been completely removed. This method was empty, however, so all that's needed on RestSampler side is to remove the method call.
[assuming this is the place to post questions; would 'blogspot' be a better place?]
I'm using a verb, say, VERB, which happens to be based on POST. How do I send VERB instead of POST?
Thank you..
Hello,
Do you have rest sampler that works with jmeter3.1? I am using a rest sampler but it is not working with jmeter 3.1. I t worked with 3.1 though.
I am getting the following error.
2017/01/09 17:37:01 ERROR - jmeter.threads.JMeterThread: Test failed! java.lang.NoSuchMethodError: smartrics.jmeter.sampler.RestSampler.readResponse(Lorg/apache/jmeter/samplers/SampleResult;Ljava/io/InputStream;I)[B
at smartrics.jmeter.sampler.RestSampler.sample(Unknown Source)
at org.apache.jmeter.protocol.http.sampler.HTTPSamplerBase.sample(HTTPSamplerBase.java:1166)
at org.apache.jmeter.protocol.http.sampler.HTTPSamplerBase.sample(HTTPSamplerBase.java:1155)
at org.apache.jmeter.threads.JMeterThread.executeSamplePackage(JMeterThread.java:475)
at org.apache.jmeter.threads.JMeterThread.processSampler(JMeterThread.java:418)
at org.apache.jmeter.threads.JMeterThread.run(JMeterThread.java:249)
at java.lang.Thread.run(Thread.java:745)
Thanks.
This observation is based on a strack trace in jmeter.log that says it cannot perform the default headers setup
jmeter.threads.JMeterThread: Test failed! java.lang.NoSuchMethodError: smartrics.jmeter.sampler.RestSampler.setDefaultRequestHeaders(Lorg/apache/commons/httpclient/HttpMethod;)V
(i am using 2.5)
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.