> En/na Vincent Partington ha escrit:
>> Hi,
>>
>> The class ResponseAssertion (in ApacheJMeter 1.9.1) has the following
>> bit of code:
>>
>> public AssertionResult getResult(SampleResult response)
>> {
>> AssertionResult result;
>> if (!response.isSuccessful())
>> {
>> result = new AssertionResult();
>> result.setError(true);
>> result.setFailureMessage(
>> new String((byte[]) response.getResponseData()));
>> return result;
>> }
>> result = evaluateResponse(response);
>> return result;
>> }
> Can you be more specific as to the problems it causes?
When a response assertion fails normally, it returns a failure message
such as "Test Failed, expected to contain MAGICSTRINGVALUE". However, when
an earlier assertion caused the sample result to be flagged as not
succesful, the response assertion returns "error=true" _and_ returns the
complete response data (be it HTML or binaryr data) as the failure
message.
That in turn can cause binary data to be inserted into the results XML
file (when jmeter.save.saveservice.assertion_results=all in
jmeter.properties). And then we get to the whole jorphan.io.TextFile can
of worms we are discussing in the other thread. :)
I don't see the purpose of this piece of code, but if it were left in, I
would strongly suggest setting the failure message to something like "Test
failed, sample cannot be relied upon".
Regards, Vincent.
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]