Build your own REST API from scratch - Part 1

RESTful API is a key program interface that allows connectivity for endless amount of applications.  I have actually published an article with a brief introduction to REST API which you can find in this blog post
In this article we are going to kick it up a notch and go step by step in building our own REST API from scratch. 
Choose your weapon...
For this task we are going to need the following: nodeJSnpmexpressVisual Studio Code 
Create our project
First of all, I'm going to create my project folder, and open it in vs code.

Next, I will open a new terminal in VS Code and execute $npm init.

For this simple example we can leave everything at default and just hit Enter/return to finish our setup.
Next, I am going to install my dependencies by running $npm install.

Once the setup is finished, I am going to see my project folder populated with package.json, package-lock.json files, and the node_modules folder. which will contain my dependencies. 

Let's start writing our code...
I'm goin…

Executing a Maven job using Jenkins declarative pipeline

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 Jenkins. It was …

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

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's s…

Understanding XPath

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 relative locat…

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

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 SourceNode 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 Tools Protocol and is …

CssSelectors - Not only for styling

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 SelectorFirst, 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 declaration, and it will app…

Git Internals - in a nutshell

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 each other's cha…