Automation Using Selenium Webdriver

Wednesday, 31 May 2017

Agile Testing Interview Questions 1 – 10

Agile Testing Interview Questions:

Agile Testing Interview Questions will help you to prepare for Agile Testing interviews.
Here is the list of 20 Agile Testing interview questions.
Agile Testing Interview Questions 1 – 10:
1. What is Agile Testing?
Agile testing is a software testing practice that follows the principles of an agile software development. It is an iterative software development methodology where requirements keep changing as per the customer needs.  Testing is done in parallel to the development of an iterative model. Test team receives frequent code changes from the development team for testing an application.
2. What is Agile Manifesto?
Agile manifesto defines 4 key points:
i. Individuals and interactions over process and tools
ii. Working software over comprehensive documentation
iii. Customer collaboration over contract negotiation
iv. Responding to change over following a plan
3. What are the principles of Agile Software Development?
1. Highest priority is to satisfy the customer through early and continuous delivery of business valuable software
2. Welcome changing requirements, even late in development
3. Deliver working software frequently
4. Business people and developers must work together daily without transparency throughout the project
5. Build projects around motivated individuals
6. The best form of communication is to do face-to-face conversation
7. Working software is the primary measure of progress
8. Able to maintain a constant pace
9. Continuous attention to technical excellence
10. Simplicity – the art of maximizing the amount of work not done – is essential
11. Self-organizing teams
12. At regular intervals, the team reflects on how to become more effective, then tunes and adjusts its behavior accordingly
4. What are the main roles in Scrum?
Scrum consists of three main roles:
Product Owner: Product Owner usually represents the Client and acts as a point of contact from Client side. The one who prioritizes the list of Product Backlogs which Scrum Team should finish and release.
Scrum Master: Scrum Master acts as a facilitator to the Scrum Development Team. Clarifies the queries and organizes the team from distractions and teach the team how to use scrum and also concentrates on Return on Investment (ROI). Responsible for managing the sprint.
Scrum Development Team: Developer’s, QA’s. Who develops the product. Scrum development team decides the effort estimation to complete a Product Backlog Item.
Scrum Team: A cross-functional, self-organizing group of dedicated people (Group of Product Owner, Business Analyst, Developer’s and QA’s). Recommended size of a scrum team is 7 plus or minus 2 (i.e, between 5 to 9 members in a team).
5. What approach do you follow when requirements change continuously?
In Agile methodology, change in requirement is possible. It’s not like other traditional methodologies where the requirements are locked down at the requirement phase. Every team member should be ready to handle the changes in the project.
The team should work closely with the Product Owner to understand the scope of requirement change and to negotiate to keep the requirement changes to a minimum or to adopt those changes in next sprint. Based on the requirement changes Test Team could update the Test Plan and Test Cases to achieve the deadlines. The team should understand the risk in requirement change and prepare a contingency plan. It is a best practice not to go for the automation process until requirements are finalized.
6. How is Agile Testing different to other traditional Software Development Models?
It is one of the common Agile Testing Interview Questions.
In Agile Methodology, testing is not a phase like other traditional models. It is an activity parallel to development in the Agile. The time slot for the testing is less in the Agile compared to the traditional models. The testing team works on small features in Agile whereas the test team works on a complete application after development in the traditional models.
7. When do we use Agile Scrum Methodology?
i. When the client is not so clear on requirements
ii. When the client expects quick releases
iii. When the client doesn’t give all the requirements at a time
8. What is a Sprint?
In Scrum, the project is divided into Sprints. Each Sprint has a specified time line (2 weeks to 1 month). This timeline will be agreed by a Scrum Team during the Sprint Planning Meeting. Here, User Stories are split into different modules. The end result of every Sprint should be a potentially shippable product.
9. What are Product Backlog and Sprint Backlog?
Product Backlog: Product Backlog is a repository where the list of Product Backlog Items stored and maintained by the Product Owner. The list of Product Backlog Items are prioritized by the Product Owner as high and low and also could re-prioritize the product backlog constantly.
Sprint Backlog: Group of user stories which scrum development team agreed to do during the current sprint (Committed Product Backlog items). It is a subset of the product backlog.
10. What is the difference between Burn-up and Burn-down chart?
Burn Down Charts provide proof that the project is on track or not. Both burn-up and burn-down charts are graphs used to track the progress of a project.
Burn-up charts represent how much work has been completed in a project whereas Burn-down chart represents the remaining work left in a project.
Agile Testing Interview Questions 11 – 20:
11. What are the types of burn-down charts?
There are four popularly used burn down charts in Agile.
i. Product burn down chart
ii. Sprint burn down chart
iii. Release burn down chart
iv. Defect burn down chart
12. What is Product Burn down Chart?
A graph which shows how many Product Backlog Items (User Stories) implemented/not implemented.
13. What is Sprint Burn down Chart?
A graph which shows how many Sprints implemented/not implemented by Scrum Team.
14. What is Release Burn down Chart?
A graph which shows List of releases still pending, which Scrum Team have planned.
15. What is Defect Burn down Chart?
A graph which shows how many defects identified and fixed.
16. What is a Daily Stand-up Meeting?
Daily Stand-up Meeting is a daily routine meeting. It brings everyone up to date on the information and helps the team to stay organized.
Each team member reports to the peers the following:
1. What did he/she do yesterday
2. What are the impediments faced
3. What he/she will do today
In general, it’s not a recorded meeting. Reporting will be between peers not to Scrum Master or Product Owner. It is normally timeboxed to a maximum of 15 minutes. It is aka 15 Minute Stand-up Meeting
17. What is a Sprint Planning Meeting?
The first step of Scrum is Sprint Planning Meeting where the entire Scrum Team attends. Here the Product Owner selects the Product Backlog Items (User Stories) from the Product Backlog.
Most important User Stories at the top of the list and least important User Stories at the bottom. Scrum Development Team decides and provides the effort estimation.
18. What is a Sprint Review Meeting?
In the Sprint Review Meeting, Scrum Development Team presents a demonstration of a potentially shippable product. Product Owner declares which items are completed and not completed. Product Owner adds the additional items to the product backlog based on the stakeholder’s feedback.
19. What is a Sprint Retrospective Meeting?
Scrum Team meets again after the Sprint Review Meeting and documents the lessons learned in the earlier sprint such as “What went well”, “What could be improved”. It helps the Scrum Team to avoid the mistakes in the next Sprints.
20. What is a Task Board?
A task board is a dashboard which illustrates the progress that an agile team is making in achieving their sprint goals.
In general, the columns used in a task board are as follows
i. User Story: Actual Business Requirement (Description)
ii. To Do: All the tasks of current sprint
iii. In Progress: Any task being worked on
iv. To Verify: Tasks pending for verification
v. Done: Tasks which are completed

