Summary on Cloud, Machine learning, Artificial intelligence and other emerging technologies

Summary on Cloud, Machine learning, Artificial intelligence and other emerging technologies

Salesforce

Salesforce.com is an American cloud computing company.
Salesforce offers Software as a Service (SaaS) platform which helps in Customer Relationship Management.
It has a multi-tenant architecture and subscriptions.

 The following are the application clouds in Salesforce CRM.

  1. Sales Cloud
    2. Service Cloud
    3. Marketing Cloud
    4. Data cloud
    5. App Cloud
    6. Analytics Cloud
    7. Community Cloud

Salesforce also offers Platform as a Service (PaaS) using Force.com sites.

People involved in Salesforce Implementation
1. End User ( Customer)
2. Administrator
3. Developer
4. Consultant

The following are the list of Salesforce Certifications.

  1. Certified Administrator
    2. Certified Advanced Administrator
    3. Certified Sales Cloud Consultant
    4. Certified Service Cloud Consultant
    5. Certified Force.com Platform App Builder
    6. Certified Force.com Platform Developer I
    7. Certified Force.com Platform Developer II
    8. Certified Technical Architect

 

What is Apex?

  • Apex is a programming language for salesforce (only).
  • Object Oriented Program, in which the data types have to defined.
  • Allows developers for flow execution in force.com platforms.
  • Enables developers to add business logic to most system events including button clicks, related record updates and visualforce pages.

Datatypes in Apex

  • Primitives

Apex primitives include the following datatypes.

  1. Integer
  2. Boolean
  3. Decimal
  4. Double
  5. Date
  6. Date Time
  7. Time
  8. String
  9. Long
  10. ID- Any valid salesforce.com Id.
  • sObjects
  • Any  object that can be stored in force.com platform database.
  • sObject variable unlike primitive variable refers to row of data in salesforce. That is a complete record as a variable.

Hadoop MapReduce

Hadoop MapReduce is the main core components of Hadoop and is a programming model Hadoop MapReduce helps implementation for processing and generating large data sets, it uses parallel and distributed algorithms on a cluster. Hadoop MapReduce can handle large scale data: petabytes, exabytes.
Mapreduce framework converts each record of input into a key/value pair.

What is Blockchain and cryptocurrency

To understand more about Blockchain and crypto currency, lets explain about current Banking system works.

Current Banking systems : when a user does an online or ATM transaction , the centralized banking ledger verifies and confirm the authenticity of accounts. For that work, every bank or third party sites charges to user.

Blockchain is not like banking centralized ledger but this software uses a decentralized ledger across the thousands of computers and every transactions are updated in each and every ledger. That means everyone is aware of the transactions rather than a centralized bank stores all information and charges for that. There are volunteering systems who does this effort of maintaining all ledgers for block chain. 

Block chain uses cryptography mythology to protect the ledger information so that no one can modify or destroy this.

Block chain concept is utilized by Crypto currency , online voting system, signature system, agreement systems etc.

Top 20 cryptocurrency 2017

bitcoin BTC
ethereum ETH
bitcoincash BCH
ethereumclassic ETC
litecoin LTC
einsteinium EMC2
dash DASH
ripple XRP
bitcoingold BTG
zcash ZEC
eos EOS
qtum QTUM
syscoin SYS
neo NEO
monero XMR
vertcoin VTC
iota IOT
powerledger POWR
omisego OMG
santiment SAN

Summary about Jmeter and performance testing

Summary about Jmeter and performance testing

Jmeter recording

How to create Jmeter scripts?

Recording Jmeter scripts using Jmeter’s HTTP(S) Test Script recorder. There are two ways

1)      Manually adding scripts ( Test plan >> Tread Group >> Add>> Sampler >> HTTP Request )

2)      Recording using Jmeter’s HTTP(S) Test Script recorder

How to record Jmeter scripts using HTTP(S) Test Script recorder

Prior doing that we need to configure browser and learn about the Proxy setup

