Earn Money in 10 days

Selenium Videos

Protractor In Selenium

Livechat

Monday, 1 June 2015

When to do manual and when to do automation.

I have heard this question from various testers that they always been asking that when to automate application which testcase we need to automate By reading this post you get to know all.


We should do manual testing whenever 


1-New Functionality
If website contains new features,it should be tested manually first.
2-Test your application only one time:
If you have to test your app only one time it doesn't make sense to waste your time to write in scripts.
3-Frequent requirement changes:
If your requirement is changing frequently not to automate those test-cases.


We should do automation whenever 

1-Regression Tests:
Everytime we get a new build then a regression is needed.For Excecuting each and every test is very time consuming.Thats the main reason we have to do automation.In automation we just make scripts and for regression we just run that scripts.No need to waste your enery and time for same repeated cases.These cases should be done by automated tool.We should try to write common functionalities in our scripted so that we can use it later also.
2-Complex test scenarios :
If we have to test with multiple data sets  at that time automation scripts is necessary.
3-Static & Repitative Tests:
For automating testing class that are repetitive and unchanging up to next test cycle
4-Test Cases which are very time consuming.

Wednesday, 20 May 2015

Selenium Syllabus

Class 1
What is Automation Testing?
Why Automation testing is in Demand
Selenium History, Version and Flavors Available in market
Selenium Features, Limitation and Comparison with others tool
Selenium WebDriver Introduction
Java, Eclipse, Selenium Download and Installation


Class 2- (Basic Java)
Java Introduction
Java Architecture
First Program in Java
Data types
Class
Object
Methods
Keywords in Java
Package


Class 3- (Basic Java)
Java Variables
Java Operators
Loops
Decision Statements
Encapsulation
Method Overloading
Exception Handling


Class 4-
Inheritance
Collection API
Constructor
Static and Non Static
Arrays
External file reading (reading excel, notepad)


Class 5-
Selenium Project Creation
Create first Selenium Script
Browser Open and Close commands
Browser Navigation command
Working with Firefox Browser
Working with Chrome Browser
Working with IE Browser


Class 6
Install Firebug, Fire path and other add on for Selenium
Different locator for Selenium
Working with Textbox, password fields.
Working with radio button, checkbox
Handle dropdowns
How to work with file uploader.


Class 7-
Dynamic Xpath in detail
Dynamic CSS in detail
How to access web table in Selenium
Handle Alerts
Handle Multiple Windows
Handle frame and IFrame


Class 8-
Mouse Hover event in Selenium
Right Click  
DoubleClick
Drag and Drop
Capture Screenshots in Selenium


Class 9
Firefox Profile and handling profiles in Selenium WebDriver
Overview of Chrome Option
Handling SSL Certificates in Firefox, Chrome and IE Browser
Desired Capability


Class 10
What is TestNG
Need of TestNG
Report generation by TestNG
Grouping of Test Case
Set priority for Test case
Annotation of TestNG
Dependency in TestNG
Assert in TestNG
Class 11
parameterization and parallel execution of test on various browser
Data Provider in Testng using 2D array
Data provider in TestNG using Excel files
Generate XSLT Report in TestNG using ANT


Advance Selenium WebDriver Topics
Class 12
Framework and its overview
Automation framework architecture
Major automation framework.
Linear and Modular
Data Driven Framework
Keyword Driven Framework
Hybrid Framework
POM Page Object Model
Class 13
Framework(Any one)
Implementation of data driven
implementation of basic Keyword Driven framework and idea about hybrid framework


Class 14
Implementation of Hybrid Framework/Implementation of Keyword Driven/Implementation of Data Driven Framework
Class 15
Implementation of Hybrid Framework/Implementation of Keyword Driven/Implementation of Data Driven Framework


Class 16-
AutoIT Usage
How to upload photo using Autoit
Robot Class implementation..
Maven installation and implementation of maven for Selenium WebDriver
Class 17-
GIT and its basic commands to use it for your selenium project

Class 18
Jenkins Installation
Jenkins Setup
Create build and Execute build for nightly execution
Send Email report based on build Status
Basic Selenium Course
(Class1-Class13)
(Basic+Advance) Selenium
(Class 1 – Class17)

Tuesday, 14 April 2015

Click on a link and switched to different tab/Window.

Switching on tab from a link

