Breaking while loop in Java

import java.util.Scanner;

class TestingBreakWhileLoop {
public static void main(String[] args) {
int i;

Scanner input = new Scanner(System.in);

while (true) {
System.out.println(“Input an integer for this test program”);
i = input.nextInt();

if (i == 0) {
break;
}
System.out.println(“You have entered …  ” + i);
}
}
}

Sunset from Manhattan New York

Sunset from Manhattan New York. Sunrise and sunset are the beautiful time in a day from anywhere in the world.

Enjoy the Sunset near Central park, New York. Manhattan is one of the must see places in USA.

 

My google adsense story

My google adsense story 🙂

Google Adsense has been around more than 10 years from now. But I did not pay attention much until I read an article that said “top earners of Adsense ” which is monthly ‘makings’ is more than a $100k..

How did I start? About my background?

At that point of time, I was not aware of WordPress or domain services or even the difference between webhosting vs domain services. The main reason was my career was teaching and little bit of freelancing experience on digital marketing and functional testing.

YouTube is my teacher who upgraded me as a so called techie guy …I easily started WordPress development but the challenge was hosting the content from WordPress.

My failed attempts on web hosting and google Adsense approvals…  By that time I got a deal from godaddy and registered my domain. But hosting from WordPress was still challenging me.

My inability to successfully host WordPress site paid me off ! HTML 5, CSS, Node.JS, Java scripts …all technical stuffs got added to my skill set and I started Github hosting, My godaddy is linked to Github and finally my site www.shalimatech.com was live on around Oct 2016.

I started dreaming about the precious article I read “top earners of Adsense “. That dream had only 2 days life as I got email from google Adsense that my first request on Adsense program was rejected  saying “not enough content”

Okay, let me add more contents..btw site quality was poor like responsiveness, mobile and most modern browser support, along with contents which I wasn’t aware or did not pay attention to that as my primary focus was to make money   ..greedy me right. YouTube did not help me much on this ..I added 5 more cooking recipes and 10 more technical blogs on my site. Submitted with much more confidence. This time I did not have to wait much..google immediately informed me about their decision of rejection on my hard work.

My 3rd attempt. This time again google advised – Improve contents! I decided to fill contents ..added 50 cooking recipes and 20 technical blogs .. My confidence level was so high, I ignored about other technicalities that google looked for. Resulting 3rd rejection 

Bye to Bye to Github ..that is the first thing I did on the day I received rejection email from google.

Coming back to WordPress ! ..this time YouTube came to rescue..got a nice video on how to develop and host a website. I looked again for deals…this time web hosting deals. Found one hostgator offered 1 cent for 1st month.

Finally godaddy hostgator WordPress tie up went live on 2016 Christmas holidays season. .. I moved all Github contents that I had to My site www.shalimatech.com.  the site got new design, all new modern features..cudos to wordpress.com and wordpress.org.

Now google Adsense approval..this is going to be my 4th attempt..by this time my site was getting good views and user coverage mostly Europe and south American viewers..I need to analyze why Europe and South America ..why not others….May be my next research topic and subsequent blog!

I was confident and submitted My request for adsense approval..I did it this time ! Got email within 3hours from google adsense approving my site.

I was at New year party at friend’s time..welcoming 2017…it doubled my happiness. But I realized google still fully ready to give me the job!

I learned that google has 2 stages of approval and this was first stage. I again opened YouTube and other blog sites..while waiting for approval ..I continued adding blogs and I hit 60 technical blogs milestone..

I got Google’s blessing on Jan 6th  2017- my site is adsense ready and I started thinking about my precious blog  “top earners of adsense ” I read. And dream started again..

My First day earning .. I setup ad codes on 6th evening and to my surprise Jan 7th reports showed My first day earning $ 1.82!!! I was so happy and started sharing my success story to my friends..

Today is my second day…… I am frequently logging to my adsense account and checking reports as well as WordPress dashboard and  view statistics…

I hope my story will certainly inspire you ..this journey made a decent programmer and a “techie” …

I am going to post a blog on tips and tricks on how to get easily google approval ..WordPress site development tips and tips for domain registration and hosting soon.. Good luck…