Jmeter to Application server communication need to be routed through a browser Proxy for this recording purpose. For that you may need to select the Browser (here we can use Firefox browser”

1)      Navigate to Firefox >> Tools >> options >> Advanced >> Network >> Settings

2)      Select Manual Proxy configuration >> HTTP Proxy = localhost & Port = 8080

How to run Jmeter in Jenkins

steps:

Jenkins setup and performance plugin setup:
1) copy performance plugin into Jenkin’s home directry before you start the test.
2) to do that – you can download the performance plugin “performance.hpi” from the site https://wiki.jenkins-ci.org/display/JENKINS/Performance+Plugin
3) how to find the home directry of jenkins – to do that you can navigate to jenkins home page (localhost:8080) and then
4) click on “Manage Jenkins” and then click on “Configure system” the you will notice “Home directy” path in there.

Configure Jmeter and create a basic script in Jmeter:
5) download Jmeter Binary zip file from Jmeter site http://jmeter.apache.org/download_jmeter.cgi
6) unzip it and go to the “bin” directory of the Jmeter folder, wherre you will notice “user.properties” file.
7) open the file in notepad or notepad++ or any other text editor
8) add a line “jmeter.save.saveservice.output_format=xml” to that. Save and close the “user.properties” file
9) create a Jmeter script and make sure you can run it in non GUI mode i.e either in DOS mode or using shell scripts in MAC (note down the commands used in respective OS and it could be used in Jenkins job setup)
Note: for windows command line run, you can use the following commands

C:\[JMETER BIN directory]\jmeter.bat -Jjmeter.save.saveservice.output_format=xml -n -t C:\[JMETER script “.jmx” file] -l Jmeter_test_results.jtl

Note 1: For detailed topics on Jmeter scripts creation , please visit Jmeter , Jmeter recording 

setup Jenkin’s job to run Jmeter scripts
9) go to Jenkins home page (localhost:8080) and then click on “New Item” on “Freestyle project”
10) in the “New item” page, give some name in the item name field and go to below to section “Build” and add build step
11) add build step can be either a) “execute windows batch command” for windows or b) “Execute shell” for MAC
12) provide your command in there and save.
13) Click on “Build now” which would call the Jmeter (jmx) file and run the program
14) after the run, you can verify the Jenkins console to review the results.

Summary about Jenkins, Selenium and QTP automation frameworks

Summary about Jenkins, Selenium and QTP automation frameworks

How to run Jenkins locally

1) go to https://jenkins.io and download Jenkins.war file
2) place the war file in a folder (e.g. C:\Jenkins\Jenkins.war )
3) then open command prompt (windows start menu > run > cmd will open command prompt )
4) in command prompt, go to folder C:\Jenkins\ ( command : “CD C:\Jenkins\” )  and then run command ” java -jar Jenkins.war ”
5) this will exract a folder name “.jenkins” into your user folder ( the path is usually “C:\users\”your login”\.jenkins”
6) copy “.jenkins” folder and paste to folder C:\Jenkins\, so that you have “C:\Jenkins\.jenkins” as the folder path.
7) Now you setup a Enviroment variable (to set up that go to Control panel > system > Advanced System settings )
8) then add Enviroment variable as “JENKINS_HOME” and value as “C:\Jenkins\.jenkins”

You all set to run Jenkins on your machine!

Open a browser and type “localhost:8080” to see Jenkins session.

Selenium features

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 blog Annotation – 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

Selenium jenkins integration steps are as below:

Jenkin related steps:
1) start jenkins by running command in DOS prompt (detailed steps in here )
2) then make sure you are able to access url : localhost:8080
3) then you need to configure jenkins to run the selenium scripts – for that click on “Manage Jenkins”
4) then click on Configure systems
5) Find out the jdk files are installed (usually in C:\ program files … folder path) and copy paste the path in JDK section “JDK Installations” in ” Configure systems” which you are already in.
6) Give JDK name “JAVA_HOME” and provide Java path below in the next field.

