The mailing list has been closed since July 2022, but continues to serve as an archive of information about QF-Test.
If you want to stay informed about news about QF-Test, you can simply subscribe to our newsletter:
Subscribe to Newsletter
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [QF-Test] Logging output of Java objects used by Jython scripts
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