Return-Path: X-Original-To: archive-asf-public-internal@cust-asf2.ponee.io Delivered-To: archive-asf-public-internal@cust-asf2.ponee.io Received: from cust-asf.ponee.io (cust-asf.ponee.io [163.172.22.183]) by cust-asf2.ponee.io (Postfix) with ESMTP id D14E6200BC3 for ; Fri, 18 Nov 2016 15:15:59 +0100 (CET) Received: by cust-asf.ponee.io (Postfix) id CFE2B160B04; Fri, 18 Nov 2016 14:15:59 +0000 (UTC) Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by cust-asf.ponee.io (Postfix) with SMTP id 2AD1B160AFE for ; Fri, 18 Nov 2016 15:15:59 +0100 (CET) Received: (qmail 26568 invoked by uid 500); 18 Nov 2016 14:15:58 -0000 Mailing-List: contact user-help@jmeter.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: "JMeter Users List" Delivered-To: mailing list user@jmeter.apache.org Received: (qmail 26557 invoked by uid 99); 18 Nov 2016 14:15:57 -0000 Received: from pnap-us-west-generic-nat.apache.org (HELO spamd1-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 18 Nov 2016 14:15:57 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd1-us-west.apache.org (ASF Mail Server at spamd1-us-west.apache.org) with ESMTP id 8D11CC0A6F for ; Fri, 18 Nov 2016 14:15:57 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd1-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: 3.682 X-Spam-Level: *** X-Spam-Status: No, score=3.682 tagged_above=-999 required=6.31 tests=[DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, FROM_STARTS_WITH_NUMS=0.553, HTML_MESSAGE=2, KAM_INFOUSMEBIZ=0.75, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H3=-0.01, RCVD_IN_MSPIKE_WL=-0.01, RCVD_IN_SORBS_SPAM=0.5, SPF_PASS=-0.001] autolearn=disabled Authentication-Results: spamd1-us-west.apache.org (amavisd-new); dkim=pass (2048-bit key) header.d=gmail.com Received: from mx1-lw-eu.apache.org ([10.40.0.8]) by localhost (spamd1-us-west.apache.org [10.40.0.7]) (amavisd-new, port 10024) with ESMTP id xV65PqTCvH9m for ; Fri, 18 Nov 2016 14:15:55 +0000 (UTC) Received: from mail-wm0-f53.google.com (mail-wm0-f53.google.com [74.125.82.53]) by mx1-lw-eu.apache.org (ASF Mail Server at mx1-lw-eu.apache.org) with ESMTPS id E41FB5F47D for ; Fri, 18 Nov 2016 14:15:54 +0000 (UTC) Received: by mail-wm0-f53.google.com with SMTP id a197so41048645wmd.0 for ; Fri, 18 Nov 2016 06:15:54 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:from:date:message-id:subject:to; bh=Mly9ZiSp3/yNq81FXcPDxsVuV0NT6nkVMg0Nopxuq4Q=; b=bBUYlVpAsbRCmRVycgARjXUcM4MBphZ9ZZkA3b4eFI0pAmbr1ZBKOlBAaS8B73FBUX cJl/k8YvChuC7wGgTWiQbhGIsTTkm0dJjE5XnZWO6ZEw7d5kUhWj1Oz/gJ7QKWU1bT0b m81r5qrQkyVVWOullBPt9w8WE+ctKihVdDDJP12oV/zJ7AzWs5VEyJ5mNLD5d5zcwWg1 nRMYI8lesDLZkd6oq3sojozrbcuI31KHuM6VaQfxsnvakdINAjgxSonm7VHhSmR8bKhG m1u0SFsJPAM7SLMNMY/DEmurcLyZCm7NrwwaBgSDCRjV8eRkapF4sVa50l2vR/it3FA4 zT+A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:from:date:message-id:subject:to; bh=Mly9ZiSp3/yNq81FXcPDxsVuV0NT6nkVMg0Nopxuq4Q=; b=ITzqveF+pzlgeIm6+3VWZuCRY2AQpWhtyGBL5NTvA/QpGDPAaYXuyujOmJ/CrYqC73 lUY0u0NTP93bN+gUdeVlHdVU8Z5ZerZ5V8sLFoM0TbBK7keHxS/6Oz1Q47no8FQR/A0s W/N2fG4+QFfZ0Okvp2doL/LLoX0Qz9/lRx64pO6ssr4xQITCygcmDQkoR72g654FWtOA Satb97F0c0f9vpACoLWmseFQ1yvFNovj0zIzgNZ8RouLjT0OBY8l88+7Aa7lMup3kMgo DiCzto4+1EYz1SZhxaSQKhmyiuo1xbNL0i7OsJp6TVcmvR2nywjlKnNcM2iypdUzSfyU IskA== X-Gm-Message-State: ABUngvd/cPCcOsDqYJBP27oZ03RyNAqbl5/iS75vCcCLFjqW3XsNduEUw2sNOG5zDCxpvjCLqLj4Lu3A9Fy7zQ== X-Received: by 10.28.161.67 with SMTP id k64mr23891692wme.69.1479478550168; Fri, 18 Nov 2016 06:15:50 -0800 (PST) MIME-Version: 1.0 Received: by 10.28.47.6 with HTTP; Fri, 18 Nov 2016 06:15:49 -0800 (PST) From: Sankar Das <007bhabanisankar@gmail.com> Date: Fri, 18 Nov 2016 16:15:49 +0200 Message-ID: Subject: BeanShell Assertion in jdbc request To: JMeter Users List Content-Type: multipart/alternative; boundary=001a114cd3486f89cd054193f179 archived-at: Fri, 18 Nov 2016 14:16:00 -0000 --001a114cd3486f89cd054193f179 Content-Type: text/plain; charset=UTF-8 Hello Everyone, Getting two columns from a jdbc sampler i.e ID and WF. Trying to fail it, if it exceeds than the predefined variables by using beanshell. Below is the sample code. String myValue1 = vars.get("WF_1"); String myValue2 = vars.get("WF_2"); if(!myValue1.equals ("3")){ log.info("myValue1 =" + myValue1); Failure = true; FailureMessage = " The database value should be " + myValue1 + "."; } else if(!myValue2.equals ("5")){ //log something Failure = true; log.info("myValue2 =" + myValue2); FailureMessage = " The database value should be " + myValue2 + "."; else { //can be log something? Failure = false; } Above code is working when I know the number of rows for a particular column. If the rows values are dynamic and increasing or decreasing according to sysdate than how to compare them with the predefined and fail the sampler. Please help! Thanks! --001a114cd3486f89cd054193f179--