How to setup Selenium & Gecko driver on MAC

Step 1. Install Selenium Create a maven project and add dependency for Selenium. To get maven details open https://mvnrepository.com/search?q=selenium. This will list down all selenium related repositories. Select selenium java and select latest version. You can find the maven details like: <!– https://mvnrepository.com/artifact/org.seleniumhq.selenium/selenium-java –><dependency>    <groupId>org.seleniumhq.selenium</groupId>    <artifactId>selenium-java</artifactId>    <version>3.141.59</version></dependency> Step 2. Install Gecko driver Download mac os specific GeckoDriver executable. This will download the tar file. unzip it to get the geckodriver unix executable. Copy this file into your project lib folder. Open the terminal and run command chmod +x gecko driver Here is sample code to test:

Performance Testing

Performance testing is a form of software testing that how an application is performing in a defined environment under specified load. Performance Testing is conducted to evaluate the compliance of a system or component with specified performance requirements. It checks the response time, reliability, resource usage, scalability of a software program under their expected workload. It also used for capacity planning purposes. The purpose of Performance Testing is not to find functional defects but to eliminate performance bottlenecks in the software or device. Types of Performance Testing Load testing – Measures the application performance with different load. Target is to checks the application’s ability to perform under anticipated load in production. The objective is to identify performance bottlenecks before the software application goes live. Stress testing – Meant to measure system performance outside of the parameters of normal working conditions. It involves testing an application under extreme workloads to see… Read more“Performance Testing”

Starting with Git in simple steps

Version Control System (VCS) To understand the git first let’s understand the version control system (VCS). VCS is a system that records the changes to file or set of files over time so that one can recall specific versions later on need basis. The complete version history get stored on a centralized repository. This centralized repository can be on local machine or on any. Central VCS server. To understand let’s take example where we code is stored using VCS. If somebody wants to make a change in the code, one need to checkout the code on local. When changes are done, new version needs to be added back to VCS. There are many VCS but subversion or SVN is most popular one.  Distributed Version Control System (D-VCS) Challenge comes when a large group is make simultaneous changes. To solve that Distributed version control system came. If you are familiar with… Read more“Starting with Git in simple steps”

Tips to analyse logs using unix commands

I have seen many developer struggling to analyze the logs on unix. They download the files and then open file in editors which is not efficient way to analyze the logs. Task can be achieved with much easier way using commands. First thing I advise to use bash command before starting, This was all commands will be saved in history. You can access the history of commands using “history” command. Display first 100 lines of log filehead -100 /logs/error.log Display last 100 lines of log filestail -100 /logs/error.log View growing log file in real time using tail commandtail -f /logs/error.log View growing log file in real time with last 100 linestail -100f /logs/error.log Display complete log filecat /logs/error.log Display specific lines (based on line number) of a file using head and tail command

Difference between Springboot 1.X and Springboot 2.X

We have been using Springboot 1.X in our applications and recently started coverting the existing code to use new springboot2.X version. Moving to Spring Boot 2.X will upgrade a number of dependencies hence some of our code needs to be changed. Below are the advantages or new features we came across, 1.Java 8 is minimum version 2.Tomcat 8.5 is minimum version 3.Hibernate 5.2 is minimum version 4.Gradle 3.4 is minimum version 5.Previously several Spring Boot starters were transitively depending on Spring MVC with spring-boot-starter-web. With the new support of Spring WebFlux, spring-boot-starter-mustache, spring-boot-starter-freemarker and spring-boot-starter-thymeleaf are not depending on it anymore. It is the developer’s responsibility to choose and add spring-boot-starter-web or spring-boot-starter-webflux. 6.Spring boot2.X initializr has dedicated auto-configuration to automatically configure the service.The behavior of the spring.config.location configuration has been fixed; it previously added a location to the list of default ones, now it replaces the default locations. If… Read more“Difference between Springboot 1.X and Springboot 2.X”

Agile Methodology of Development

