Return-Path: Delivered-To: apmail-jakarta-jmeter-user-archive@www.apache.org Received: (qmail 24825 invoked from network); 15 Aug 2006 12:40:18 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur.apache.org with SMTP; 15 Aug 2006 12:40:18 -0000 Received: (qmail 83811 invoked by uid 500); 15 Aug 2006 12:40:16 -0000 Delivered-To: apmail-jakarta-jmeter-user-archive@jakarta.apache.org Received: (qmail 83794 invoked by uid 500); 15 Aug 2006 12:40:16 -0000 Mailing-List: contact jmeter-user-help@jakarta.apache.org; run by ezmlm Precedence: bulk List-Unsubscribe: List-Help: List-Post: List-Id: "JMeter Users List" Reply-To: "JMeter Users List" Delivered-To: mailing list jmeter-user@jakarta.apache.org Received: (qmail 83781 invoked by uid 99); 15 Aug 2006 12:40:16 -0000 Received: from asf.osuosl.org (HELO asf.osuosl.org) (140.211.166.49) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 15 Aug 2006 05:40:16 -0700 X-ASF-Spam-Status: No, hits=0.5 required=10.0 tests=DNS_FROM_RFC_ABUSE,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (asf.osuosl.org: domain of idarataljawda@gmail.com designates 66.249.82.238 as permitted sender) Received: from [66.249.82.238] (HELO wx-out-0506.google.com) (66.249.82.238) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 15 Aug 2006 05:40:16 -0700 Received: by wx-out-0506.google.com with SMTP id t4so761273wxc for ; Tue, 15 Aug 2006 05:39:55 -0700 (PDT) DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:subject:from:reply-to:to:cc:in-reply-to:references:content-type:organization:date:message-id:mime-version:x-mailer:content-transfer-encoding; b=cZGiVP7HoxkHUZ7BZBovthxx+ja02h9zI0Jc3sn3qTXzcojvXsnV1LjlALT9oTx8VvihgT3cTn9UMP2PCgWF6+Qt+EkzySy+0pWN/HFZJGp9xFTSe0qW3HgxlS/KwJAknRbcAO8rU4dfvUF3Ru40pmnpaHoBWAVNQG1qPQBzu1Q= Received: by 10.70.32.10 with SMTP id f10mr11653285wxf; Tue, 15 Aug 2006 05:39:55 -0700 (PDT) Received: from phosphorus.opencraft.local ( [196.218.200.206]) by mx.gmail.com with ESMTP id 9sm2640743wrl.2006.08.15.05.39.53; Tue, 15 Aug 2006 05:39:54 -0700 (PDT) Subject: RE: Can Jmeter invoke a shell script? From: Jaw Dat Reply-To: idarataljawda@gmail.com To: Mikko Ohtamaa Cc: 'JMeter Users List' In-Reply-To: References: Content-Type: text/plain Organization: DatJawDatJaw Date: Tue, 15 Aug 2006 15:44:37 +0300 Message-Id: <1155645877.3048.17.camel@phosporus.opencraft.local> Mime-Version: 1.0 X-Mailer: Evolution 2.6.0 Content-Transfer-Encoding: 7bit X-Virus-Checked: Checked by ClamAV on apache.org X-Spam-Rating: minotaur.apache.org 1.6.2 0/1000/N Mikko, Thank you for your reply. Quite right, I can't afford the time to learn how to and then implement a Perl plugin for Jmeter. Thanks to Sebb's advice, however, I discovered that there may be an intermediary alternative: BeanShell scripting - that's assuming the BeanShell scripts defined Inside Jmeter can still invoke external programs (eg, bash or perl scripts) using the exec() function call. I test my BeanShell scripts outside Jmeter , on the command line , and they work, but I can't configure the BeanShell PostProcessor to get the same output in Jmeter - i can't see any output or even know where to find it. Also i'm not sure whether I should use a BeanShell PostProcessor or BeanShell Assertion , or RegEx PostProcessor or RegEx Assertion. On Mon, 2006-08-14 at 13:54 +0300, Mikko Ohtamaa wrote: > > Normally I would use RegEx for that. But it would be a lot easier to use > Perl or shell scripts to parse the Response Data the way I want. > How Can I make JMeter invoke a shell script , and use its result instead of > the built-in Response Assertion (which takes ORO RegEx). > > At least Jmeter core doesn't have any support for executing arbitary system > commands (not sure about 3rd party extensions). > > You need to write a plug-in Assertation component (Java) for JMeter which > invokes native system Perl command, passes out the request data (and all > known Jmeter variables?) via stdin, then reads stdout and parses Response > Data again. A better alternative would invoke Perl directly from Java, but I > am not sure if there exists Java<->Perl bridges. > > Quite much of work if you are not very skilled with Java. > > -Mikko > --------------------------------------------------------------------- To unsubscribe, e-mail: jmeter-user-unsubscribe@jakarta.apache.org For additional commands, e-mail: jmeter-user-help@jakarta.apache.org