Best way to deploy a complete framework including the tests and the python libraries

718 views
Skip to first unread message

Laurent Bristiel

unread,
Dec 5, 2013, 5:58:36 AM12/5/13
to robotframe...@googlegroups.com
Hello,

I have a test portfolio with 500+ tests and 20+ internal libraries.
I am using some external libraries like requests, sqlparse, mysqldb, openssl, pexpect...
When I want to deploy the test portfolio on a new machine, the install process become quite long:
- install robot
- install all the external libraries
- get the tests and the internal from our SCM
=> then only you can run the tests
And there could be some specificities for some OS (I am using MacOS, Centos, Ubuntu and Windows).
So I came up with an INSTALL file that is growing and growing....

Did anyone come up with a way to ease the install of a full Robot Test Porfolio ?
(only idea in the back of my mind is to go take a look at the devops tools like chef/pupett but it is a whole new world there....)

Thanks,
Laurent

Thomas Maier

unread,
Dec 5, 2013, 7:17:11 AM12/5/13
to lau...@bristiel.com, robotframework-users
Hi Laurent,

There are probably many ways to do it. I can suggest the way I'm doing my RF deployment.
I keep everything in git repository, with sub-directories structured as tests/, resources/, variables/, etc`.
All Python libraries are in lib/. Not only my libraries but also all external libraries, all RF
libraries, requests, openssl and etc`. Including robotframework itself.
It's easy to install them there with
 # pip install --install-option="--prefix=<target directory>" .
Export PYTHONPATH (updated with this new lib/ directory) before you run your pybot.
Next time I want to run the tests on new machine, I just clone the repository there and it
works about of the box. The only prerequisite is Python itself, of course.

Thomas



--
You received this message because you are subscribed to the Google Groups "robotframework-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to robotframework-u...@googlegroups.com.
To post to this group, send email to robotframe...@googlegroups.com.
Visit this group at http://groups.google.com/group/robotframework-users.
For more options, visit https://groups.google.com/groups/opt_out.

Pekka Klärck

unread,
Dec 5, 2013, 8:24:41 AM12/5/13
to Laurent Bristiel, robotframework-users
2013/12/5 Laurent Bristiel <lau...@bristiel.com>:
>
> Did anyone come up with a way to ease the install of a full Robot Test
> Porfolio ?

As Thomas already commented, you can host not only your tests but also
your libraries and even Robot Framework and RIDE in version control.
To get them to a new machine you only need to install version control
client, Python, and possible non-pure-Python dependencies for
tools/libraries you use (e.g. wxPython for RIDE, Paramiko for SSHLib).

> (only idea in the back of my mind is to go take a look at the devops tools
> like chef/pupett but it is a whole new world there....)

This is definitely a good option too. Depending on your setup, you may
also want to look at Fabric <http://fabfile.org> and STAF
<http://staf.sf.net>.

Please keep us posted about what you chose and how did taking it into
use work out in practice!

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

Jussi Malinen

unread,
Dec 5, 2013, 8:30:41 AM12/5/13
to pekka....@gmail.com, Laurent Bristiel, robotframework-users
And yet another solution is using Maven and Maven plugin and having all your dependencies available as jars from a maven repository… But it does have it's own problems. (Like the fact that you then have to Maven.)

- Jussi

Laurent Bristiel

unread,
Dec 6, 2013, 3:27:08 AM12/6/13
to robotframe...@googlegroups.com, pekka....@gmail.com, Laurent Bristiel
Thanks for your responses
I will do some trials of the different possibilities and let you know.

Laurent
> To unsubscribe from this group and stop receiving emails from it, send an email to robotframework-users+unsub...@googlegroups.com.

Laurent Bristiel

unread,
Dec 10, 2013, 4:36:44 PM12/10/13
to robotframe...@googlegroups.com, pekka....@gmail.com, Laurent Bristiel
Something still not clear to me, maybe someone could enlight me.
Let's say I include (unziped) Robot Framework and (unziped) Requests in GIT,
then once they are checked out on a machine, can I use them directly without any further "install"?
(calling folder_with_pybot/pybot --pythonpath folder_with_requests)
or do I have to go through some "install" step before beeing able to use Robot and Requests.

Putting it another way, when I do "python setup.py install", does it just move the files around or does it do something else?

Thanks in advance,
Laurent

Thomas Maier

unread,
Dec 10, 2013, 5:20:21 PM12/10/13
to Laurent Bristiel, robotframework-users, pekka....@gmail.com
> Something still not clear to me, maybe someone could enlight me.
> Let's say I include (unziped) Robot Framework and (unziped) Requests in GIT,
> then once they are checked out on a machine, can I use them directly without any further "install"?
> (calling folder_with_pybot/pybot --pythonpath folder_with_requests)
> or do I have to go through some "install" step before beeing able to use Robot and Requests.
I strongly advise to use pip to install all those libraries.

