Bug 52199 - Http Mock Server & Http Callback Assertions
Summary: Http Mock Server & Http Callback Assertions
Status: NEW
Alias: None
Product: JMeter
Classification: Unclassified
Component: HTTP (show other bugs)
Version: unspecified
Hardware: All All
: P2 enhancement (vote)
Target Milestone: ---
Assignee: JMeter issues mailing list
URL:
Keywords: PatchAvailable
Depends on:
Blocks:
 
Reported: 2011-11-16 15:34 UTC by Gerard Dougan
Modified: 2013-02-09 21:58 UTC (History)
1 user (show)



Attachments
source files (27.10 KB, application/zip)
2011-11-16 15:34 UTC, Gerard Dougan
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Gerard Dougan 2011-11-16 15:34:23 UTC
Created attachment 27957 [details]
source files

Add the ability to specify a HTTP mock server, providing canned responses to predefined request types.
Add the ability to provide assertions predicated on a HTTP callback e.g. in the case where the system being tested should send the caller a delivery receipt.

Attached is a full eclipse project zip containing all source files for the aforementioned features.  The source depends on the Java 6 com.sun.net.httpserver package as the method for exposing mock server and callback facilities.

The project also contains a MockServerSample.jmx file which illustrates usage of the mock server component.

Thanks
Gerard
Comment 1 Sebb 2011-11-16 18:03:24 UTC
The code uses com.sun.net.httpserver.HttpServer which appears to require Java 1.6.
It also (presumably) requires the use of a Sun/Oracle JVM.

At present JMeter still targets Java 1.5, and is targetted at all compliant JVMs, not just Sun/Oracle.

Sorry, but at present it appears that the code cannot be included in JMeter.

==

Also, there are some @author tags in the source code.
These are generally not used in ASF code.
This is partly because ASF code is written by the community, and partly because the tag quickly becomes meaningless when the code is updated.

We would need your permission to remove these before committing - assuming that the other issues can be solved.
Comment 2 Gerard Dougan 2011-11-16 18:39:40 UTC
Feel free to remove the @author tags. 

On the http server piece, that was my bad in not checking the vm compliance of jmeter. I try to never use com.sun classes and only did so in this case as it was the path of least resistance for the project that required the features. 

I can have a look at refactoring that code to use the same server mechanism as the mirror server if needs be. 

I appreciate your patience (this is my first addition to an apache project)