Logo QF-Test

Im Archiv der Mailingliste
wertvolle Antworten finden.

 

Gratis Testen  Download  Kaufen

Thomas Max, QF-Test Training und Support

Tipp für die Recherche in der Mailingliste: Volltextsuche (oben) verwenden.

Thomas Max,
Sr. Software Engineer & Trainer, QFS

2016 bis heute 2015 | 2014 | 2013 | 2012 | 2011 2010 2009 | 2008 | 2007

(ältere Archiveinträge vor 2007 nicht dargestellt, aber in der Suche enthalten)

Mailingliste - Einträge 2007


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

[QF-Test] How to get and use Classloader of SUT


  • Subject: [QF-Test] How to get and use Classloader of SUT
  • From: "Michaelis, Mark" <mark.michaelis@?.com>
  • Date: Fri, 14 Dec 2007 13:03:48 +0100

Hello,

I need to get access to the Classloader of the SUT to read e. g. property-files and to create instances of some classes.

I solved this problem by having an SUT script which gets a component and asks for its classloader.

The problem: Now everytime I want to work with these classes the call is placed in the AWT EventQueue (as being an SUT Script) which is not nice at all.

So my next guess was: Only get the classloader once and store it globally. Then in Server Scripts use the Classloader directly.

But: Just making the variable global does not work as SUT Scripts and Server Scripts run in different contexts. rc.setGlobal() of course does not work because it only accepts Strings and with rc.toServer() it isn't any better. I just got a "Can't pickle"-exception and of course the QF-Test manual already states that it is not possible to transfer all Java Objects this way.

So my question: Does anyone have a guess how I may continue? Or do I have to stick to the AWT EventQueue?

Kind Regards
- Mark

-- 
Mark Michaelis
Software Engineer Quality Assurance
CoreMedia 
Ludwig-Erhard-Str. 18
20459 Hamburg, Germany
www.coremedia.com 
--------------------------------------------------------
CoreMedia AG
Executive Board: Sören Stamer (CEO), Dr. Klemens Kleiminger (CFO)
Supervisory Board: Prof. Dr. Joachim Schmidt (Chairman)
Trade Register: Amtsgericht Hamburg, HR B 76277

--------------------------------------------------------





Videos Downloads Dokumentation Kaufen Gratis Testen