When Selenium Webdriver object instantiated then Webdriver assigns an alphanumeric id to each window.This unique alphanumeric id is called window handle.
Each window has a unique ID so that selenium can differentiate when it is switching controls from one window to other.

Set <String> windows =driver.getWindowHandles();
//Set will store the multiple windows

System.out.println(windows.size());
//Print the size of windows

Iterator<String> it = windows.iterator();
//iterate through your windows
while (it.hasNext()){
String parentwindow = it.next();
System.out.println("This is first window id  "+parentwindow);
//This will print the id of first window.
String childwindow = it.next();
System.out.println("this is second window id  "+childwindow);
//This will print the id of second window or Tab

When we are working with selenium sometime we get a challenge like if we click on a link then we switch to a different window or pop up and if we have to enter in the pop up and enter in that page then we need to switch on that pop up.

Here I have given an example of in which we are clicking on a link and switched on different tab and enter in that page.

import java.util.Iterator;
import java.util.Set;
import java.util.concurrent.TimeUnit;
import org.openqa.selenium.By;
import org.openqa.selenium.WebDriver;
import org.openqa.selenium.firefox.FirefoxDriver;
public class MultipleWindows {
public static void main(String str[]) throws InterruptedException{
WebDriver driver = new FirefoxDriver();
driver.manage().timeouts().implicitlyWait(15, TimeUnit.SECONDS);
driver.get("http://hdfc.com/customer-login");
//go to this hdfc url
driver.findElement(By.xpath("//a[contains(text(), 'CUSTOMER LOGIN')]")).click();
//Perform the click operation that opens new window
Thread.sleep(5000);
//Wait for 5 sec
Set <String> windows =driver.getWindowHandles();
System.out.println(windows.size());
//Print the size of windows
Iterator<String> it = windows.iterator();
//iterate through your windows
while (it.hasNext()){
String parentwindow = it.next();
System.out.println("This is first window id  "+parentwindow);
String childwindow = it.next();
System.out.println("this is second window id  "+childwindow);
driver.switchTo().window(childwindow);
//Switch to child window
        driver.findElement(By.xpath("//*[@id='tb_usr']")).sendKeys("Seleniumgyan123");
        Thread.sleep(5000);
        driver.close();
//close the child window
Thread.sleep(5000);
driver.switchTo().window(parentwindow);
//switch to parent window
String parenttitle = driver.findElement(By.xpath("//h2[contains(text(), 'ONLINE ACCESS FOR EXISTING CUSTOMERS')]")).getText();
System.out.println(parenttitle);
//print the title of parent window
}
}}

Saturday, 7 March 2015

Scrolling using Selenium WebDriver


Selenium Webdriver doesn't provide an inbuilt method for page scrolling
By using JavaScript interface we can scroll in Page(Horizontal,Vertical).
We need to import this packege import org.openqa.selenium.JavascriptExecutor;

import org.openqa.selenium.JavascriptExecutor;
import org.openqa.selenium.WebDriver;
import org.openqa.selenium.firefox.FirefoxDriver;

public class ScrollDemo {
 public static void main(String[] args) throws Exception {
   WebDriver driver=new FirefoxDriver();
   driver.manage().window().maximize();
    driver.get("http://facebook.com");
   Thread.sleep(5000);
 JavascriptExecutor jse = (JavascriptExecutor)driver;
  jse.executeScript("scroll(0, 1500)"); //y value  can be altered
  Thread.sleep(5000);
   JavascriptExecutor jse1 = (JavascriptExecutor)driver;
  jse1.executeScript("scroll(250, 0)"); //x value can be altered
 }}


Output:First it will scroll down(Y axis) and after 5 seconds it will scroll up(X axis).

Friday, 6 March 2015

Agile Methodology

Why choose Agile Scrum Methodology?

Due to frequent change in requirement we work on Agile Scrum Methodology.

Its like an incremental model .In agile whole requirement of a software product divides according to priorities.These priorities are saved in a list which is called product backlog.



Product owner
In Agile process product owner will decide all the requirements for a software.
Product owner is a scrum development role for a person who represents the business or user community and is responsible for working with the user group to determine what features will be in the product release.
Product Backlog:
All the user requirements are saved in product backlog.Product owner will decide which user story's he/she wants to complete first.Then according to that their will be a sprint meeting.
What is Sprint Meeting:
In sprint meeting all the team member(developers,testers) will participate for each release of a product that is called sprint.
In sprint meeting all the team members understand the modules and requirements and give their estimate for each task.
Sprint:
Sprint is of 1-2weeks in which we complete 4-5 user stories according to software priorities.
Scrum:
Scrum is of multiple sprints in which we complete multiple user stories 
Scrum Master:
Scrum Master keeps the track of the Software Product.
Scrum Master conduct a daily stand up meetings with all the team members everyday for 20-30 mins.
The scrum master asks the team members these three questions: 
1. What did you do yesterday?
2. What will you do today?
3. Are there any impediments in your way?
Sprint BackLogs:
The sprint backlog is a list of tasks identified by the Scrum team to be completed during the Scrum sprint. During the sprint planning meeting, the team selects some number of product backlog items usually in the form of user stories, and identifies the tasks necessary to complete each user story. All the team members give their  estimates how many hours will take to complete their tasks.
Sprint BurnDownChart:
The sprint burndown chart is a public displayed chart showing remaining work in the sprint backlog. Updated every day, it gives a simple view of the sprint progress. 
Retrospective meeting:
After the release of each sprint all the team members discuss how the sprint was.How can we improve our product qualtity.

Sunday, 1 March 2015

Test Plan Template

What is Test Plan

It is our official document which will decide  what we are going to test, when we will test and how we are going to test the in-scope requirements.
BY ISTQB Defination 
Test plan: A document describing the scope, approach, resources and schedule of intended test activities. It identifies amongst others test items, the features to be tested, the testing tasks, who will do each task, degree of tester independence, the test environment, the test design techniques and entry and exit criteria to be used, and the rationale for their choice,and any risks requiring contingency planning.






    Basically Test plan will be prepare by Testing Lead. Tester 
   will just gothrough the document and write the testcases and 
 executes.

1.Objectives and Scope:

This document provides a high level view of the type of test that is scheduled to be carried out and the features that will and will not be tested.

The objective of this document is to test the functionality of the Facebook Application.(Write your Application Name)

2       Features to be tested
FaceBook - Release 1:
The features which are to be tested, are:
1.    LoginPage
2.    Home Page
(Write Modules According to Your Application)
2.1      Features not to be Tested
3       Approach

In Approch You can write which model You are Going to follow.

Agile Methodology with scrum.

WaterFall 

3.1 Types of Testing

This document provides different types of testing for Facebook Application.

1.    Static Testing

This testing does not need computer as the testing of program is done without executing the program. For example:  reviewing, walk through, inspection of the documents

2.  Dynamic Testing

a)Smoke Testing
b)Functional Testing
c)Retesting and Regression Testing
d)E2E Testing
e)Integration Testing
f)UAT


