Can I run Magento TAF (Test Automation Framework) on Linux?

I am trying to configure Magento TAF on Ubuntu by following the Installation Guide . I read about it ...

Limitations of the current version:

  • Running remote tests
  • Using UNIX
  • Firefox profile via configuration file

... but I feel skeptical :)

  • Prepared main shell script (runtests.sh)
  • if I configure everything and I run selenium RC and runtests.sh, the Firefox browser opens ... (but it stands on a blank page).
  • Also: there are a few inconsistencies in the Installation Guide, so I suspect that Linux restrictions may be outdated. For example: page 2 says ...

At a basic level, the Magento Test Automation Framework will require the following software: (...) Selenium RC 2.0.3

... but on page 4 ...

Download and install Selenium RC 1.0.3 (...). version 2.x, Download Selenium RC (NEW 2.0b is now available), but automatic test cases will probably not work with it.

Question : Is it possible to run Magento TAF on Linux?

Thanks!

+8
linux installation testing automated-tests magento
source share
4 answers

The latest public release works fine on Ubuntu / Debian, but the documentation is focused on Windows.

We got tests running on a Selenium headless installation using Google Chrome on an Ubuntu 11.04 64bit server. Screen shots are only possible with Firefox, but Selenium requires version 3.6 of Firefox, so we’ll need to downgrade the Mozilla browser to enable this .

[Update: March 27, 2012] We tried again with Firefox 10 after updating our packages and, to our great surprise, it worked! We now have screenshots!

I wrote a tutorial (updated March 27, 2012) that describes how to install the new Selenium Eyeless Environment with Magento TAF on an Ubuntu server. Hope this helps.

+3
source share

Yes it is possible.

I had the same problem using Selenium Grid in version 1.x. Download the Selenium Driver (Selenium 2). I got tests running on Debian without changing runtests.sh.

If you plan to test several OS / browsers, you can find a quick start for Selenium Grid 2 . This can be useful if you host your Magento code on a linux web server. Fortunately, it’s now much easier to set up the grid than it was with Selenium 1.

Start the server using

java -jar selenium-server-standalone-2.15.0.jar -role hub 

By default, the server will run on port 4444. You can start the server in a Linux box without a desktop environment (for example, a development web server).

Then you install the boxes with the desktop environment (for example, a Windows machine and a Linux machine). Now you download a separate server library for each machine and start the client:

 java -jar selenium-server-standalone-2.15.0.jar -role node -hub http://192.168.1.2:4444/grid/register 

You must change the IP to the IP address of your Selenium server (and change the port if you did this in the first command). By default, the client will run on port 5555. If you want to use a different port for the client or want to run multiple client instances, you can define user ports using the -port switch.

Note : don't care too much about the software versions mentioned in the document. It seems to be a bit outdated.

+5
source share

Yes it is possible.

I created an init script selenium-headless that simplifies the execution of TAF on the server.

+2
source share

The TAF project is under development, this is only a preview has been published. The team wanted to share ideas and provide valuable benefits (automated tests) for everyone who is developing Magento. TAF will have changes, it will be restructured and polished before the official release.

Documents are a bit outdated, they give an overview of the use of tests. Currently, TAF can be run on both Windows and Linux, and both Selenium 1 and 2 can be used to run them.

Summary

  • Yes, TAF can be run on Linux.
  • Ignore documentation inconsistencies
  • If the tests fail, repeat the Selenium configuration and installation check.

PS And sorry for the problems - this version is just a working draft. It will be improved, documentation will be checked for reading and informative messages will be provided.

Thanks for using TAF, anyway :)

+1
source share

All Articles