List Icon
Archive de la liste de diffusion

La liste de diffusion est fermée depuis juillet 2022, mais sert toujours d'archive d'informations sur QF-Test.
Cependant, si vous souhaitez rester informé des nouveautés concernant QF-Test, vous pouvez simplement vous
abonner à la newsletter 

our obtenir des informations à jour sur chaque version - y compris les versions mineures - vous pouvez
nous pouvez vous abonner au flux RSS ou nous suivre sur les médias sociaux.
Alternativement, QF-Test fournit également des informations sur la version elle-même.

Une autre source d'information est notre blog, qui contient des articles actuels sur des thèmes généraux, sur l'entreprise QFS et aussi divers "how-tos", veuillez vous
ABonner au Blog


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

Re: [QF-Test] Logging output of Java objects used by Jython scripts


  • Subject: Re: [QF-Test] Logging output of Java objects used by Jython scripts
  • From: Gregor Schmid <Gregor.Schmid@?.de>
  • Date: Wed, 23 Nov 2016 09:34:53 +0100

Hello Bernhard,

when printing with Jython you may get the output in the Terminal
automatically. If not, try opening the SUT Jython terminal from the
Client menu and it should appear there.

Print statements inside Java objects will only appear in the terminal
if output from the SUT is not generally detached/redirected by the SUT
itself during startup. Java WebStart is a typical example where you'll
not get any output to QF-Test's terminal but only to the Java console
or to log files.

Either way, QF-Test intercepts all SUT output and logs it in the
run-log during replay.

Regarding logging messages / errors from the Java objects: You'll need
some form of Jython wrapper that does the actual logging. When running
directly in an SUT script rc is available and you can use
rc.logMessage etc. When running asynchronously, e.g. inside a resolver
that is also called during recording, use qf.logMessage instead.

Best regards,
    Greg

Bernhard Schmitt <bernhard.schmitt@?.de> writes:

> Hello,
>
> in some Jython scripts, I am using Java objects.
> - How can I log the standard outputs of the Java objects (System.out.print("something")) in the QF-Test Terminal window?
> - How can I log special errors or messages oft the Java objects in the
> *.qrz report? I am thinking of using the variable "rc" as parameter
> for a special method and then using rc.logError() and rc.logMessage(),
> but I am not sure if this ist a good way.
>
> BR
>
> Bernhard

--
Gregor Schmid

E: gregor.schmid@?.de
T: +49 8171 38648-11
F: +49 8171 38648-16

Quality First Software GmbH | www.qfs.de
Tulpenstr. 41 | 82538 Geretsried | Germany
GF Gregor Schmid, Dr. Martina Schmid, Karlheinz Kellerer
HRB München 140833