2017 up to now  | 2016 | 2015 | 2014 | 2013 | 2012 | 2011 | 2010 | 2009 | 2008 | 2007

(older archive entries before 2007 are not shown here, but included in the onsite-search)

Mailing List - Entries of 2012

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [QF-Test] can I use regular experession directly in a If condition

  • Subject: Re: [QF-Test] can I use regular experession directly in a If condition
  • From: Martin Moser <martin.moser@?.de>
  • Date: Fri, 17 Feb 2012 08:41:31 +0100

Hi Brian,

you can use re.match in If-nodes of QF-Test if you do following:

1.) all a Jython-Server-Script, setting the re-module globally.


import re
global re

After calling this script once you can use the re syntax in a If-node like this:

$[re.match(".*","a") == None]

The first script could be called once in your Setup node and then you are free to use it.

It's now up to you, whether you think this is a good way to go for or whether you prefer inserting a pure script node.

Best Regards,

--On Mittwoch, Februar 15, 2012 16:37:21 -0500 Brian Cohen <Brian.Cohen@?.com> wrote:

Wondering if I can do this, or do I have to insert a  Jython Server/SUT
node using the "re" module.


Martin Moser                           martin.moser@?.de
Quality First Software GmbH            http://www.qfs.de
Tulpenstr. 41                          Tel: +49 8171 38648-14
DE-82538 Geretsried                    Fax: +49 8171 38648-16
GF: Gregor Schmid, Karlheinz Kellerer  HRB München 14083