The testing will initiate with the review of the user requirement documents.

The first type of tests to be carried out will be Smoke and functional testing to determine that each of the individual features perform the functions for which they have been specified. After this a full set of end-to-end test scenarios will be identified once all the features have been delivered and tested, for this a set of e2e scripts would be produced which will seek to exercise the various workflow scenarios specified. This will be followed by system integration testing and UAT/CAT

                                      
Smoke Testing:

Smoke testing covers most of the major functions of the software. The result of this test is used to decide whether to proceed with further testing. If the smoke test passes, go ahead with further testing.

Functional Testing:

Functionality testing will be performed for all the functionalities of the application which will covers all the screens including inputs and outputs fields, buttons graphics and all the navigational flow between the screens.
 Regression Testing

Regression testing will be performed once a defect has been fixed and also if there any enhancements. The scope of this testing will depend on the nature of the defect fixed, but will include at least a re-run of the test where the defect was first identified and, any tests required to get the system into the state at which the problem was identified.

End-2-End Testing

A full end-2-end test will be carried to verify the flow of the process and to exercise all specified work flow route.

UAT/CAT Testing

User Acceptance/Customer Acceptance Testing phase will be performed to ensure that all the functionality scheduled for  delivery meets the business requirements.

Test Case Preparation

The test cases will be generated using JIRA,TFS,QC(Test Management Tool) and also in the excel sheet by the QA team lead. Requirement Traceability Matrix(RTM) will also be generated to make sure that all the requirements are covered 100%

Test Execution

The tester will carry out the execution based on the availability of the functionality and adequate release notes from the development team. Entry criteria for the system test stage are described below.

The Test Results will be updated as Passed, Failed, or Not Completed and a test completion test summary report will be produced at the end by the QA team lead.


