2018 up to now | 2017 | 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] Is it possible to share Groovy variables?


  • Subject: Re: [QF-Test] Is it possible to share Groovy variables?
  • From: Gregor Schmid <Gregor.Schmid@?.de>
  • Date: Mon, 09 Jul 2012 14:56:32 +0200

Hi Konstantin,

thanks for the positive reply. I'm hereby copying to the list which I
had forgotten in my answer, so now we have it on record.

Best regards,
    Greg

"Gordeyev, Konstantin" <kgordeev@?.ru> writes:

> Hi Gregor,
>
> Thanks a lot!
> Indeed it worked out with hashMap with hashMaps inside it. It's smart enough :)
>
>
> _______________________
> BR, Konstantin Gordeev
>
>
> -----Original Message-----
> From: Gregor Schmid [mailto:Gregor.Schmid@?.de] 
> Sent: Friday, July 06, 2012 12:05 AM
> To: Gordeyev, Konstantin
> Subject: Re: [QF-Test] Is it possible to share Groovy variables?
>
>
> Hello Konstantin,
>
> you can pass Groovy maps and arbitrary Jython objects back and forth between the SUT and qftest which in turn may contain collections and also serializable Java or Groovy objects from the standard set, but no complex objects like GUI elements or from custom classes implemented in the SUT.
>
> Heres a Groovy example:
>
> SUT script:
>
> myMap = [:]
> myMap['key'] = "value"
> println myMap
> rc.toServer(myMap:myMap)
>
> Server script:
>
> println myMap 
>
> But if you try to place a component or custom object in myMap you'll get a java.io.NotSerializableException.
>
> Best regards,
>     Greg
>
> "Gordeyev, Konstantin" <kgordeev@?.ru> writes:
>
>> Hello QF-Test team!
>>
>> I have two clients started. Once from one I fetch some information and fill up HashMap in groovy.
>> To be able to use it in future I use this solution in the very beginning:
>>
>> public class Globals {
>>
>>      static myMap = [:]
>>
>> }
>>
>> It is possible to use and update this map in other scripts but only within the same client.
>>
>> Now I need to share this object with scripts of other client. It's 
>> said that QFT is not powerful enough to move Java objects using rc.toServer() and rc.fromServer().
>>
>> Is it possible to do that?
>>
>> Or maybe is there any other solution to share complex type of data between clients somehow?
>>
>> Is there any kind of common namespace or whatever that is reachable from everywhere?
>>
>> _______________________
>>
>> BR, Konstantin Gordeev

-- 
Gregor Schmid                                Gregor.Schmid@?.de
Quality First Software GmbH                     http://www.qfs.de
Tulpenstr. 41                               Tel: +49 8171 38648-0
DE-82538 Geretsried                         Fax: +49 8171 3864816
GF: Gregor Schmid, Karlheinz Kellerer          HRB München 140833