Showing posts from June, 2016

Docker images for test automation

Here are some images that the test automation community would love:

Docker images for Selenium Standalone Server in Docker with Chrome & Firefox plus video recording support 2.0 / GhostDriver
A docker image of PhantomJS 2.0 / GhostDriver that's compatible with selenium grid hub Docker image of Protractor with headless Chrome - Container of Protractor running on SauceLabs. Base image for cucumber-p0ro Repository for automated builds of appium server container…

Docker + Compose + Selenium Grid = Automation awesomeness!

I have been trying to get my hands dirty with Docker and Selenium for a while. Finally what inspired me was a recent meetup where I saw some cool test automation reporting frameworks. No I did not see Docker there, but when I researched about Allure the test reporting framework I stumbled upon this cool video where the developer has used Docker Selenium and Allure:

Why Selenium Grid & Docker?
If you have been through the journey of CI (continuous integration), as an automation engineer you would know the challenges of building a reliable framework is time consuming. This concept has revolutionized our way of thinking of how you build a selenium Grid, no more config mgmt/provisioning machines. All you need is a VM that can run the docker images as a container.
Contributors to this project who have made it a reality: Matt Smith Leo Galluci 
Selenium Grid
Selenium grid has been there for a while and matured with time. What it does really well is speed up your CI massively! How? By run…

Configure IntelliJ for a full stack JavaScript Automation

There are some crucial IntelliJ plugins to install:
Base64 for IDEA and StormBashSupportBootstrapBootstrap 3ddescriber for JasmineJS ToolboxNUnitJSMarkdown SupportAs a peace offering to the mighty IntelliJ, use Java as project SDK: I prefer to configure four separate modules, to help separate back-end vs. front-end JavaScript dependencies: Add the bower_components library to the client module, and the node_modules library to theserver module: And be sure to enable JavaScript libraries in the editor. Per best practices, we do not commit the local IntelliJ IDEA configuration folder (/.idea/) to the repository, instead adding it to the .gitignore file like so: #IntelliJ IDEA local workspace .ideaHowever, for some developers' convenience(and others' dismay) we do commit the four IntelliJ module .iml files to the repository: client.iml server.iml e2e.iml doc.iml Source:


Enable WebGL on Chrome

First, enable hardware acceleration: Go to chrome://settingsClick the + Show advanced settings buttonIn the System section, ensure the Use hardware acceleration when available checkbox is checked (you'll need to relaunch Chrome for any changes to take effect) Then enable WebGL: Go to chrome://flagsEnable Override software rendering list  , WebGL Draft Extensions and WebGL 2.0 PrototypeEnsure that Disable WebGL is not activated (you'll need to relaunch Chrome for any changes to take effect) Then inspect the status of WebGL: Go to chrome://gpuInspect the WebGL item in the Graphics Feature Status list. The status will be one of the following:Hardware accelerated — WebGL is enabled and hardware-accelerated (running on the graphics card).Software only, hardware acceleration unavailable — WebGL is enabled, but running in software. See here for more info: "For software rendering of WebGL, Chrome usesSwiftShader, a software GL rasterizer."Unavailable — WebGL is not available i…

Node NPM error: URIError: URI malformed at decodeURIComponent (native) at Url.parse

Problem:If you are using node and accidentally change your proxy settings every time  you run npm you get something like this:

NPM error: URIError: URI malformed at decodeURIComponent (native) at Url.parse

What Happened there?
Once a bad URL makes it in to the config file, it is broken, but you as the operator are unaware until you do another operation. This was confusing when I was setting both HTTP and HTTPS proxies. It delayed me from finding the real problem. To resolve this issue it would be great if the URLs were validated before they went in the file. This would reduce confusion.

How to solve this?

You cannot reset npm config from command-line because the npm command doesn't work anymoreReinstalling node will not helpLocate where npm has its global settings stored: C:\Users\Ady\.npmrcedit the file and everything is back to normal!
This solves a similar but different problem:

What is reactor??

Image Source: Fusion Reactor from MIT:

In simple words: Reactor is what makes multi-module builds possible
Reactor is a part of Maven that allows executing a goal on a set of modules.  It determines the correct build order from the dependencies stated by each project in their respective project descriptors, and will then execute a stated set of goals. 
It computes the directed graph of dependencies between modules, derives the build order from this graph and then executes goals on the modules. In other words, a "multi-modules build" is a "reactor build" and a "reactor build" is a "multi-modules build" :) 
Reactor does this: Collects all the available modules to buildSorts the projects into the correct build orderBuilds the selected projects in order How this fits in the test automation space? Separate out: Test Da…

Google Testing Blog - The Inquiry Method for Test Planning

An excellent read on the Inquiry Method for Test Planning

Automate Android native applications by installing the apk file on your PC / without the need of a mobile phone

Problem: Need for automating an android application using Appium/Selenium but without emulators and without a mobile device

Solution:  Install android app inside chrome as an extension! hOW?

Prereq: Chrome 37+ for the solution to work!

How this works?
The App Runtime for Chrome (or ARC) is the piece of software that allows Android apps to run in Chrome. In the same way that ART (and the older Dalvik) currently run Android apps in Android itself.

What we will need? ARChon Custom Runtime: ARC is officially only designed for Chrome OS at the moment. To get around this, developer vladikoff created the ARChon Custom Runtime, which not only allows Windows, OS X, and Linux to run Android apps, but also removes the limit on how many can be run.Unpacked Extension: Extensions normally come from the Chrome Web Store or prepackaged in a .CRX file. For the purposes of Android apps, we're going to use unpacked extensions. These are folders that contain all the files for an extension (or, in this cas…