Dockerized webdriver testing for Microsoft Edge - selenium

I'm helping set up web testing frameworks for a team that runs web tests on a project that already supports Firefox and Chrome. They want to extend it to be able to test Microsoft Edge.
So far we've been using Selenium grid with Docker and Jenkins but only for Firefox and Chrome.
Is there a way to extend a set up like this for Microsoft Edge? Or is there a way to dockerize Micrsoft Edge testing?
I know there is a webdriver for Edge compatible with selenium grid but I've seen nothing about how to dockerize it.
I want to use Docker because it keeps all the Jenkins slaves clean and allows for controlled versions of browsers, and we can control multiple containers with Docker-Compose.

You can try to use WebDriver with Windows Insider to test web projects with MS Edge.
WebDriver is an emerging standard through which Web developers can write tests to automate Web browsers for site testing. It provides a programmable remote control for developing complex user scenarios and running them in an automated fashion against your website in a browser.
Reference:
Bringing automated testing to Microsoft Edge through WebDriver
Other useful links:
Automated browser testing on Microsoft Edge, Firefox and Chrome for free.
Free Testing on Microsoft Edge

Related

Need a BrowserStack equivalent that supports Electron apps

At my previous job, we used BrowserStack to run our regularly-scheduled automated tests for web browsers and native mobile apps. At my current job, we need that same sort of functionality for our Electron desktop app which BrowserStack sadly does not support. It is important to note that we are still using Selenium rather than WinAppDriver as it is an Electron app. Can anybody please point me to a suitable service that supports this?

What is the difference between Selenium Server and Selenium RC?

Selenium Webdriver - For interacting directly with browser
Selenium RC - Interacts with browser through a Server
If i need to test remotely using Web-driver, i need to use Selenium Server
So when we say Selenium Server in third point, does it mean then the
same server used by Selenium RC?
Is selenium server already included with selenium RC? If need to do automation using selenium RC, do i need to download Selenium Server separately?
Selenium Remote Control (RC) and Selenium WebDriver both are test automation tools supporting different programming languages but come with some critical differences.
Selenium RC
Till a couple of years back Selenium RC was an important component in the Selenium test suite. It was the testing framework that enabled a QA or a developer to write test cases in any programming language in order to automate UI tests for web applications against any HTTP website. Selenium RC comprised of two parts:
Client libraries for the preferred Language Binding Art.
A server that launches and destroys web browsers automatically.
Selenium RC’s architecture was a bit complicated as:
Developer/QA personal needed to install and launch a separate application called Selenium Remote Control Server before running test scripts.
The Selenium RC server acted as a mediator between the browser and Selenium commands.
The sequence of execution was:
The Selenium RC server injected a Javascript program known as Selenium Core into the browser client.
Once the Selenium Core program was injected, it started receiving instructions from the RC server based on test scripts. Selenium Core executed all these instructions as JavaScript commands.
The web browser executed all the commands given by Selenium Core and returns the test summary back to the Selenium RC server.
But there were limitations as follows:
Selenium RC Server's architecture was pretty complicated.
Execution of test scripts was time-consuming as Selenium RC uses JavaScript commands as instructions to the browser which resulted in slow performance.
API’s were less object-oriented.
There was no support for headless browsers.
All these limitations of Selenium RC Server led to the development of the new robust automation framework Selenium WebDriver.
WebDriver
From Selenium perspective, the WebDriver Interface is similar like a agreement which the 3rd party Browser Vendors like Mozilla, Chrome, Internet Explorer, Safari, etc have to adhere and implement the same. This would in-turn help the end-users to use the exposed APIs to write a common code and implement the functionalities across all the available Browsers without any change.
This usecase
To execute your testcases:
Locally: Selenium Client (jars) which is a bunch of API's would suffice your need.
On Remote machines(Selenium Grid): Selenium Server would solve your purpose.
You can find a relevant discussion in What is difference between Selenium Standalone Server and Java selenium Jar files

Does selenium grid runs only Selenium command or also code chunk from different library

