On 23/10/06, Philip Peake <[EMAIL PROTECTED]> wrote:
I have a number of username/password pairs. Some of these are known to
be bad and need to be reset. Exactly which ones, and how many is unknown.
I have a very simple script to run through these and try a login:
TestPlan
Threads
Username/Password (read from file)
HTTP Cookie headers
HTTP Request defaults
HTTP Request (Login screen)
HTTP Request (Submit login)
Response assertion
Result action handler (continue)
No need for this; the default action is continue anyway
View results tree
Aggregate graph
Now, I originally thought I could log only errors in the "view results
tree" listener, and log to a file. Unfortunately, it logs only results,
and although the information is in the GUI display there seems no way to
log most of it.
The Configure button can be used to change the fields that are logged.
However, if the response does not contain the id, then at present
there is no way to add a variable to the output.
Depending on your application, you may be able to add some dummy
information to the URL. Or you could try adding the user id to the
submit login screen sampler label.
All I want to do is log ${username} to a file when the "Submit Login"
returns an error, as detected by the "Response Assertion" element.
Please don't say BeanShell -- maybe its just my unfamiliarity with Java,
but that just does not work. There are no working examples that I can
find, and even when I did get a trivial test working (took days ...) it
There are some basic examples in the documentation and the extras
directory, but BeanShell is intended for those familiar with Java.
doesn't work as defined in the documentation (ordering issues).
That is a generic JMeter bug - nothing to do with BeanShell...
The _log() function looked promising -- but I can't find any element
which allows me to test the result status with a field which will take a
function.
You can put the __log() function anywhere that you can use a variable.
How do I do this? It seems sucha fundamental thing to want to do that I
assume there must be a way...
See above.
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]