> Incidentally, Mike, it would seem to me that the interaction from the gui > down to the underlying Sampler object involves many objects. I want to > intercept the HTTP Request controller behavior at a couple of points. > First, in the gui I want to take in a file location for the apache log to > use, as well as the domain of the server to test, but I no longer need the > 'path' info. Second I want the path info to no longer come from the gui, > but rather to come from a new line of the log for each request that is made. > I am currently trying to trace the code from gui to sampler, but there is a > lot there and it's all new to me. I am positive that it would be faster to > simply pick your brain for the answers, but I realize that you are, of > course, a busy man.....
Indeed, and I am currently taking a break from JMeter. But, helping you is no problem. It's probably simpler than it looks. You shouldn't need to change HTTPSampler in any way - it already does everything you need, which is generate an HTTP request. The gui, however, only generates a single HTTPSampler object to test (see the createTestElement() method). You want to read a file and create many HTTPSampler objects. This is not accounted for in the current framework, I suggest you do the following. Create a new Sampler - call it ServerLogSampler, or whatever. Create a simple GUI class (that extends org.apache.jmeter.samplers.gui.AbstractSamplerGui) that has a simple field for the user to enter the filename of the server log. In your createTestElement() method, create your ServerLogSampler and hand it the file handle. In ServerLogSampler, extend org.apache.jmeter.sampler.AbstractSampler. Do the work necessary to parse the server log, creating a list of HTTPSampler objects (These objects are easy to create, use the setPath(), setDomain(), addArgument() etc methods). When you implement the sample(Entry) method, call the sample(Entry) method of each HTTPSampler object in your list in turn, returning the SampleResult object each time. The ServerLogSampler will have to implement PerThreadClonable for this to work, because you'll have to save state for each thread (ie, you'll have to save which element in the list you're currently on, and increment each time). But you don't have to write the clone() method - that's taken care of when you extend AbstractSampler. This may sound like a lot, but it really isn't. The hardest part will be parsing the server log - particularly since I will be happy to look over your code and point things out. -Mike > > Thanks, > Jason > > -- Michael Stover [EMAIL PROTECTED] Yahoo IM: mstover_ya ICQ: 152975688 -- To unsubscribe, e-mail: <mailto:[EMAIL PROTECTED]> For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>

