Posts

Executing a Maven job using Jenkins declarative pipeline

Image
In this article we will discuss Jenkins declarative pipeline, and see how we can build our own basic maven execution. Breaking down the pipes: I always use the following drawing to explain the general concept of a pipeline. Close your eyes and imagine a pipe construction that represents your companies release/deployment flow.  There is an entrance and exit point, and the entire pipe construction consists of different parts/stages that make the pipe hold and contain the flow. If one of the stages will break, the flow will stop and leak out of that specific part, until it is fixed. Now, open your eyes. That my friends, is a standard delivery pipeline.  In Jenkins, we have the possibility to build that pipe construction using something that is called the Jenkins Pipeline. At first, it was a script that described the different stages of the build, and later on it has evolved and grew in popularity and feature count. The Declarative pipeline syntax is a relatively new addition in J...

Containerization Recipe - Create a simple http server with nodeJS and docker

Image
It's been a while since I published my articles about docker, where I talked about the reason for the hype surrounding it, the influence it had on the way we perceive virtualisation and deploy software. I think it's time to move ahead and talk about application containerization. What are containerized applications? Application Containerization is a virtualisation method most commonly used to run and deploy distributed software without the need for a full virtual machine and ecosystem. In this article, we are going to touch and feel  virtualisation by creating a basic, very simple http server that is going to run inside a docker container.  First things first, you can't containerize what doesn't exist. So, without further ado, let's start writing out app.  My weapon of choice for this task is Javascript that provides a fairly good and intuitive (nodeJS) module for implementing http servers from scratch. I could actually use express, but to keep things simple, let...

Understanding XPath

Image
Following my latest article "CssSelectors not only for styling"  many people asked me about the difference between using CssSelector and XPath, and what are the benefits to using XPath as a locator. Sadly, I see many engineers struggling to identify an element by using other selectors, find themselves blindly copying a WebElement's XPath using the option provided by the browser. The deal is that the expression received is mostly highly flaky and ugly none the less. In this article, I'm going to cover this topic and see if we can demystify XPath and make it more accessible. What is XPath? XPath stands for XML Path Language. It is basically a Quarry language that was originally made for selecting nodes from an XML document that was defined by the W3C. XPath can be used for XML schemes and also in many programming languages (Such as Java, Python, PHP, and even C). How is it related to Test Automation? XPath is one of the 8 locating methods (9 if you count rel...

What's new in Test Automation? - Someone is pulling the strings once again

Image
Reading the headline of this article you are probably wondering what is the reason for the "Pulling the strings" analogy. Well, you will understand why in a minute. So what is Playwright? Playwright is an Open Source Node library for automating Chromium, WebKit, and Firefox by using a single API. It also supports Headless mode for all browsers on all platforms. Playwright interacts with the browser via the native Debugging protocol ( CDP ) and according to the contributors was designed with the primary goal of boosting up test automation, eliminating flakiness, speeding up executions and allowing better browser operation. All things mentioned make Playwright an interesting new option for Test Automation. Sound familiar? If all of that sounds familiar to you, it is not a coincidence. Playwright was created by the same team that developed the notorious "Puppeteer" (Which is a very similar Node library that offers control over Chromium via the Dev...

CssSelectors - Not only for styling

Image
As we all (Selenium users) know, There are 8 locator types that allow us to identify WebElements in our AUT. (And now, relative locators were added in the latest Selenium 4 release). In this post, I want to talk a little bit more about CSS Selectors. CSS Selectors are highly useful and powerful, and yet, for many Selenium users, it will often be the last choice. Perhaps, from lack of exposure to its capabilities. Let's start with defining what is a CSS Selector First, just to be in sync, CSS stands for Cascading Style Sheet. Little that we know, but a CSS Selector is actually a part of the CSS Ruleset that allows Web Developers to style a particular content of the DOM. In other words, by using CSS Selectors, we can "tell" the browser which HTML elements should be selected to have the CSS rule applied to them. What is a CSS Rule? A CSS rule is a statement that defines the style of one or more elements on the webpage. It consists of a selector and a declarati...

Git Internals - in a nutshell

Image
Git Internals - in a nutshell People use a tool or technology on a daily basis, sometimes for years, without truly understanding it in-depth or knowing how it really works. In this blog post, we will take a closer look at the wonderful world of Git. Let's start by establishing what git is Well, if we ask Dr. Google we will probably get the following answer: "Git is a distributed version control and version management system". Now, let's break down what we just read and see if we can find a more reader-friendly explanation. So, here is the deal. Git is the most widely used version control system in the world and quite surprisingly it is actually a well maintained and super popular open source. Why do we need git? Well, first of all, Git is able to track changes in files by using snapshots of the filesystem. Try to imagine that instead of source code you and your team are working on the same Google doc. What would happen? you would basically override ea...

Containers - Let's get moving!

Image
I recently posted an article about Docker and how it changed the way we perceive virtualization and deployment tasks. If you haven't read that one, I strongly recommend that you start by reading it before continuing to this one.  Who are you, Docker? In this short post, we are going to talk a little bit more about Containers. No, not the ones we use to ship out cars, clothes, electric Items and other goods. The ones we use to make it easier for us to manage virtualization and deployment tasks. What is a Container? Well, if we go to Google, we will find this definition: "A  container  is a standard unit of software that packages up the code and all its dependencies so the application runs quickly and reliably from one computing environment to another." Now let's try to better understand how it works. Take a look at the drawing below. Let' say we have a machine with a Linux OS. As we see in the above drawing there are several processes running o...