Selenium related steps:
3) Open eclipse IDE and start new Java project
4) make sure you added selenium jars (Selenium server standalone jar file which you can download add to new project) to support selenium framework for your automation testing.
5) then create a simple selenium script – make sure it is running and completing successfully in Eclipse.
6) Also create a xml file give a name “Xml1.xml”  Make sure Run “Xml1.xml” as “TestNG Suite” is working fine in Eclipse. Also notedown the xml file path in selenium project. create a lib folder in that and add all jar files which are required.

Commmand prompt:
7) navigate to that project folder in command prompt and set all required classpath like bin and lib etc which are already in xml file folder in selenium project which you got from selenium project in eclipse.
8) then type command “Java org.testng.testNG Xml1.xml” which will display results in command prompt/DOS screen
9) now create a batch file “Batch1.bat” which contains the above command and also a command for compiling as e.g “java -cp bin;lib/* org.testng.testNG Xml1.xml”

Jenkins setup to build and run the file:
10) in Jenkins, create a “new item” with selection of “Freestyle project”
11) then select “Advance options” and put the Selenium project home directory path in there.
12) the build trigger section, select Batch file execution option in there, then put the batch file name “Batch1.bat”
13) click and save the new item
14) click on “Build Now” and verify the “Console output”

 

How to configure Hub & Node machines for selenium parallel test execution

Configuring Hub machine

1) Start the command prompt/DOS prompt

2) Navigate to the folder location where the Selenium server jar file is kept.

3) Type java –jar selenium-server-standalone-[VERSION].jar –role hub

Note: [VERSION] is the one your downloaded version of selenium-server-standalone Jar file.

Selenium Hub

4) Now type: http://localhost:4444 in browser

Your will see the below screen

5) Now type: http://localhost:4444/console in browser

Configuring Node machines

Follow the same steps 1 to 2 in node machines

Then type,

Java –jar selenium-server-standalone-[VERSION].jar –role node –hub http://yourHUBmachineIP:4444/grid/register

How to run selenium tests in Jenkins

Jenkins configuration:

To run selenium scripts in Jenkins, Jenkins needs to started.

To make Jenkins server start, please use the following command in the Jenkins folder of your machine when Jenkins.warfile is downloaded from internet…

  1. “java -jar jenkins.war” in DOS / command prompt mode.
  2. Then you need to bring the browser up and type “localhost:8080” to see jenkins web UI ready.
  3. Then navigate to Jenkins >> Manage Jenkins and click on “Configure system”
  4. Then scroll down to see the “JDK installations” section in the pag
  5. There you enter “JAVA_HOME” for “JDK name” field.
  6. Provide the Java-JDK file folder path for “JAVA_HOME” field.

Note:  Java-JDK file folder path is usually “C:\Program files\Java\JDK….”

Note: Disable “Install Automatically” check box else it will update with new Java versions and your selenium program might get conflicts

Selenium script development:

  1. create a package and class in Eclipse
  2. and then create a small test script – like print some message based on UI or Browser title name etc
  3. you could create a TestNG project
  4. Then TestNG.xml file will be created in Eclipse

Note: to get the XML folder path in project home directory, you could go to Eclipse project and right click to see properties.

Note: you also need to put all the jar files required for selenium testing under the lib folder(you may need to create”lib” folder)

Just to test your TestNG scripts are working, you can navigate to Project home directly (XML located) through DOS/Command prompt and then type as below:

Note: before that you need to set class path as bin directory of Project home folder. Command : “set classpath=C:\Selenium\project\bin;” as an example for binary file

Note1: similarly lib files, Command : “set classpath=C:\Selenium\project\lib\*” as an example

or command: set classpath=C:\Selenium\project\bin;C:\Selenium\project\lib\*;

Then execute testng.xml file through command prompt

command : java org.testng.TestNG testng.xml

Batch file creation for Jenkin execution

Create a batch file using notepad – steps

  1. Type the below contents in Notepad without quotes.

‘ java -cp bi;lib/* org.testng.TestNG testng.xml ‘

2) save the notepad as “runSelenium.bat” which will create a bat file. Place it in project home directory.

Jenkins job creation:

  1. Open Jenkins, then click on “New item”
  2. Enter item name as “JenkinSeleniumTest”
  3. Select “Freestyle project” , click Ok
  4. Then click on “Advance” button under the “Advance projects options”
  5. Then select “Use custom workspace”, then give the project home directory path in “Directory” field.
  6. Then “Add build setup” under “Build” and select “Execute Windows batch Command”
  7. Then type “runSelenium.bat” in the command field, click apply and save it.
  8. Then in the “JenkinSeleniumTest”, then click on “Build Now” which will call the batch file and then Selenium script internally.
  9. Verify the “Console output” in “JenkinSeleniumTest” which will show the Selenium execution results.

How to send email at every build with Jenkins

Jenkins default configuration setting allows to send email notification for build failure, someone breaks the build etc.

  1. To send email for every build Install Email-ext plugin.
  2. Once it is installed, click on Configure System
  3. Then in “Jenkins Location” section & “Extended E-mail Notification” – enter your email ids
  4. In “E-mail Notification” section, enter the SMTP server name to “SMTP server”
  5. Click “Advanced”, Click “Use SMTP Authentication” to enter required information
  6. verify “Test configuration by sending test e-mail”
  7. Configure a project to send email at every build
  8. Click “Add post-build action” and then Click “Editable Email Notification”
  9. Go to  “Advanced Settings” to “Add Trigger”
  10. then Click “Always” , Save

Qtp script to close all open browsers ..

Call CloseAllBrowsers_ExcludingALM()

Function CloseAllBrowsers_ExcludingALM()
‘To ceclare Variables
Dim objDes, objList, objIndex

‘To Create Object Description for all opened browsers opened.
Set objDes=Description.Create
objDes.Add “micClass”,”Browser”

‘To get all the opened browsers objects from Desktop
Set ObjList=Desktop.ChildObjects(objDes)

‘Indexing always starts from “0”
For objIndex=0 to objList.count-1
‘To cverify the name of the browser is “HP Application Lifecycle Management”
If lcase(objList(objIndex).GetROproperty(“name”))<>”HP Application Lifecycle Management” then
‘Close the Browser
objList(objIndex).close
Exit For
End If
Next

Jenkins reset user password :

First stop the Jenkins service if you are already running jenkins

Go to the folder where jenkin’s config.xml file is stored (generally C:\jenkins\.jenkins\config.xml)

Open config.xml file using notepad++ or any text editor

Search for <useSecurity>true</useSecurity> and change that to <useSecurity>false</useSecurity>, Save the file.

re-start Jenkins service (using Java -jar jenkins.war in commandline)

You should not be seeing login prompt but directly accessing Jenkins home page when you type localhost:8080 in browser.

QTP integration with Jenkins

Create a “.vbs” file as below and save the file as “AOM.vbs” in C:\QTP\VBS folder.
In Jenkins create Job, Select ‘Execute Windows Batch Command’ in Build Step. Enter below command.
and then use that in Jenkins.
Note: To learn how to create a Jenkins job or how to start Jenkins – please refer create a Jenkins job and Run Jenkins locally in my site.
Below code is the “AOM.vbs” which is called by Jenkins Job.
Call QTP()
Public function QTP()
‘Create Quick test pro(QTP/UFT) object
Set objQTP = CreateObject(“QuickTest.Application”)
objQTP.Launch
objQTP.Visible = True
‘to open QTP Test
objQTP.Open “Test file path “, True
Set objResults= CreateObject(“QuickTest.RunResultsOptions”)
objResults.ResultsLocation = “Result path of qtp”  ‘Set the results location
‘to run qtp script results
objQTP.Test.Run objResults
‘to close QTP
objQTP.Test.Close
objQTP.Quit
End function

Summary on Web testing and mobile apps

Summary on Web testing and mobile apps

 

What is the difference between Web Layer (Presentation Tier) vs Application Layer (Logic Tier) vs Database Layer (Data Tier)

  1. Presentation Layer is the interface to outside world e.g. web site.
  2. Application Layer is a framework to create the interface to the Web site or Presentation Tier
  3. Database Layer is the database and associated logic needed to query details.

Web Layer (Presentation Tier)

Contains Virtual Machines and Physical Machines with OS can be Windows, UNIX or Linux

Contains Apache web Server, Apache tomcat, Sun Java Web Server or MS Internet Information Services (IIS)

Application Layer (Logic Tier)

Contains Virtual Machines and Physical Machines with OS can be Windows, UNIX or Linux

Contains Apache tomcat, Red Hat JBoss, BEA Web Logic or IBM WebSphere app server

Database Layer (Data Tier)

Contains Virtual Machines and Physical Machines with OS can be Windows, UNIX or Linux

Contains SQL or Oracle

 

How to Use WhatsApp in a Web Browser?

1) Go to web.whatsapp.com in a web browser on a computer.
2) Then, on your iOS/Android/Windows mobile phone, open WhatsApp and press the Options on top right corner side
3) then press WhatsApp Web from the options.
4) use iOS/Android/Windows mobile phone to scan the QR code shown on the browser on your computer.

Headless web browsers

headless web browsers or programs are used to stimulate the browsers where there is no GUI is used for browser actions,

If you want to do browser operations or collect data from UI, there programming concepts will be used.

headless web browsers are listed as below,

HtmlUnit – No GUI browser for Java programmers and its pure java implementation, Open source programs. JavaScript support/DOM emulated. mainly used for used for testing purposes or to retrieve information from web sites.

Spynner – Programmatic web browsing module having AJAX support for Python

Ghost – it is a webkit web client written in python. it is WebKit-based. JavaScript supported and Open source.

Watir-webdriver- it an open source Ruby library for automating tests. Complete JAva script Support via Browsers

Twill – Allows users to browse the Web using command-line interface . Supports automated testing on web applications and Open source.

Awesomium –  is Chromium-based. and supports JavaScript and provides HTML-powered interfaces.

ZombieJS – Open source headless testing using Node.js. JavaScript support/emulated DOM.

SimpleBrowser – Open source web browser engine designed for automation tasks. It is built for .Net framework and No JavaScript support.

Successful test automation

Successful test automation approach – simplest way to build cost effective automation frameworks which can give better ROI.

To maximize automation benefits in terms of best output and cost effectiveness is by implementing best matching framework based on your product line.

When an organization plans for cost effective automation frameworks, they can always consider 2 types of frameworks to start having maximized results with less effort and cost. Basically optimizing your efforts and get better ROI relatively in less time. 

  1. User acceptance testing – Find out a Behavioral driven development (BDD) framework – either cucumber selenium or Robot Framework. I will explain about Cucumber Selenium framework in this article and will explain the reason for including one BDD Framework for your automation. With the help of Business team, identify the most critical applications and most critical functionalities. Once you have BDD framework is ready, you can make sure it is running every day and sending our reports using Jenkins integration. Which will make your automation is ready to Join the DevOps culture. As most of the companies like google, amazon etc have already adopted DevOps while ago.
  1. Regression testing – You can follow any regular automation approach and adopting DevOps, continuous testing, monitoring and reporting. You can opt data driven or keyword or hybrid based on your expertise and application type. 

Let me give an example when you consider the type 1 which is BDD for acceptance testing. 

The very reason for BDD is that it can utilize business user’s collaboration in automation. This is the easiest way to get business team’s association on your automation efforts.

In my opinion, when you compare within different BDDs, cucumber has upper edge as opposed to Robot Framework as simplicity in it that will help business user involve easily.

As an e.g. cucumber frameworks need feature file and typical feature file example will have user scenarios as below,

Feature: Login Action

Scenario: User successfully Login to application with valid user id and password

            Given User is on application login prompt page

            When User enters User name and password

            Then Message displayed as Login is successful

Scenario Outline: data parameter test

            When User navigates to application search screen

            Then user input “<InputInfo>” as “InputVal”

Examples:

            | InputInfo |

            | ABC1  |

            | ABC2 |

In the above example you can see that a business user can simply follow the format for above 2 test cases which is written in feature file.

1)    Scenario

2)    Scenario Outline:

Later automation architect or engineer can develop test runner file and convert this as automation test scripts. Please refer link for more details about cucumber framework.

Benefits

  1. User collaboration
  2. Due to user collaboration, we can make sure all the critical application are automated
  3. Due to user collaboration, we can make sure all the critical features in every important applications are automated
  4. Due to Jenkins integration, you can make sure test can be scheduled for every day run, to make application as robust in terms of quality.

What is Block chain and cryptocurrency

What is Blockchain and cryptocurrency

To understand more about Blockchain and cryptocurrency, lets explain about current Banking system works.

Current Banking systems : when a user does an online or ATM transaction , the centralized banking ledger verifies and confirm the authenticity of accounts. For that work, every bank or third party sites charges to user.

Blockchain is not like banking centralized ledger but this software uses a decentralized ledger across the thousands of computers and every transactions are updated in each and every ledger. That means everyone is aware of the transactions rather than a centralized bank stores all information and charges for that. There are volunteering systems who does this effort of maintaining all ledgers for block chain. 

Block chain uses cryptography mythology to protect the ledger information so that no one can modify or destroy this.

Block chain concept is utilized by Cryptocurrency , online voting system, signature system, agreement systems etc.

To know more about top rated cryptocurrency names – please click here

Top 20 cryptocurrency 2017

Top 20 cryptocurrency 2017

bitcoin BTC
ethereum ETH
bitcoincash BCH
ethereumclassic ETC
litecoin LTC
einsteinium EMC2
dash DASH
ripple XRP
bitcoingold BTG
zcash ZEC
eos EOS
qtum QTUM
syscoin SYS
neo NEO
monero XMR
vertcoin VTC
iota IOT
powerledger POWR
omisego OMG
santiment SAN

How to Implement Maven TestNG Selenium Grid project

How to Implement Maven TestNG Selenium Grid project

High level Steps:
note: I will be adding detailed description for each steps below,

1. Install Eclipse Editior
2. In Eclipse, navigate to “Help >> Install New Software” then install Maven plugin.
3. Create a Maven project, which will have a pom.xml having the option to add all dependencies jars.
     like TestNG, XLS API jars, Reporting jars etc.
4. Once that is made, convert the project into TestNG project that process will generate another xml file. (name it as testng.xml)
5. Now in Eclipse project, create a package and class. Write your programs in it.
6. In the testng.xml, mention the class names which will be included while run.
7. Now right click on pom.xml file and run as “Maven test” which will download dependency jars and store to project and then run the program.

How to reverse an array in java

How to reverse an array in java

package arrays;
import java.util.Arrays;
 
public class ArrayReverse 
{  
 
public static void main(String[] args) 
{
 
int abc[] = {2, 3, 4, 5, 6,7, 8, 9, 10};
System.out.println(“Before Reverse, Arrays are like this : “+Arrays.toString(abc));
 
int temp;
int arrayloop = abc.length/2;
 
for (int i = 0; i < arrayloop; i++) 
{
temp = abc[i];
abc[i] = abc[abc.length-1-i];
abc[abc.length-1-i] = temp;
}
System.out.println(“After Reverse, Arrays are like this  : “+Arrays.toString(abc));
 
 
}
}

What is LinkedList and an example in Java?

What is LinkedList and an example in Java?

LinkedList is a linear collections of data elements.

     // Declaring LinkedList

       LinkedList<String> abclinked = new LinkedList<String>();

 

 

       abclinked.add(“a”);

       abclinked.add(“b”);

       abclinked.add(“c”);

   

system.out.println(“the linked list is ” + abclinked )

 

 

Linked Lists are Dynamic size and this feature certainly has an endge over Array. insertion and deletion also possible for Linked Lists which may not be done on Array which is already defined.

 

 

The downside of Linked Lists is that the extra memory space for a pointer is required with each element of the list. Also accessing elements are sequential manner starting from the first node is difficult.

How to reverse an array in java – Please click here