jmeter-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From yaroslav1 <slavk...@yahoo.com>
Subject Re: how to "assert" "Mail Reader Sample"
Date Tue, 30 Dec 2008 21:11:55 GMT

Sorry, I'm not expert, but it gives me an error: 

print("ResponseData=" . . . '' : Typed variable declaration : Class:
SampleResult not found in namespace

when I entered the line (SampleResult[] results = Response.getSubResults();)
in beanshell script.
Without the line - there is no error :(

Here is my full script:
--------
print("ctx.getPreviousResult=" + ctx.getPreviousResult());
print("ResponseData=" + ResponseData);
print ("ResponseCode=" + ResponseCode);
print ("ResponseMessage=" + ResponseMessage);
print ("ResponseHeader=" + ResponseHeader);
print ("RequestHeaders=" + RequestHeaders);
print ("SampleLabel=" + SampleLabel);
print ("SampleData=" + SampleData);
print ("ctx=" + ctx);
print ("SampleResult=" + SampleResult);
print ("vars=" + vars);
print ("log=" + log);

byte [] arr = (byte[]) ResponseData;

SampleResult[] results = Response.getSubResults();

String str = new String(arr);
//String str1 = new String(results);
print ("arr=" + str);
//print ("arr1=" + str1);
------------




sebb-2-2 wrote:
> 
> On 30/12/2008, yaroslav1 <slavko_h@yahoo.com> wrote:
>>
>>  From 2.3.2 release notes I've found: "Individual mails are now added as
>>  sub-samples. "
>>
>>  I'm using the sample and beanshell-assertion, but a result is arr=1
>> message
>>  found (see code below)
>>
>>  byte [] arr = (byte[]) ResponseData ;
>>  String str = new String(arr);
>>  print ("arr=" + str);
>>
>>  result is: "arr=1 message found"
>>
>>  But this is "RespondData" from the mail-reader-sample.
>>
>>  I need a "RespondData" from "Message 1" sub-sample.
>>
>>  See images below.
>>
>>  How can I get it?
> 
> You'll need to look at the sub-samples using
> 
> SampleResult[] results = Response.getSubResults();
> 
>>  http://www.nabble.com/file/p21222518/Slava_ScreenShot015.jpg
>>
>>
>>  http://www.nabble.com/file/p21222518/Slava_ScreenShot016.jpg
>>
>>
>>  --
>>  View this message in context:
>> http://www.nabble.com/how-to-%22assert%22-%22Mail-Reader-Sample%22-tp21222518p21222518.html
>>  Sent from the JMeter - User mailing list archive at Nabble.com.
>>
>>
>>  ---------------------------------------------------------------------
>>  To unsubscribe, e-mail: jmeter-user-unsubscribe@jakarta.apache.org
>>  For additional commands, e-mail: jmeter-user-help@jakarta.apache.org
>>
>>
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: jmeter-user-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: jmeter-user-help@jakarta.apache.org
> 
> 
> 

-- 
View this message in context: http://www.nabble.com/how-to-%22assert%22-%22Mail-Reader-Sample%22-tp21222518p21223210.html
Sent from the JMeter - User mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: jmeter-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: jmeter-user-help@jakarta.apache.org


Mime
View raw message