I have done my automation in Robotframework and I am using many libraries like Selenium2Library, Sikuli Library, HTTP Library, OS library and few more.
When I am running test on Selenium Grid, it invokes the browser on node and runs those steps which are from Selenium.
However, it does not run commands from Sikuli Library. Is selenium grid capable of running keywords from different libraries?
No, the selenium grid only works with selenium. The selenium grid is a server much like a web server. It listens for specific commands, and performs those commands. It will only respond to commands from selenium clients.
When using Sikuly in Robot Framework it is necessary to first setup the external sikuly server and then connect to it from Robot Framework. Typically this is a localhost connection, but connecting to an external host is also possible.
When using Selenium Grid, a connection is made to an anonymous node and thus the host to which the Sikuly server is runnning as well. Did a quick check in google and found that getting the hostname/IP of the running node from the hub is possible. Using the code example here I think it should be possible to create a direct connection to the Sikuly server.

What version of selenium should I install for SauceLabs or TestingBot?

I am planning to write Selenium tests for my application and want them to run on a wide variety of browsers and versions. I am also planning to use a virtualisation service such as SauceLabs or TestingBot.
However, as far as I can tell there are a number of different Selenium components such as:
Selenium WebDriver itself
Chrome Driver
InternetExplorer Driver
Opera Driver
Safari Driver
etc
Furthermore, I read in articles like https://support.saucelabs.com/customer/portal/articles/2005317-default-selenium-version-for-each-firefox-browser-version that you might be best advised to change the versions of these to get better compatibility depending on the version of the browser you are targeting.
I am confused as to whether I need to have different versions of Selenium and other components installed locally OR should I just have the latest version of Selenium WebDriver installed locally, SauceLabs/TestingBot will have specific versions on their VMs and the two will magically work together?
Thanks for any advice!
If you're executing on the cloud, be it Sauce, TestingBot, BrowserStack, etc., you won't need to have the Selenium server or any of the browser drivers installed locally.
That being said, however, I would advise keeping the standalone server along with chrome-driver and the IE driver (and/or any other browser drivers you need) installed locally for debugging tests under development. It's much easier while you're coding to run a test on your own machine and get it to the point where it's working as expected prior to committing. You can then use Sauce or whatever cloud hosted grid solution for your official test runs.
I typically just have the most recent versions installed locally, but this could be different for you based on your requirements. At work, I develop automated tests for internal applications. All of our users are all on the same pre-configured Windows image with the same browsers/versions. As such, I only need to worry about the supported platforms in my tests. If you're working with a public-facing application, you might consider referring to the supported browser/versions for the application. Juggling different versions of the same browser on a local machine can get pretty tedious, so even then, if I were in that situation, I'd likely configure my machine to the most common platforms and execute locally while in development, then use something like Sauce for executing on specific platforms. In short, I like to keep my local environment as clean and simple as possible, and let Sauce do the heavy lifting of managing all the different browser/version/os combinations for me.

What is your testing workflow for client-side web development on OS X?

What would be a good workflow on OS X for testing client-side code (HTML/JS/CSS) for browser compatibility and other issues across all major browsers?
I do my web development with Textmate (HTML and JavaScript), CSSEdit (CSS), and use Safari's Web Inspector, mainly for checking the JS console. I do have Parallels with Windows XP on it, but haven't tuned it for web development at all.
We develop on Macs too so what we usually do is testing and debugging in Firefox with the help of the Firebug plugin and the Web Developer toolbar. We then cross-check stuff in Chrome/Safari using Chrome's built-in Inspector in case of any discrepancies.
For testing on Windows we use a dedicated Windows machine that we can access through Remote Desktop which has some Virtual Machines running various versions of Internet Explorer (one VM for each would be nice, but we just use one for IE6, one for IE 7 and use the IE version that's installed on the remote machine as the third option).
A colleague of mine has a setup with VMWare and running IE right off his Macbook in a VirtualMachine.
As far as I can tell debugging in IE 6 is pretty hard, but some of the newer IE versions have a pretty decent Inspector similar to the ones in Safari and Chrome.