Mailingliste - Einträge 2012
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [QF-Test] Passing values between Jython server script & QF-Test procedure
Hello Sumathi, about 1)If "myurl" comes from the command line you can access this via accessing QF-Test variable.
in your case this would look like this: myurl = rc.lookup("myurl") about 2)Now you need to set the variables "port" and "host" (which are script variables at the moment) to the QF-Test level via:
rc.setLocal("hostName", hostName) rc.setLocal("PortNo", PortNo) Insert those calls at the end of your script.If you want to have those variables globally available you can call rc.setGlobal instead of rc.setLocal.
Best Regards, Martin--On Dienstag, Mai 22, 2012 09:38:54 +0200 "Jayakumar, Sumathi" <Sumathi.Jayakumar@?.com> wrote:
Hi, I have a procedure that has a Jython server script that does string manipulation and splits a given URL to Host and Port. Second procedure needs to receive the HostName and Port name and make connections based on these. global hostName global PortNo myurl='https://mymachine:5555' var1= myurl[:-5] l1=len(var1) i=var1.find('//')+2 hostName=var1[i:l1] print hostName s1=myurl.find(':5') l2=myurl.find(':5')+1 l=len(myurl) PortNo = myurl[l2:l] print PortNo My concerns here are: 1. The value of myurl will be passed from command line. So how do I adopt it in the Server script? 2. The second procedure which actually performs the connection in eclipse - how do I pass the variables (hostname and PortNo) to this? Please help me find a lead here. Best Regards, Sumathi
-- 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