TestNG quick summary for basic users

TestNG quick summary for basic users

 TestNG’s is Selenium plus reporting features. It is easy to generate reports using Listeners and Reporters in TestNG

 Features of TestNG includes the following,

1)      Annotations – please refer my annotation blogAnnotation – TestNG’s test case priority

2)      Supports parameterization/ data driven testing

3)      Test cases can be grouped and parallel testing is allowed.

Web server vs application server

Web server vs application server

Web server

 A Web server can process HTTP requests and respond with HTML pages, provided the requests are handled by server side programs

It uses HTTP protocol to transmit the request/responses. Here Web server handled both request/response and business logic. This is more rigid design.

A web transaction using web server will be like this as below,

Browser (click operation to display some results on a grid> ==> Request goes to web server (Apache HTTP server) ==> Database

Application server

An Application server controls the business logic. Separating business logic from web server and adding to application server will give more reusability for this logic across different applications. This is more flexible design.

A web transaction using app server will be like this as below,

Browser (click operation to display some results on a grid> ==> Request goes to web server (Apache HTTP server) ==> Application server (Tomcat server) ==> Database

Or

Browser (click operation to display some results on a grid> ==> Request goes to web server (Apache HTTP server) ==> Application server (Tomcat server) ==> Web service ==> Third party Database

 

Please click on below linking for getting quick summary 

Web server vs application server vs database server

Load Balancing

Cucumber BDD – scenario table

Jenkins resetting password

 

What is Web server?

What is Web server?

Web server

 A Web server can process HTTP requests and respond with HTML pages, provided the requests are handled by server side programs

It uses HTTP protocol to transmit the request/responses. Here Web server handled both request/response and business logic. This is more rigid design.

A web transaction using web server will be like this as below,

Browser (click operation to display some results on a grid> ==> Request goes to web server (Apache HTTP server) ==> Database

Selenium features – what are the main features of selenium.

Selenium features – what are the main features of selenium.

Selenium supports Cross Browser Testing and parallel testing. The Selenium tests can be run on multiple browsers and multiple machines and multiple Operating systems. Selenium offers open source tools and supports test automation for web applications

Supports several scripting languages like Java, Python, C#, and PHP

Reporting are very easy and extensible.

Selenium uses Browser native commands. It locates and actions applied on UI elements

TestNG quick summary:

 TestNG’s is Selenium + reporting features. It is easy to generate reports using Listeners and Reporters in TestNG

 Features of TestNG includes the following,

1)      Annotations – please refer my annotation blogAnnotation – TestNG’s test case priority

2)      Supports parameterization/ data driven testing

3)      Test cases can be grouped and parallel testing is allowed.

Automaton testing using Cucumber – Behavior driven development (BDD)

Application behavior is the main focus on BDD. The requirements are written in English which gives more readability and understandability of the requirement.

So any roles in the company (Tester, developer, end user, and techno functional person) can read it and understand it. Also this will reduce the complication in terms of missing requirement or misrepresenting or misunderstanding requirements between different roles (Developer /tester / end user)

Gherkin is a business readable language – refer below for an example. Below feature file is integrated with Selenium and are having user stories as below,

Please refer below – “feature, Scenario, Given, When, And, Then “are the Keywords below to understand on how to write a feature file.

What is TestRunner in Cucumber

In order to link Cucumber with Selenium WebDriver, you need to start a Java project in eclipse IDE.

Then, add both Cucumber and Selenium jar files

Write test runner code and execute the same . Please refer BDD testing details on Selenium Cucumber

Performance test analysis.

Performance test analysis can be done real time script execution or post execution

 Real time script execution analysis

1)      Performance Engineer needs a coordination  with other teams like Database team, app server team, etc  to monitor real time performance on Database server, Application server

2)      Database and app server team can let Performance Engineer know the performance results on these servers like resource utilization, fail over server works / load balancing works fine etc.

Post script execution analysis

1)      Verification on Vuser metrics, Vuser errors, can be validated.

2)      Verification Transactions graphs for TPS, response time, hits per second can be reviewed.

For additional details please click on click link load testing vs performance testing vs stress testing

Performance testing best practices and activities.