Generic Keyword Libraries in Java

58 views
Skip to first unread message

Thomas Jaspers

unread,
Feb 8, 2010, 11:18:02 AM2/8/10
to robotframework-users
Hi,

I was wondering if you would consider publishing Keyword Libraries
that are written in Java as generic "Robot Libraries" if the quality
is on an appropriate level? Installation could be as easy as with a
Python Library I would guess, but of course the robot-user would be
forced to use jybot and have Java installed (which should not be a
problem nowadays ;-)).

Cheers
- Thomas

Pekka Klärck

unread,
Feb 8, 2010, 6:15:54 PM2/8/10
to jas...@codecentric.de, robotframework-users
2010/2/8 Thomas Jaspers <jas...@codecentric.de>:

I see no problem here -- the SwingLibrary is actually implemented with
Java already now. What libraries you have in mind? Notice that the
core team doesn't have much resources to maintain new libraries, but
we can help you getting started with a new project and definitely will
add links to all new generic libs to the main project pages. In
general we want to encourage people to develop new generic libraries
and other tools.

It would actually be possible to use pure Java libraries with pybot
via the Remote library interface [1] if we had a Java version of the
remote server. Implementing it ought to be pretty easy and we've been
talking about it already earlier. Any takers?

[1] http://code.google.com/p/robotframework/wiki/RemoteLibrary

Cheers,
.peke
--
Agile Tester/Developer/Consultant :: http://eliga.fi
Lead Developer of Robot Framework :: http://robotframework.org

Thomas Jaspers

unread,
Feb 9, 2010, 2:37:13 AM2/9/10
to robotframework-users
Hi Pekka,

I was thinking of a keyword library for database testing. I think I
have written such a library already three times for different
projects and I feel it is time having a really generic (and in best
case public) one. I think there was started something, but
not really finished. Using Java the implementation would be quite
simple and it would be as well easy to support various
database products in a configurable way.

Utilizing the Robot RemoteLibrary for this sounds like a very good
idea. I will have some time during the weekend and make up
my mind then about what keywords I would see in there and can post
them here for discussion then.

Getting some help in getting the thing then hosted here would be of
course great :-).

Cheers
- Thomas

On 9 Feb., 00:15, Pekka Klärck <pekka.kla...@gmail.com> wrote:
> 2010/2/8 Thomas Jaspers <jasp...@codecentric.de>:

Pekka Klärck

unread,
Feb 9, 2010, 4:48:50 AM2/9/10
to jas...@codecentric.de, robotframework-users
2010/2/9 Thomas Jaspers <jas...@codecentric.de>:

> Hi Pekka,
>
> I was thinking of a keyword library for database testing. I think I
> have written such a library already three times for different
> projects and I feel it is time having a really generic (and in best
> case public) one. I think there was started something, but
> not really finished. Using Java the implementation would be quite
> simple and it would be as well easy to support various
> database products in a configurable way.

A generic db library would be awesome regardless the implementation language!

> Utilizing the Robot RemoteLibrary for this sounds like a very good
> idea. I will have some time during the weekend and make up
> my mind then about what keywords I would see in there and can post
> them here for discussion then.

Great. If more people are interested, someone could even write a
Python version of the library at the same time.

> Getting some help in getting the thing then hosted here would be of
> course great :-).

You can count on that.

Thomas Jaspers

unread,
Feb 9, 2010, 10:26:16 AM2/9/10
to robotframework-users
Cool, you can count on that one ... probably I will bother you by mail
for a few initial setup-issues ;-).

Cheers
- Thomas

On 9 Feb., 10:48, Pekka Klärck <pekka.kla...@gmail.com> wrote:
> 2010/2/9 Thomas Jaspers <jasp...@codecentric.de>:

Pekka Klärck

unread,
Feb 9, 2010, 3:41:40 PM2/9/10
to jas...@codecentric.de, robotframework-users
2010/2/9 Thomas Jaspers <jas...@codecentric.de>:

> Cool, you can count on that one ... probably I will bother you by mail
> for a few initial setup-issues ;-).

No problem. Please send the mail either here or to the rf-devel
mailing list so that others can see the conversation too.

Cheers,
.peke

Thomas Jaspers

unread,
Feb 10, 2010, 12:16:12 PM2/10/10
to robotframework-users
Seems I am lacking some very basic Jython/Python know-how here. I
thought it would be nice writing all the methods with Keyword
descriptions first to have some nice basis for discussing the
keywords. Thus I downloaded the "libdoc.py" script and started trying,
but:

When starting it from my Python Scripts-Directory (where I put it) I
get the following error (please don't mind the line breaks, it is
copy&paste from a Dos console):

C:\Python26\Scripts>c:\jython2.5.1\bin\jython.bat libdoc.py -o "C:
\Dokumente und
Einstellungen\tja\Desktop\Docs\DBLibrary\DBLibrary.xml" "C:\Dokumente
und Einst
ellungen\tja\Desktop\Docs\DBLibrary\DatabaseKeywords.java"
Traceback (most recent call last):
File "libdoc.py", line 64, in <module>
from robot.running import TestLibrary, UserLibrary
ImportError: No module named robot

It took me a short time, but finally I found the place where the
"robot.running" library seems to be located, but when then starting
the script from there I get the following - at least different ;-) -
error:

C:\Python26\Lib\site-packages>c:\jython2.5.1\bin\jython.bat ..\..
\Scripts\libdoc
.py -o "C:\Dokumente und Einstellungen\tja\Desktop\Docs\DBLibrary
\DBLibrary.xml"
"C:\Dokumente und Einstellungen\tja\Desktop\Docs\DBLibrary
\DatabaseKeywords.jav
a"
Traceback (most recent call last):
File "..\..\Scripts\libdoc.py", line 64, in <module>
from robot.running import TestLibrary, UserLibrary
File "__pyclasspath__/robot/__init__$py.class", line 26, in <module>
File "__pyclasspath__/robot/running/__init__$py.class", line 16, in
<module>
File "__pyclasspath__/robot/running/model$py.class", line 26, in
<module>
File "__pyclasspath__/robot/running/namespace$py.class", line 19, in
<module>
File "__pyclasspath__/robot/libraries/__init__$py.class", line 20,
in <module>

File "C:\jython2.5.1\Lib\os.py", line 279, in listdir
raise OSError(0, 'No such directory', path)
OSError: [Errno 0] No such directory: '__pyclasspath__/robot/
libraries'


Any hint would be highly appreciated :-).


On 9 Feb., 21:41, Pekka Klärck <pekka.kla...@gmail.com> wrote:
> 2010/2/9 Thomas Jaspers <jasp...@codecentric.de>:
>

Thomas Jaspers

unread,
Feb 12, 2010, 3:01:32 PM2/12/10
to robotframework-users
Hi,

I had some time and started with a description of potential keywords
for a generic database library. I put the documentation temporary here
for some kind of quick review:
http://www.filenotfoundexception.de/RobotDatabaseLibraryProposal/DatabaseLibrary.html

I am of course happy for any additional ideas on keywords :-).

Otherwise I would like with the actual implementation work and was
wondering if you could point to any documentation how to use Google
Code Subversion in Robot Project, starting a project page, etc.

Cheers
- Thomas

Pekka Klärck

unread,
Feb 22, 2010, 6:19:48 AM2/22/10
to jas...@codecentric.de, robotframework-users
2010/2/12 Thomas Jaspers <jas...@codecentric.de>:

>
> I had some time and started with a description of potential keywords
> for a generic database library. I put the documentation temporary here
> for some kind of quick review:
> http://www.filenotfoundexception.de/RobotDatabaseLibraryProposal/DatabaseLibrary.html
>
> I am of course happy for any additional ideas on keywords :-).

Has anyone looked at this? I have never tested databases much so
cannot really comment on how the library should work. Probably the
only advice I can give is studying how DbFit
(http://gojko.net/fitnesse/dbfit/) works. Gojko actually mentioned at
Agile Testing Days last autumn that he was planning a partial re-write
that would make it easier to use it with other tools that Fit(Nesse).

> Otherwise I would like with the actual implementation work and was
> wondering if you could point to any documentation how to use Google
> Code Subversion in Robot Project, starting a project page, etc.

You can just start a new project in Google Code (or somewhere else
like GitHub ot SourceForge if you prefer them). There are good
instructions on how to use Google Code at
http://code.google.com/intl/en/projecthosting and I can tell from
experience that starting a new project is pretty trivial. If you are
interested in how we've configured RF project I could write something
to the wiki. That would probably make it easier for others to get
started too.

I believe the best way to "integrate" different Robot Framework
related projects is simply adding links back and forth. You can also
name your project with 'robotframework-' prefix if you want, and in
Google Code you can/should use 'robotframework' label.

Thomas Jaspers

unread,
Feb 23, 2010, 6:46:18 AM2/23/10
to robotframework-users
Hi Pekka,

thanks again for the info, it was really easy getting started and thus
discussion on potential keywords can go here now:
http://code.google.com/p/robotframework-dblibrary/

I let you know as soon as something substainable is available for the
first time here :).

Cheers
- Thomas

Pekka Klärck

unread,
Feb 23, 2010, 6:32:46 PM2/23/10
to jas...@codecentric.de, robotframework-users
2010/2/23 Thomas Jaspers <jas...@codecentric.de>:

> Hi Pekka,
>
> thanks again for the info, it was really easy getting started and thus
> discussion on potential keywords can go here now:
> http://code.google.com/p/robotframework-dblibrary/

Awesome!

Reply all
Reply to author
Forward
0 new messages