> Putting it another way, when I do "python setup.py install", does it just move the files around or does it do something else?
pip will do all this magic for you. It will put all files in right
place and also manage the version for each library.
After the library is installed and committed to git, you can clone
this repository to other machine
and it will just work.
>>> > To unsubscribe from this group and stop receiving emails from it, send an email to robotframework-u...@googlegroups.com.
>>> > To post to this group, send email to robotframe...@googlegroups.com.
>>> > Visit this group at http://groups.google.com/group/robotframework-users.
>>> > For more options, visit https://groups.google.com/groups/opt_out.
>>>
> --
> You received this message because you are subscribed to the Google Groups "robotframework-users" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to robotframework-u...@googlegroups.com.

Pekka Klärck

unread,
Dec 10, 2013, 5:57:49 PM12/10/13
to Laurent Bristiel, robotframework-users
2013/12/10 Laurent Bristiel <lau...@bristiel.com>:
> Something still not clear to me, maybe someone could enlight me.
> Let's say I include (unziped) Robot Framework and (unziped) Requests in GIT,
> then once they are checked out on a machine, can I use them directly without
> any further "install"?
> (calling folder_with_pybot/pybot --pythonpath folder_with_requests)
> or do I have to go through some "install" step before beeing able to use
> Robot and Requests.

I don't know about Requests, but with Robot you don't need anything
else than `robot` package that contains the framework source code.
This package doesn't contain interpreter specific start-up scripts
like `pybot`, `jybot` or `rebot`, but you can run `robot/run.py` or
`robot/rebot.py` directly. Obviously you can create the familiar
start-up scripts too if you want.

For more details about manual installation and the direct entry points
see the User Guide:
http://robotframework.googlecode.com/hg/doc/userguide/RobotFrameworkUserGuide.html#manual-installation
http://robotframework.googlecode.com/hg/doc/userguide/RobotFrameworkUserGuide.html#direct-entry-points

> Putting it another way, when I do "python setup.py install", does it just
> move the files around or does it do something else?

This depends does the package you install contain only Python code or
does it also contain C code or something else. Pure-Python packages
are, AFAIK, just copied to appropriate location, but C needs to be
compiled. In the latter case the resulting binary is obviously also
operating system dependent. In other words, you should be able to put
all your pure-Python packages to version control, and require users
only to install possible C-based dependencies using appropriate binary
installers.

Laurent Bristiel

unread,
Dec 20, 2013, 12:31:19 AM12/20/13
to Pekka Klärck, robotframework-users
Thank you very much Peke.
I finally chose this way and included the libs I need and RF itself into my SCM.
This was a good opportunity to move from some non-pure-python lib to pure-python-lib.
Now the deploy of the test portfolio on a new machine is basically just a SCM check-out. Excellent.

Thanks all,
Laurent Bristiel

Caleb Tenberge

unread,
Dec 20, 2013, 10:07:29 AM12/20/13
to robotframe...@googlegroups.com, Pekka Klärck
My team uses Maven and we extend the Robotframework standalone JAR. We build a JAR with all the libraries (including JAVA ones) in the JAR. Then run our tests using a script that basically has one line: java -cp robotframework-2.8.3.jar org.robotframework.RobotFramework $directoryWhereRobotTestsAreLocated 
Or we run the tests with Maven command and have the extended robotframework JAR as a dependency.

Shailaja(Riya)

unread,
Sep 1, 2016, 8:04:18 AM9/1/16
to robotframework-users
Hi All,

I have automation code in folder named "/home/automation". The automation folder have diff diff folder for testsuites, library, config .
Now i have done GIT Checkin of all automation folder.

IN the same machine i have git cloned automation code to some other path say /home/automation_new folder.

The things i have observed here is:
1. I have opend directory /home/automaton_new in RIDE
2. I am able to see all imported files in the folder "External Resources" of RIDE
3.If i make any changes in file for example /home/automation_new/resources/resources.txt 
=>>>3.1 Found External resource folder have file named resources.txt which shows source location as /home/automation/resources/resources.txt
         3.2 If you make any changes in  /home/automation_new/resources/resources.txt , the updates are getting saved at /home/automation/resources/resources.txt and not /home/automation_new/resources/resources.txt 
         3.3 When you run the script its picking the file which is exist /home/automation_new/resources/resources.txt , thats why changes made at step#2 are not getting used.

My question here is why these imported files are getting listed at External Resources Folder and  how to make changes in already imported file.
I bit confused about this robot behavior.

Could anyone explore more on this functionality of robot?

Michel Lawaty

unread,
Sep 2, 2016, 3:35:02 AM9/2/16
to robotframework-users
Hi Laurent,
we use wheel package we create including all keyword libs, custom python libs etc. installed via pip wheel (we call it our "robot library").
The test scripts, including optional reference file with keywords, are always stored next to the product in the respective version control.

The robot library is build/packaged on a build server, and also all unit tests are executed there. By this we try to make sure, to have a stable/tested testlibrary, which can be deployed into the virtual machines.

Hope this is clear, otherwise I will explain more.

cheers 
Michel
Reply all
Reply to author
Forward
0 new messages