All bugs found during the testing phase will be reported using the defect tracking tool JIRA,TFS,QC(Test Managemet Tool) The tester will assign the defect to the development team. Once the developer fixes the defect, the status of the defect is changed to Awaiting QA. The tester will then retest the defect in the latest build available and change the status of the defect to Done/Failed QA accordingly.

3.2 Entry Criteria
Entry criterion is used to determine when a given test activity should start. It also includes the beginning of a level of testing, when test design or when test execution is ready to start.
  • Test enviornment are ready to use like  browser (if web application), Tablets or Devicesif(Mobile Application)
  • Test tools installed are ready to use
  • Test data is available 
3.3      Exit criteria
    All entry criteria met.
    Test Summary Report has been produced, reviewed and approved by the Delivery Manager.

     All Critical, High and Medium priority defects have been retested and closed.

 3.4 Item Pass/Fail Criteria
  Specify the criteria that will be used to determine whether each test item (software/product) has passed or failed testing.
A test will be considered passed if the actions described in the test meet the ‘expected output’ for all steps described in the test case.
 If the output is not as expected, it will be reported and investigated to determine where the problem lies. 
3.5 Suspension Criteria and Resumption Requirements
Testing may be suspended under the following circumstances: -
A discrepancy between the information contained in the Requirements, the Work Flow diagrams and the software delivered.
The delivered functionality is not functioning well enough for the tests to be meaningful
A defect is found in the software, which means that further testing is impossible
A defect is found in the software which affects further test cases, or renders them inoperable
The following activities must be carried out on resumption of testing: -
Checks must be carried out on any corrections which have been made, to ensure that the corrective action does not affect the rest of the system (Regression)
Unless the tester is absolutely certain about the impact of a change, then the entire Test will be re-run 
New test cases may have to be written to test the changes
The system must be restored to a known stable state before testing commences
3.6 Test Deliverables:
List test deliverables, and links to them if available, including the following:
Test Plan (this document itself)
Test Cases
Test Scripts
Defect/Enhancement Logs
Test Reports
4.Test Enviornment 
Specify the properties of test environment: hardware, software, network etc.
List any testing or related tools like Selenium, qtp,Sahi

5       Test Data

All test data identified will be specified in a separate document, i.e.Test Data Specification document.

6      Test tools

Test management tool JIRA,TFS,QC will be used during this project  for all Test Cases.
JIRA will be used for defect reporting and management.
Selenium  and Qtp is also introduced for Automation testing which will be used if the time permits.    

7       Responsibilities



  1.      The preparation and execution of the testing will be carried out by the Quality Analyst Test Team
  2.       The development team will provide the environment specification
  3.  The Business Analyst team will provide with all the user stories and use cases.
  4.  Quality Analyst will review all test products (specifications, reports, etc.).
8    Resource
QA test analysts will carry out the test preparation phase.
QA Team Lead – DDM,
QA Test Analyst – Ritika

 9.     Schedule

The test cases to be executed would have been identified from the relevant use case specification in this project it is from the user stories created in JIRA,

Test Estimation is like How many user stories we have.Based on user stories how many test cases we can write.How many total test script we can write.Its like an estimation of whole project.
11.Risk  and Contignious


12   Defect Management/ Problem Severity 

All problems found during the testing phases will be logged uing JIRA,  each problem will be assigned a severity by the QA team; the classification of defect reporting is given in the table below.  The delivery manager will make the final decision on severity classifications in the event that there are any disagreements.  The developers shall also use these severity definitions for problems that they identify during their Unit testing.

Severity 


1 Critical – the system is broken and cannot be used, major functionality is impaired, or there is data loss. There are no workarounds. Problems are so severe that the timescales cannot be met. Testing may need to be suspended and the problem resolved.

2 Major - the fault renders several system elements unusable, or affects one or more system elements. Workarounds exist which may be unacceptable to the customer. Problems that will jeopardise the launch unless corrected.

3 Medium - the fault affects system elements that are not key to the overall functionality of the system.   The system continues to produce correct results and data is not affected. Acceptable workaround may exist.

4 Low/Trivial – this fault barely affects the quality of a system and will only be fixed if time permits.

Popular Posts

 
subscribe
Subscribe Us
emailSubscribe to our mailing list to get the updates to your email inbox... We can't wait more to have your email in our subscribers email list. Just put your nice email in below box: