Fwd: Using robotframework with Perl scripts

1,247 views
Skip to first unread message

Stephen Blessing

unread,
May 4, 2012, 12:44:06 PM5/4/12
to robotframe...@googlegroups.com
Hi Pekka Klärck and Users,

I was wondering if you could help me to understand how I might use the 
robotframework to run Perl scripts for automated testing of an application?

Thanks and best regards,
Stephen Blessing

Quality Assurance

DataSplice, LLC
414 E. Oak Street
Fort Collins, CO 80524
(970) 232-1647
sup...@datasplice.com


Thomas Jaspers

unread,
May 5, 2012, 3:55:03 AM5/5/12
to robotframework-users
Hi Stephen,

I have done that some time ago using the Operating System Library of
the Robot Framework, which is build-in,
thus no import is required.

You could probably use this keyword best:
http://robotframework.googlecode.com/hg/doc/libraries/OperatingSystem.html?r=2.7.1#Run
And Return Rc

Then you can check the return code of the Perl script to check whether
or not the execution was successful.

Hope that helps :-).

Cheers
- Thomas

On 4 Mai, 18:44, Stephen Blessing <stephen.bless...@datasplice.com>
wrote:
> supp...@datasplice.com

David

unread,
May 6, 2012, 12:05:27 AM5/6/12
to robotframework-users
Agree with Thomas on the Operating System Library approach. For remote
execution, you could use SSH library as well.

Just wanted to mention another approach as well. If you need or want
tighter integration of Perl scripts/code to Robot Framework than what
you can do with Operating System library or SSH library, you can also
consider using the Perl remote server interface:

http://code.google.com/p/plrobotremoteserver/

On May 5, 12:55 am, Thomas Jaspers <trito...@googlemail.com> wrote:
> Hi Stephen,
>
> I have done that some time ago using the Operating System Library of
> the Robot Framework, which is build-in,
> thus no import is required.
>
> You could probably use this keyword best:http://robotframework.googlecode.com/hg/doc/libraries/OperatingSystem...

Pekka Klärck

unread,
May 7, 2012, 5:18:27 PM5/7/12
to stephen....@datasplice.com, robotframe...@googlegroups.com
2012/5/4 Stephen Blessing <stephen....@datasplice.com>:
>
> I was wondering if you could help me to understand how I might use the
> robotframework to run Perl scripts for automated testing of an application?

Thomas already proposed using `Run` keyword and its friends from the
OperatingSystem library [1]. They will definitely work, but if you
have special needs you may want to write a custom test library for
this purpose using Python's subprocess module [2]. Regardless how you
run your scripts, it will be much easier to verify did they succeed or
not if they return a return code to the system. If the script writes
something to stdout or stderr, you can easily write that to Robot's
log file. If the script creates its own log file, you can either link
that file from Robot's log or read its content and write that to the
log.

If you want to use Perl code as a test library providing various
keywords, using Perl remote server [3] as David suggested is probably
a good idea. For more information about Robot's remote library
interface in general see [4].

[1] http://code.google.com/p/robotframework/wiki/OperatingSystemLibrary
[2] http://docs.python.org/library/subprocess.html
[3] http://code.google.com/p/plrobotremoteserver/
[4] 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

Optimus Prime

unread,
Nov 13, 2012, 7:27:17 PM11/13/12
to robotframe...@googlegroups.com
Hi David,

I was able to get the plrobotremoteserver to work, but I am still struggling with understanding how to parse the keywords and perl test files (*.t files).
Any help would be appreciated.

Thanks again,
Stephen Blessing

David

unread,
Nov 15, 2012, 2:46:30 PM11/15/12
to robotframe...@googlegroups.com
Hi Stephen,

The wiki page for the project should give you enough starting info on how to use the Perl remote server and how to create a custom test library by modeling after the example library provided in project's SVN.


However, the server wasn't designed to work with Perl test files (*.t) so I'm not sure how to integrate that with the server. It may need some modifications and I could use a Perl developer to help me with that. I personally have never worked with Perl test files so far, only Perl scripts and modules.

And if you still have any questions/comments, let me what you specifically need clarified, and I'll try my best to do that. I can always use more user feedback on this server.

Regards,
David

Optimus Prime

unread,
Nov 16, 2012, 6:24:52 PM11/16/12
to robotframe...@googlegroups.com
Thanks so much David!
When are you going to write that User's Guide?  :)

Stephen Blessing

unread,
May 1, 2013, 12:02:32 PM5/1/13
to Pekka Klärck, robotframe...@googlegroups.com
Hey peke,


I'm loving it! Nice work!

Thanks and best regards,
Stephen Blessing

Quality Assurance

DataSplice, LLC
414 E. Oak Street
Fort Collins, CO 80524
(970) 232-1647
sup...@datasplice.com
DSlogo  
The Right Tool for the Job
image003.png
Reply all
Reply to author
Forward
0 new messages