Posts

Print emojis using python (😀, 👍, ...)

Hello World, Everyone of us usage the emojis at some point, because its quiet expressive. and when you are a programmer then it becomes more curious to print emoji characters out. I thought of printing emojis out for the logs , most of the time when I used to print the logs specially for the errors or exception message then I always try to express the message with more expression .  Well, you can print emojis using python as well. For that we can follow one of the following things: 1- Unicodes 2- Library 1- Unicodes: There are unicodes for every single character that is going to be printed out and that's why there are unicodes for the emojis too. For example : Unicode for thumbs up is "U+1F44D" which in python is going be be as "U0001F44D". As you have noticed that we are replacing "+" with "000", and not only that we also append "\" in front of this unicode while printing. So finally the thumb up emoji can be printed with : print(...

Scraping with Python

Hello World, There is more information on the Internet than any human can absorb in a lifetime. What you need is not access to that information, but a scalable way to collect, organize, and analyze it.  Then, You need web scraping.   So let's discuss this scrapping thing. Now, the Scrap Means: to take out something from somewhere and If we add 'web' to it, then it means to take out something from the web resources.  Web scraping automatically extracts data and presents it in a format you can easily make sense of. In this tutorial, we’ll focus on its applications in the webpage data extraction, but web scraping can be used in a wide variety of situations. Roadmap for this blog: - Setup with the tools and library - Basic of the HTML DOM - Scrapping Rule - Coding part Pre-Requisite: - A basic understanding of programming concept in python ---------------------------------------------------------- Getting Started with the tool...

Jenkins Pipeline

Hello World, Since we know, what is Jenkins and how to use it  So  let's talk about its plugin called "Jenkins Pipeline". If you missed the blog post about the Jenkins then you can access and read from here . What is it? Official definition: Jenkins Pipeline (or simply "Pipeline" with a capital "P") is a suite of plugins which supports implementing and integrating  continuous delivery pipelines  into Jenkins. Explanation:   So from the above official definition, we can conclude that Jenkins pipeline helps us to integrate multiple jobs into one Jenkins job and since all job are interconnected(which also known as  Stage ) so we can get the job outcome for those, based on that we can take further decision. So overall, It helps us to track the multiple stages. -------------------------------------------------------------- Where to and Who can use? Area of use:   Since Jenkins is a DevOps tool, which can automate the repetitive...

Re-Use your maven project into another maven project

Image
Hello World, Once I needed to use one of my ongoing java+maven projects into another java+maven project as its dependency.  So I decided to publish the work, that I did to solve my problem. So, just to give you a quick picture of the problem, the following is the flow/requirement: So to use your already existing java+maven project, you have to just add the reference of it in your new project's POM.xml file as follows:             And, in your existed project POM file add a 'Maven Jar Plugin' under build                And,  Now you build/Install("mvn clean install") your existing project to get the jar in the following directory location: "path_to_m2/repository/groupID /artifactID /version /* -test-jar.jar" and you are ready to go.

A crawler for serenity reports

Image
Hello World, In this article, we will see and build a crawler for the serenity reports. #POINTs to be discussed Beautifulsoup module for the serenity's index.html Integration/Execution of crawler Crawled data insertion into MongoDB Now, Serenity has 2 versions, v1 and v2 and each version are having a different index.html design. : Serenity-v2 report summary screenshot(Covered) : Serenity-v1 report summary screenshot (Not covered in this crawler) And we will see the summary extraction for only serenity-v2 HTML. In the crawler, I have divided all crawler into 4 sections/parts: - Index file collection - Project Meta extraction - Report Summary extraction/Scrapping - Formatting the scenario outcomes So, let's discuss each section of the crawler, what exactly they are accomplishing. :: TODO here is the crawler Code:  https://github.com/ashusc/crawlers/SerenityCrawler.py ###################### # Import section # #################...

Test Automation Infrastructure

Image
Hello World, Test Automation infrastructure, When we move towards the automation in testing, then it's better to have a good automation infrastructure to support our automation testing CI/CD and reporting. Now, you might ask questions like, - Why we would be needing an infrastructure in automation? - Is it necessary to have an infrastructure? - How it will be helpful? - Will it be useful? - Will it require maintenance? and a lot of question like above. So let's discuss these questions. Why we would be needing an infrastructure in automation? Well before answering this question directly, we need to understand what does infrastructure mean?  So Infrastructure is defined and structured approach to deal with any technological problem, hence infrastructure is a solution to solve the technological integration and its management. Is it necessary to have an infrastructure? So, although it is not necessary to have proper infrastructure, but consider this, If we would b...

Jenkins Job Build for Maven and Cucumber

Image
Hello World, Moto:  In Jenkins, we all might be having a question which is,  "How to customize the Jenkins job build with the parameters" In this blog, we will see the build strategy configuration for the Jenkins job for Maven and cucumber automation project. Platform: Jenkins 2.121.3 Plugin(s):   Active Choices Parameter , Active Choices Reactive Parameter Solution: Step 1: Create 3 variables (1- Active Choices Parameter, 2- Active Choices Reactive Parameter) Step 2: Let's say those variables are the 'BuildStrategy'(Active Choice Parameter), 'Options' (Active Choice Reactive Parameter) , and 'Execute' (Active Choice Reactive Parameter) Step 3: Inject the groovy script for all variables accordingly, as shown below For 'BuildStrategy' inject this return ["Build Complete Suite:selected", "Build only selected features", "Build with custom provided tags"] For 'Options' inject...