Wednesday, 17 May 2017

Roles and Responsibilities

Roles and Responsibilities

Roles and Responsibilities: (Selenium)
  • Identify Test cases for Automation.
  • Developing methods for repeating steps.
  • Writing scripts, executing test cases and debugging.
  • Prepare automation scripts in Selenium WebDriver.
  • Designing Automation Framework and Implementing Automation Framework.
  • Regression Testing, support and reviewing Test scripts.
  • Data driving Test script.
  • Defect reporting, Executing Framework and Analyzing Result.
  • Preparing script execution report.
  • Responsible for guiding juniors.

Thursday, 6 April 2017

how-to-find-duplicate-words-in-string


======How To Find Duplicate Words In String==========


public class DuplicateWordsInString
{
public static void main(String[] args)
{
String test = "This sentence contains two words, one and two";
Set<String> duplicates = duplicateWords(test);
System.out.println("input : " + test);
System.out.println("output : " + duplicates);
 }
/** * Method to find duplicate words in a Sentence or String * @param input String * @return set of duplicate words */
 public static Set<String> duplicateWords(String input)
{
 if(input == null || input.isEmpty()){
return Collections.emptySet();
 }
 Set<String> duplicates = new HashSet<>();
 String[] words = input.split("\\s+");
 Set<String> set = new HashSet<>();
 for(String word : words){ if(!set.add(word))
{
duplicates.add(word);

}
 }
 return duplicates;
}
 }
Output : input : This sentence contains two words, one and two
output : [two]

how-to-find-duplicate-words-in-string

Sunday, 19 March 2017

Top 16 Java Inheritance Interview questions for freshers and experienced

1.what is inheritance?
  • inheritance is one of the oops concepts in java.inheritance is concept of  getting properties of one class object to another class object.
  • Inheritance represents the IS-A relationship,also known as parent-child relationship.
2.what are the types of inheritance?