Agile is a software development methodology to build software incrementally using short iterations of 1 to 4 weeks so that the development is aligned with the changing business needs. Whereas the traditional “waterfall” approach has one discipline contribute to the project, then “throw it over the wall” to the next contributor, agile calls for collaborative cross-functional teams. Agile isn’t defined by a set of ceremonies or specific development techniques. Rather, agile is a group of methodologies that demonstrate a commitment to tight feedback cycles and continuous improvement. With Agile development methodology – In the Agile methodology, each project is broken up into several ‘Iterations’. All Iterations should be of the same time duration (between 2 to 8 weeks). At the end of each iteration a working product should be delivered. In simple terms, in the Agile approach the project will be broken up into 10 releases (assuming each iteration is set to last… Read more“Agile Methodology of Development”

How to check the apache config on ubuntu

You can run the below commands to test and check the status of apache configuration. This will list the incorrect configuration or apache config which is breaking to start the apache, Go to apache installation directory, –  cd /etc/apache2 type the command  –  apache2ctl configtest

Installing apache, mysql and php on ubuntu

1.login using the putty to server ( You need to generate a key if using the AWS ) 2.Use the host name as ubuntu@publicip or instance name of server and select the key under auth generated from AWS 3.switch to root user by running the command sudo su 4.get the latest updates run below command sudo apt-get update 5.Installing apache sudo apt install apache2 6.Installing mysql server sudo apt-get install mysql-server 7.Installing the php (uninstall php if already installed using sudo apt-get –purge remove php*) sudo add-apt-repository ppa:ondrej/php sudo apt update sudo apt-get install php-7.0 8.Installing PHP extensions required such as MySQL,mbstring ,curl etc. sudo apt-get install php7.0-{mbstring,mcrypt,mysql,curl} i)Installing xml module used for sending emails on php sudo apt-get install php7.0-xml ii)Installing the curl for php sudo apt-get install php7.0-curl iii) Installing mcrypt module on php sudo apt-get install mcrypt php7.0-mcrypt 9.Enabling the restart on boot sudo systemctl enable apache2.service… Read more“Installing apache, mysql and php on ubuntu”

Mcrypt PHP extension required or PHP7 is missing mcrypt or PHP missing mcrypt module

Please note that higher releases of PHP ( PHP 7.1 or PHP 7.2 + ) do not support this module anymore. This has been eliminated. We need to use the php 7 if you want to use this module inside your project, follow the below steps after switching back to php 7, sudo apt-get update sudo apt-get install mcrypt php7.0-mcrypt sudo apt-get upgrade echo “extension=mcrypt.so” | sudo tee -a /etc/php/7.0/apache2/conf.d/mcrypt.ini Then restarts apache sudo service apache2 restart

Overriding Hosts file using Fiddler

Configure a domain name instead of localhost:8080 (server ip:port) This is similar to what we have been doing with windows Hosts file (Windows\System32\drivers\etc\hosts). Due to some limitation, in some cases you can’t specify the port number in hosts file along with the IP address to map with a DNS name and there we need to use such proxy server. Also you can achieve the same using nginx or apache. Example, localhost:8080 ourhints.com or 127.0.0.1:8080 ourhints.com You can open the fiddler and start capturing the traffic. To override hosts file, you can specify DNS mapping to an IP address as shown below or alternatively you can import hosts file. Save this configuration.   # can be used to comment any line similar to Host file on window. Now open any browser and hit the url http://ourhints.com  it will be routed to http://127.0.0.1:8080 or http://localhost:8080

Azure WebApp: Different ways to deploy website on Azure

I am here again with a new article. In this Article I am going to talk about the deployment of websites on Azure. There are lots of article available regarding this topic. I am trying to document all the different ways of the deployment of website in this Article. You will be able to see the different techniques of the deployment of website in single article. I hope it will be helpful for Azure Developers. There are various ways to deploy website on Azure WebApp. Some of the common techniques are as follows: Deployment using GIT. Visual Studio publish method. Deployment Using FTP. Powershell command to deploy website. Deployment Using GIT Prerequisite: Azure subscription. Create webapp using portal.azure.com. Appservice tab provides webapp option to create webstie. Steps: The following steps are required to deploy website using GIT: Step-1:  Select the created webapp in Azure. One of the tab “Deployment Credential”… Read more“Azure WebApp: Different ways to deploy website on Azure”