Not familiar with the interaction of squirrelmail.. or how you are doing your test (why would the client know or have access to the server's filesystem at all?) but if the server is generating some value you wish to use again.. the general theory is you must extract the server generated value from the response message and feed that into your later samples.
Presumably you are posting something with the file... which the server returns a response. Then you must use a post-processing element to extract the value you need (like a regex extractor) and then put that value into your next sample. Unfortunately your description doesn't help explain the client/server interaction you are doing - so can't be more descriptive then that. -----Original Message----- From: Jmeter_User [mailto:[email protected]] Sent: Thursday, January 22, 2009 9:10 AM To: [email protected] Subject: Squirrelmail attachment error when combined with jmeter to send attachments multiple times Apologies for the lengthy mail. I am trying to explain the problem in detail. I need help badly to solve the below problem. Any suggestion is appreciated. We are recording the scenario of sending a mail with attachment through Squirrel mail Using Jmeter. Our intension is to send many mails using Jmeter and Squirrelmail. While recording, I attached the file and sent. It got recorded successfully. But when I start running the script using jmeter, I am getting error because the file name is hard coded in script and its not able to find the same name again. The file name will be created on the fly in squirrelmail and will be stored for the section “attach file” . The sample attach file is below. a:1:{i:0;O:7:"Message":21:{s:13:"rfc822_header";s:0:"";s:19:"reply_rfc822_header";s:0:"";s:11:"mime_header";O:13:"MessageHeader":10:{s:5:"type0";s:11:"application";s:5:"type1";s:12:"octet-stream";s:10:"parameters";a:1:{s:4:"name";s:10:"jmeter.log";}s:2:"id";i:0;s:11:"description";s:0:"";s:8:"encoding";s:0:"";s:4:"size";i:0;s:3:"md5";s:0:"";s:11:"disposition";O:11:"Disposition":2:{s:4:"name";s:10:"attachment";s:10:"properties";a:1:{s:8:"filename";s:10:"jmeter.log";}}s:8:"language";s:0:"";}s:5:"flags";s:0:"";s:5:"type0";s:0:"";s:5:"type1";s:0:"";s:8:"entities";a:0:{}s:9:"entity_id";s:0:"";s:10:"parent_ent";N;s:6:"entity";N;s:6:"parent";s:0:"";s:12:"decoded_body";s:0:"";s:7:"is_seen";i:0;s:11:"is_answered";i:0;s:10:"is_deleted";i:0;s:10:"is_flagged";i:0;s:10:"is_mdnsent";i:0;s:9:"body_part";s:0:"";s:6:"offset";i:0;s:6:"length";i:0;s:14:"att_local_name";s:32:"1ajDgYkgMQoKBVkC2xkTbUF5yScvcHlA";}} What squirrelmail basically does is, it copies the attached file and store it in its configured attachment directory. The name of the file stored in attachment directory wont be same as file name. It stores the file name in 32 characters. For eg: 1ajDgYkgMQoKBVkC2xkTbUF5yScvcHlA, which is given above as part of the attach file. The files listed in attachment directory are ### ls -l rw------- 1 _www staff 13970 Jan 22 04:47 0VIpOBdvcpYkGqCtd2Lvhs8B0o7HfW8A -rw------- 1 _www staff 5853 Jan 22 04:12 BoALKfX8ENj1bXBZYUIoxRMO06tOgAKz -rw------- 1 _www staff 18860 Jan 22 05:24 LC6BvjJzlfVJKojTcNIiVO3TX6LRQ0Lz -rw------- 1 _www staff 10058 Jan 22 04:38 LZ44HTqSqju1VSEpbTTc21VOSW0dnLs2 So when I start running, basically the script will attach again the same file, but it will store in squirrelmail attach directory with on the fly created file name (some 32 characters file name), which is not known to the script, as it is created on the fly. And the script fails because it tries to open the file which is hard coded in the script. I get the below error: > Warning: > fopen(/Library/WebServer/Documents/squirrelmail/attach/1ajDgYkgMQoKBVkC2xkTbUF5yScvcHlA) > [function.fopen]: failed to open stream: No such file or directory in > /Library/WebServer/Documents/squirrelmail/class/deliver/Deliver.class.php > on line 307 It wont find the above file because it will be deleted from attachment directory once its sent successfully. I presume I need to do some kind of correlation for attach file section. So that jmeter will pick the newly created file and attach it. I need help in correlating it so that, if I run the script multiple times, jmeter and squirrelmail should be able to send each time, the same file again and again. How can I do that? I tried modifying the attach file for that 32 characters and replaced with regular expression “(.+?)”. But I am getting the below error: Notice: unserialize() [function.unserialize]: Error at offset 866 of 876 bytes in /Library/WebServer/Documents/squirrelmail/src/compose.php on line 370 Appreciate help in solving the above problem. Thanks in advance. -- View this message in context: http://www.nabble.com/Squirrelmail-attachment-error-when-combined-with-jmeter-to-send-attachments-multiple-times-tp21604839p21604839.html Sent from the JMeter - User mailing list archive at Nabble.com. --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]

