Robot Framework with Jython

910 views
Skip to first unread message

Smi Kam

unread,
Dec 18, 2013, 8:27:52 PM12/18/13
to robotframe...@googlegroups.com
Hi everyone,
I am new to Robot Framework and started using RF with Python recently. However, I want to create custom keyword libraries for my tests in Java. I found that I would have install Robot Framework using Jython or use Java Remote Library API to be able to use my Java libraries. I want to go for the Jython option. I found the installation documentation quite confusing. Can anyone please give me step-by-step installation instructions for RF with Jython. Any inputs will be greatly appreciated!

Markus Bernhardt

unread,
Dec 19, 2013, 3:01:36 AM12/19/13
to email4...@gmail.com, robotframe...@googlegroups.com
Hi,

can you use maven in your environment?

Cheers,
Markus

John Ni

unread,
Dec 19, 2013, 7:47:52 AM12/19/13
to robotframe...@googlegroups.com
I just downloaded the jython installer. it is a runnable jar file, so make sure java is installed. then run the jar file, and click 'all everything including sources' when installation type appears. once its done, include the /bin folder into your Path because that's where jython.exe is. after that i installed RF. i don't know if the order matters, but at least that works for me. 
then you can create your java library. it can be a normal class with some methods. build it into a jar file and include that into your CLASSPATH. start RF by something like this:
set CLASSPATH="..\..\lib\SampleLibrary.jar;%CLASSPATH%"
jybot --outputdir ..\..\..\output ..\..\..\implementation\testsuites\SampleLibraryTestsuite.html
see this tutorial
https://blog.codecentric.de/en/2012/06/robot-framework-tutorial-writing-keyword-libraries-in-java/

在 2013年12月19日星期四UTC+11下午12时27分52秒,Smi Kam写道:
Reply all
Reply to author
Forward
0 new messages