Is it possible to run Magento TAF (Test Automation Framework) on Linux? - linux

I'm trying to configure Magento TAF on Ubuntu, following the Installation Guide pdf.
I read on it...
Current version limitations:
Remote tests executing
UNIX running Usage
Firefox profile through configuration file
...but I feel skeptical :)
There is a main shell script prepared (runtests.sh)
if I configure everything and I execute selenium RC and runtests.sh, firefox browser opens... (but stands on empty page).
Furthermore: there are several inconsistences on the Installation Guide, that's why I suspect that Linux restrictions perhaps are deprecated. For example: on page 2 says...
At the base level, 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 (...).The latest available
version is 2.x, Download Selenium RC (Now available NEW 2.0b), but
automated test cases will probably not work with it.
The question: Is it possible to run Magento TAF on Linux?
Thanks!

Yes, it is possible.
I had the same problem using Selenium Grid in version 1.x.
Download Selenium Driver (Selenium 2). I got the tests running in Debian without modifying runtests.sh.
If you plan to test with several OS / browsers you can find a quick start tutorial for Selenium Grid 2. This may be helpful if you host your Magento code on a linux webserver. It's much easier now to set up the grid than it was with Selenium 1, fortunately.
Launch the server with
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 on a Linux box without a desktop environment (e.g. a development web server).
Then you set up boxes with desktop environment (e.g. a Windows machine and a Linux machine). Now you download the server standalone library for every 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 have to change the IP to the IP of your Selenium server (and change the port if you did so in the first command). By default, the client will run on port 5555. If you want to use another port for the client or if you wish to start several client instances, you can define custom ports using the -port switch.
Note: don't care too much about the software versions mentioned in the document at all. It seems to be a bit outdated.

The latest public release works fine on Ubuntu/Debian pretty much out of the box, but the documentation is Windows-orientated.
We got the tests running on a headless Selenium installation using Google Chrome on Ubuntu server 11.04 64bit. Screen-shots are only possible when using Firefox, but Selenium requires version 3.6 of Firefox, so we'll need to downgrade the Mozilla browser to enable that.
[Update: March 27th 2012] We tried again with Firefox 10 after upgrading our packages and to our biggest surprise, it worked! We've now got screen-shots!
I wrote a tutorial (updated March 27th 2012) that outlines installing a fresh headless Selenium environment with Magento TAF on Ubuntu Server. Hope that helps.

Yes, this is possible.
I made a init script selenium-headless that simplifies running the TAF on a server.

The TAF project is under development, this is just a preview was published. The team wanted to share ideas and give valuable benefits (automatic tests) for everyone, who is developing for Magento. TAF will have changes, it will be restructured and polished before the official release.
The docs are outdated a little, they give general overview of the tests usage. 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.
Do not mind documentation inconsistences
If tests do not run - re-check your configuration and Selenium installation.
P.S. And sorry for issues - this version is just a working draft. It will be improved, documentation will be proof-read and informative messages will be provided.
Thanks for using TAF, anyway :)

Related

Memory profiler is being disabled while running Chrome dev-tool on Node inspector

I am trying to find away to analyze the memory consumption in a NodeJS application. I am trying to use Chrome dev-tool on top of node inspector. It's quite basic to start and I am listening on default 9229 port as suggested here.
After connecting to the port from chrome, I can see the consoles and files under Node but I am unable to run memory snapshots. It's just disabled.
Opened the inspect screen and clicked on the inspect.
Then I see these options completely disabled.
On hover of record button, I see a message "Another profiler is already active" which I don't have a clue to.
What could be the underlying issue here?
System specifications
Chrome - 83.0.4103.97
OS - Windows 10
Node - 8.9.4
Any help is appreciated!
Finally after trying out different versions, new Microsoft edge, I found out that it's an issue with version incompatibility.
I tried with Node 9.11.1 and it didn't work.
But at end switched to 12.16.1 and it works there. For now I assume chrome/chromium dev-tools supports higher versions of NodeJS.
I also found that the platform needs to be the same.
That is to say, if you run nodejs on Linux, you also need to run Chrome on Linux.

Is IE11 webdriver support in linux for selenium testing?

I for now do need to run IE 11 in Ubuntu 16.04 for selenium test cases.
Using Wine and PlayOnLinux can be helpful but there is no IE 11 as far as I know
Internet Explorer is a product of Microsoft and It can only work properly with Windows OS.
There is no any official way suggested by the Microsoft to install the Internet Explorer on Ubuntu OS.
There are some tricks or hacks available with the help of that somehow you can manage to install the older version of IE on your Ubuntu OS but it's performance will be very low. It can get hang or crashed frequently. Also Ubuntu does not has the appropriate directory structure, environment and other settings which are necessary to run IE properly.
The best work around for using IE on Ubuntu OS is to install any Windows OS using virtual machine. Than you can try to access that Windows OS from your Ubuntu OS and try to run your tests with IE browser.
There is also no selenium Web driver support for IE on Linux OS.

(mac) Can I run Microsoft Edge in Selenium without having the browser installed on my pc?

I'm woking on a selendium and airflow project for bing rewards and I'm hoping I don't have to install Microsoft edge as my computer is always running out of space. Does anyone know off hand if it's possible to make Selenium scripts for a driver if you dont have the dmg installed on your computer?
yes you can do that using RemoteWebDriver.
but make sure your remote device, cloud etc must have that respective browser which is pointed by RemoteWebDriver.
Refer below:
https://github.com/SeleniumHQ/selenium/wiki/RemoteWebDriver
Example code:
https://gist.github.com/djangofan/4127074

Running Selenium Tests through Linux Server

This is a general question, but I want to run my Selenium tests on a cloud Linux Server. I am accessing this server using PuTTY, which is just a terminal.
I was wondering how I could get my Selenium scripts to run on this VM.
Currently I have a Selenium Grid set up with physical machines, I just do not know how to set one up through a server where the only communication I have with it is through PuTTY and a terminal.
To run Selenium from a Linux server that is "terminal only", as you put it, is to install a GUI inside of the server.
The most common GUI to use, is Xvfb. There are plenty of tutorials out there on how to run GUI programs like Google Chrome and Mozilla Firefox through Xvfb.
You can also use PhantomJS to do a headless Automation, that doesn't need any GUI installation on Server.

How to use ec2 instance as personal dev box using intellij as IDE?

I have searched the questions and have not found an answer to this one:
I am developing an existing project (git repo) that runs only on Linux. For the time being I have at my disposal only a windows laptop which I cannot modify. This laptop has Intellij installed and internet access. I cannot, for example, create a Linux VM on this laptop.
Is there a way I can put the project code on an Amazon ec2 Linux instance and build the project on that instance, while viewing and developing the code in Intellij? All compilation and code execution has to be done remotely, on the ec2 Linux instance. I cannot build locally and push from the windows laptop.
2 possible configurations might be:
(1) install intellij on the ec2 instance and x-window in from windows to view the intellij screens;
(2) use the intellij on the Windows laptop and somehow point the intellij to the ec2 instance in order to view, edit, build, and run the project on that instance.
Any ideas are greatly appreciated!
ec2 with enough memory for development is billed / hour. For 32gb RAM it's >$80/month (always online ~450h).
You could use wls 2 under windows. You can install IDEA and use it trough X server like
VcXsrv and access to windows files. It's not the best idea to run full GNOME (even xfce4). Google chrome also works very well
Downsides are:
(still) slow access to drive compared to raw Linux
I cannot configure WSL to access same VPN as in Windows. It simply cuts off internet connection for WSL while I click connect in windows.

Resources