1.Multiple inheritance( java doesn't support multiple inheritance).
2.Multilevel inheritance.

3.How Inheritance can be implemented in java?
  • Inheritance can be implemented in JAVA using below two keywords:
1.extends
2.implements
  • extends is used for developing inheritance between two classes and two interfaces.
  • implements keyword is used to developed inheritance between interface and class.
4.Why we need to use Inheritance?

1.For Code Re usability.
2.For Method Overriding.

5.what is syntax of inheritance?

public class subclass extends superclass{

//all methods and variables declare here
}

6.what is multilevel inheritance?
  • Getting the properties from one class object to another class object level wise with different priorities.

6.what is Multiple inheritance?why Java Doesn't Support multiple Inheritance.
  • The concept of Getting the properties from multiple class objects to sub class object with same priorities is known as multiple inheritance.
  • In multiple inheritance there is every chance of multiple properties of multiple objects with  the same name available to the sub class object with same priorities leads for the ambiguity. also known as diamond problem. one class extending two super classes.
  • Because of multiple inheritance there is chance of the root object getting created more than once.
  • Always the root object i.e object of object class hast to be created only once.
  1. Because of above mentioned reasons multiple inheritance would not be supported by java.
  2. Thus in java a class can not extend more than one class simultaneously. At most a class can extend only one class.
8.How do you implement multiple inheritance in java?
  • Using interfaces java can support multiple inheritance concept in java. in java can not extend more than one classes, but a class can implement more than one interfaces.
Program:

interface A{

}
interface B{
}
class C implements A,B{
}

9.Can a class extend itself?

  • No,A class can't extend itself.

10.What happens if super class and sub class having same field name?


  • Super class field will be hidden in the sub class. You can access hidden super class field in sub class using super keyword.

Wednesday, 1 March 2017

Finding Largest String in ArrayList

Finding Largest String in ArrayList

package com.java.exp;

import java.util.ArrayList;

public class HighestCharinString {

public static void main(String[] args) {

ArrayList<String> al=new ArrayList<>();
al.add("Bangalore");
al.add("hyd");
al.add("jagan");
al.add("upenderathota");
//I would set your largestString variable to your first String that you add:
int largeststring=al.get(0).length();
int index=0;
for(int i=0;i<al.size();i++)
{
//Then you should use the following to check for the largest String:
if(al.get(i).length()>largeststring)
{
largeststring=al.size();
index=i;
}
}
System.out.println("Index " + index + " "+ al.get(index) + " " + "is the largest and is size " + largeststring);


}

}
//OUTPUT:Index 3 upenderathota is the largest

Tuesday, 28 February 2017

PrintDaimond program in java

package com.java.exp;

public class Diamond {
public static void main(String[] args)
{
int i, j, k;
for(i=1;i<=5;i++)
{
for(j=i;j<5;j++)
{
System.out.print(" ");
}
for(k=1;k<(i*2);k++)
{
System.out.print("*");
}
System.out.println();
}
for(i=4;i>=1;i--)
{
for(j=5;j>i;j--)
{
System.out.print(" ");
}
for(k=1;k<(i*2);k++)
{
System.out.print("*");
}
System.out.println();
}
}


}

OUTPUT::


        *
      * * * 
    * * * * *
  * * * * * * *
* * * * * * * * *
  * * * * * * *
    * * * * *
      * * *
        *

Tuesday, 7 February 2017

Difference between throw and throws in java


throw keyword:
  • throw keyword used to throw user defined exceptions.(we can throw predefined exception too)
  • If we are having our own validations in our code we can use this throw keyword.
  • For Ex: BookNotFoundException, InvalidAgeException (user defined).

Program:
  1. package com.instanceofjava;
  2. public class MyExceptionThrow {
  3.  
  4.  public static void main(String a[]){
  5.  
  6.  try{
  7.  
  8. MyExceptionThrow thr = new MyExceptionThrow();
  9. System.out.println("length of INDU is "+thr.getStringSize("INDU"));
  10. System.out.println("length of SAIDESH is "+thr.getStringSize("SAIDSH"));
  11. System.out.println("length of null string is "+thr.getStringSize(null)); 
  12.  
  13.  }
  14. catch (Exception ex){
  15.   System.out.println("Exception message: "+ex.getMessage());  
  16.  }
  17.  }
  18.  
  19.  public int getStringSize(String str) throws Exception{
  20.  
  21.  if(str == null){
  22.    throw new Exception("String input is null");  
  23.  }
  24.  return str.length();
  25. }
  26.  
  27. }


Output
length of INDU is 4
length of SAIDESH is 5
Exception message: String input is null

throws keyword:

  •  The functionality of throws keyword is only to explicitly to mention that the method is proven transfer un handled exceptions to the calling place.

Program:
  1. package com.instanceofjava;
  2. public class ExcpetionDemo {
  3.  
  4. public static void main(String agrs[]){
  5.  
  6. try
  7. {
  8. //statements
  9. }
  10. catch(Exception e)
  11. {
  12. System.out.println(e);
  13. }
  14. finally(){compulsorily executable statements
  15. }
  16. }
  17.  
  18. }