----- Original Message ----- 
From: "Vincent Partington" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Tuesday, January 06, 2004 9:49 AM
Subject: Response data written to results XML file


> Hi,
>
> (I see I'm having trouble getting my point across about response data
> showing up in the results.jtl XML file, so I made a more comprehensive
> test case and included a fix.)
>

Thanks for recapping and providing the test cases.
[I've been meaning to look at this for a while ...]

> I think there is a bug in JMeter where sometimes response data is
> written to the results.jtl XML file when run in non-GUI mode. This
> causes problems because it is not correclty encoded (the UTF-8 fix
> Jordei implemented solves part of it, but still non-XML data shows up)
> and it does not seem to serve a useful purpose.

I entirely agree. It also messes up the Tree and Assertion Listeners in GUI mode.

[...]

> For some reason a check is first made to see whether the sample was
> succesful before the assertion is actually checked. If the sample was
> not succesfull (either because there was an error executing the request
> or because an earlier assertion failed), the failure message is set to
> the response data and a failure is reported.
>
> Now I have two questions:
> 1) Why is this check made?

I suspect this was done to avoid runtime errors - if the sample failed, it does not 
make much sense to check the contents.

However, sample "failure" can be caused by either actual sample failure (e.g. 404 
error) or a previous Assertion that failed - these
are rather different, but there is only a single flag.

> 2) If this check is necessary, why is the failure message not set to
> something like "Cannot assert response when sample was not succesfull"?

I'm not sure that the check is necessary - or if it is, perhaps it should be done at a 
higher level (in JMeterThread) - does it make
sense for Response Assertions to take account of sample "failure" when none of the 
others do?

[...]

Response Assertion treats null reponseData as an empty response, so this does not need 
to be checked.

==

It seems to me that we need a little rethink on what the Assertion behaviour should be 
(*) ... meanwhile I will comment out the
check, so that the Response Assertion behaves like the other assertions.

(*) To consider:
- should failed samples be subject to assertion checking at all?
- or should assertions have a flag to say whether they should be applied to failed 
samples ?

- should the first assertion failure cause subsequent assertions to be skipped ?
- or should an assertion have a flag to skip it if a previous assertion failed ?

S.


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to