Learn Selenium and Java for Selenium

Tuesday, 19 June 2018

What is Scrum meeting ? What happens in this meeting? Who participates in the meeting?


Have you been thinking about the above questions but not getting the relevant answer? Please keep reading.

Scrum meeting is a part of Agile testing environment. When you are working in an Agile based environment, you will encounter scrum meeting on daily basis.

Basically, Scrum meeting happens as first thing in the morning as your office day starts. Usually, it goes for 15-20 minutes. It is called as stand up meeting as people will be standing majorly and discussing about the work.

Participants in scrum meeting are QA's, Developers including developer lead, B.A( Business Analyst) and Scrum Master. There will be 6-8 or 8-10 people in the meeting. ( depending upon how many QA's or Dev's are there in your organisation).

Everybody joins the meeting and discuss and contribute on the below pointers:

The Agenda or the key pointers of the meeting is:

i) To speak on what you did yesterday
ii.) Are there any hurdles or blockers which are stopping you to do your work ?
iii.) What is your work plan for tomorrow?


Everyday, each of the person has to give their inputs and discuss the problems if they have and come up with solutions.

This is what we call as Scrum Meeting.

Please feel free to give your inputs! I hope you like what you read. Happy Reading and please come back to learn some more interesting concepts like this.

Thank you for reading!




What is Gradle?


Have you been hearing the term “Gradle” but not sure what it is? Let me give you a short and crisp overview. 


  •      Gradle is a build management tool for the JVM.

  •      Gradle is based upon groovy scripting. But, you do not need to learn Groovy to understand it.
  •      When you create a gradle project, you get build.gradle file and settings.gradle file whereas In Maven, you get POM.XML file.
  •           In Build.gradle, you do not have to write dependencies using </ tag and /> tag.In Gradle, you can write your own tasks.No tags are used unlike Maven.
  •       In Build.gradle, you do not have to write dependencies using </ tag and /> tag.In Gradle, you can write your own tasks.No tags are used unlike Maven
  •        Gradle has good supoorts of IntelliJ which is IDE similar to NetBeans or Eclipse. You can create a gradle project  in IntelliJsuccessfully. Also, you can import an already existing gradle project in IntelliJ as well. 
  •       Build.gradle has simple notation. You can easily understand what is written in gradle file.
  •       Gradle uses dsl-domain specific language so its quite easy to maintain and work with it.


Thank you for reading!

Please keep coming back to read more such good notes and feel free to give your inputs.


What is Maven?

Maven is a build automation tool. With Maven we can import all libraries and can also create project structures. 

A Maven is basically a tool used to compile our applications. It helps to develop and managing project structure or applications like deployment, clean, packaging, jar and many more features for the Java-based project. When you create a Maven project,you get two folders: src/tests and src/main src/tests where you write all your tests and src/main where you write all your page classes.  Also,when you create a Maven project,POM.xml file is created in your folder structure,you can add all the required dependencies to it like selenium,Apache POI,JUnit,extent report( whichever you need for your project). It is one of the very effective tool for build management. You need to download some 8-10 dependencies in POM.XML file to work on your Java based project.

Please feel free to provide your inputs. Keep reading and please come back to this page for more short and crisp notes.

Thank you for reading!

Sunday, 10 June 2018

GIT in Practical World


GIT in Practical World

We have discussed about meaning of different GIT commands. Now biggest challenge is how exactly GIT is being used in our projects. What kind of GIT approaches are getting followed in organization?


Git approach 1-Using Fork
Let’s take scenario, there are three members in a team as A, B, C. Their project (Demo_GIT) is in central main repository. All three are working on same file ex. XYZ.java

Each team member will create fork of the central main repository. Forking is nothing but taking copy of the repository.

For example, ‘A’ will create fork as Demo_GIT_A.
Then they can take clone of fork into their local and they can start working on their assigned task.
After they done with their work.  They will commit it and take pull from Demo_GIT(main repository).

After resolving conflict, they will push their code to respective Fork.

Now they will raise Pull Request from fork Demo_GIT_A ->Demo_GIT. Here reviewer can review the changes. If everything is fine. Reviewer will merge the code.



Git approach 1-Using Branches

Let’s take same scenario as above, Demo_GIT project is on master branch, all team members will create individual branches.

For example, ‘A’ will create branch as Demo_GIT_A in the same repository.
Then they can take clone of branch into their local and they can start working on their assigned task.

After they done with their work. Its team member’s responsibility to keep their branch updated. So, they will commit it and will take updates from master branch to their individual branch(Demo_GIT->Demo_GIT_A). Now they will take Pull from Demo_GIT_A.
 After resolving conflict, they will push their code to respective Fork.

Now they will raise Pull Request from branch Demo_GIT_A ->Demo_GIT. Here reviewer can review the changes. If everything is fine. Reviewer will merge the code.








GIT Introduction


GIT Introduction

Any automation testing project, we need to develop around 100 + testcases in the limited span of time. It is impossible if you work alone. So here we need to work in team while developing scripts.
GIT makes our life easy while working in team. How?





Using GIT, we can one maintain one central repository where we will have all the test scripts. Suppose three people working on those test scripts. They will also have their own copy of central repository. So, we can say GIT is safer than SVN because we will be having multiple backup copies of project.
Now there are different way to implement the GIT.Ex:
TortoiseGIT, Sourcetree, GIT bash.
Please refer below diagram understand git commands(only).





Note: In diagram commands are not with complete syntax.
Understanding git commands, it’s not enough. While working in a team we need to follow different approaches to use this command. Next blog we will be discussing the git approaches for implementation in our project.





Strings in Java : Part 5

String Methods

Continuing with commonly used method in the stings we are covering here charAt()  method is more detailed manner.


  • String charAt()
    • The charAt() method returns the character at the specified index number. The default index in which a string start is zero.

public class Main{  
public static void main(String args[]){  

String s="Learn Selenium";  

   char character=s.charAt(4);// Returns the char value at the 4th index  

      System.out.println(character);  
 }
}  

The output of the above program is n

Now what if you try to put the index value which is out of range and does not return any string value


public class Main{  
public static void main(String args[]){  

String s="Learn Selenium";  

   char character=s.charAt(15);// Returns Exception

      System.out.println(character);  
 }
}  

The output of the above program is below exception [PS: you have to be very careful while supplying the index no ]

Exception in thread "main" java.lang.StringIndexOutOfBoundsException: String index out of range: 15
at java.lang.String.charAt(String.java:658)
at Main.main(Main.java:4)








Strings in Java : Part 4

String Methods

As we know that string class has variety of methods for String manipulation. We would be explaining the mostly used methods available in string class in detailed manner.

  • String length()
    • The length()  method returns the number of characters available in the string.
 Considering the following program

public class Main {
  public static void main(String[] args) {
    
    String str = "Hello World";
    
    int len = str.length();
System.out.println("The string length of '"+str+"' is: "+len);
    
 }
}

The output of the program would be 11 .


Have you noted the above length() function did calculated the white space as well now you may have a requirement where you do want the white spaces in your program . How to handle this?

public class Main {
  public static void main(String[] args) {
    
    String str = "Hello World";
    
    int len = str.replace(" ", "").length();  [Here worried about what does replace method do ? Do not be we have explained it below :D]

System.out.println("The string length of  is: "+len);
    
 }
}

The output of the program would be 10

  • String Replace()
    • The replace method replaces the old character/string with the new set of character or string. The function accepts 2 arguments
      • Replace(old char, new char)
public class Main{  
public static void main(String args[]){  

       String s1="Hello World";  

       String replaceString=s1.replace("Hello ","Happy");//replaces all occurrences of "Hello" to "Happy"  

       System.out.println(replaceString);  
 }
}  

The output of the program would be HappyWorld



Wednesday, 6 June 2018

What is JIRA?




We have been hearing about JIRA a lot these day. Aren’t we? So, let us discuss some key pointers on JIRA today.

JIRA is a project management tool used for issue tracking, bug tracking and project management purposes.

There are projects in JIRA. A project is simply a collection of issues. An issue represents something that needs to be worked on.
Example:

ABC_FirstProjectName/MNL-101 ---à The key uniquely identifies the issue.
An example issue in so and so part of the app --à The summary tells you what the issue is about.

Assignee: Mukta Sharma
The assignee is the person currently working on the issue.

Status: In Progress
The status indicates where the issue currently is in its workflow.

When we hear about Issues, it is not only limited to bugs. It could be anything. It could be any of the following:
Sub-task
Technical Task
Bug
Epic
Improvement
New Feature
Story
Task

You can create a standard project in JIRA and an Agile_Scrum based project as well.  Standard project in JIRA can have all the above listed issues where Agile_Scrum based project can have the following:
Epic
Story
Technical Task
Bug
Improvement

You can customize the issues as per the project requirement. JIRA gives you flexibility to do that.

Please feel free to give your inputs. Thank you for reading!


Tuesday, 5 June 2018

What is Apache POI in Selenium testing?




In an interview, many times, it has been seen that interviewer asks do you know what is Apache POI?

You can explain Apache POI in simple language as below and you are good to go.

In simple words, I would say Apache POI is a set of libraries which we need to download from official Apache org site to deal with Excel files. Or to read or write in Excel files. If you are working on a Maven project, you can add these Apache dependencies to your project(specifically to your POM.xml) file to work with Excel files(.XLS file and .XLSX file). There are some 10 dependencies which you need to add to your project. You can download the Apache POI maven dependency from official Apache site which is https://www.apache.org

Thank you for reading! I hope it will help you.

What is OOPS in JAVA? - Part 2


Hello All,

Today, we will discuss the remaining 2 parts of OOPS concepts which is Abstraction and Encapsulation.

What is Abstraction?

Hiding internal details of something and when we show only the functionality without considering the internal details of a system, is known as Abstraction.

Example: Can you think of something like this? I give you a minute to think over...THINK.
But, if you still do not get any answer, I tell you.

Example of your Mobile Phone or Car or Laptop. You just know how to use it, right but we do not know the internal structure of these.

In Java, we use abstract class and interface to achieve abstraction.

What is Encapsulation?

When we bind data and code together in a single unit, it is called encapsulation.

A very easy example to understand encapsulation is Java class. Your data members are private and you write the code for the functions you use.

You can give the above examples at the time of interview.

Please feel free to give your inputs in the comments section below. I hope, it will help you in understanding Java concepts.


Monday, 4 June 2018

What is OOPS in JAVA? - Part 1

One more important interview question. You can prepare the answer in following way:

OOPS abbreviates as Object Oriented Programming System. Java is considered an object-oriented language. It provides many concepts such as following:

  1. Inheritance
  2. Polymorphism
  3. Abstraction
  4. Encapsulation
Let's look at each one of them in detail:

What is Inheritance?

Inheritance:  There are 2 things involved here. One is Super class or Parent class and another is Subclass or Child class. So, when a subclass inherits the properties of the parent class, it is called as Inheritance. It helps us in code reusability.

What is Polymorphism?

Polymorphism:  You can remember the concept in this way. Poly means many and phism means form. So, when one thing takes multiple forms, it is called Polymorphism. Or when one task is performed in different ways, is known as Polymorphism. 
For Example Login as User, Login as Admin, Login as Manager. 

In Java, we can achieve Polymorphism is of 2 types:
  1. Method Overloading
  2. Method Overriding
Method Overloading is an example of compile time polymorphism whereas Method Overriding is an example of runtime polymorphism.
  1.  Runtime Polymorphism
  2. Compile time Polymorphism
Code Example: 

public void Add(int a,int b){
int Sum=0;
Sum=a+b;
System.out.println("The addition is": +Sum);
}

public void Add(float a ,float b){
float Sum=0;
Sum=a+b;

System.out.println("The addition is": +Sum);
}

At runtime, you provide 2 int values, first Add() will be invoked and if you provide 2 float values, then second Add() will be invoked. 

Please come back here to read about the remaining concepts. We will discuss on Abstraction and Encapsulation.

Please give your comments so that we know how we are doing. 

Thank you for reading! I hope, it will help you.

What is Requirement Traceability Matrix (RTM)?

I am not sure if this question is still asked in the interview or not but this is one of the very important concept to understand from the testing point of view.  What is the term RTM? It's Requirement Traceability Matrix. We use RTM to ensure that all functionalities in the app(AUT) are covered. Why do we use RTM? RTM is used to maintain the required coverage so that we can cover all customer/client requirements. We can create this matrix manually in an Excel spreadsheet or by using the tool as well. Generally, we have columns like Requirement ID, Test case ID, status, Remarks, Column etc. We can use Microsoft Test Manager ( MTM) or Team Foundation Server (TFS) tools to create traceability matrix. Mainly, while using RTM, we ensure that each and every requirement is mapped and traced with the respective test case successfuly. We should not miss any requirement while testing hence we map our test case to a requirement. That's the sole purpose of it.

Please feel free to give your inputs and visit us back to find some more interesting topics. Thank you for reading!

Sunday, 3 June 2018

What is JDK, JVM and JRE?


If you are new to Java, you must be wondering what is JDK, JRE and JVM. I know these terms sounds confusing but we are here to make you understand the difference between all of them. You can prepare it in the same way for the interview as well.

JDK – Java Development Kit. It consists of Java complier, JVM and Java class libraries.

JVM – Java Virtual Machine. It converts your program code into bytecode, execute it and gives you the result on the console.

JRE – Java Runtime Environment.  It consists of JVM and class libraries.


Conclusion: In a nutshell, when you want to run your Java programs, you need JRE. When you need to develop your Java programs, you need JDK. 


Important to note: Only Java is platform independent. JRE, JVM and JDK are platform dependent. 

Please feel free to give your feedback. And, we would be able to help you out more, if you visit us again. 

Thank you for reading! I hope it helps.

Strings in Java Part3

How are strings stored in memory?

As we know that string can be created via 2 ways i.e by using sting literal (implicit) or by creating a string object using a new keyword.

STRING POOL

  • Whenever a string is created via literal, the value is stored in special memory string pool.
  • JVM looks if there is value is present on the string pool, the same value is allocated to the new string literal
  • String pool will increase the memory efficiency and better performance

String s1 = "Hello";             // String literal

String s2 = "Hello";             // String literal

String s3 = s1;                   // same reference


STRING HEAP
  • Whenever a string is created via new keyword, the value is stored in string heap.
  • Each string object in a heap has its own storage
  • There is no sharing of storage in heap even if two string have same content
String s4 = new String("Hello");  // String object

String s5 = new String("Hello");  // String object













Strings in Java Part 2

String vs String Buffer

String is a immutable and String Buffer is mutable. Confused?, no need to worry just understand the below definition and program , Its easy concept.

String - Let us discuss about sting , String class in Java is immutable because we want to increase the performance so once object is created with some content , if we try to add new content/change the existing object it would not change

Let us see the below program and its output to understand the nature of immutable class

Class String Test
  {
      public static void main(String[] args)
              {
                   String s = new String("Hello");
                         s.concat("World");
                     System.out.println(s);
               }
}

Guessing the output?

Here the output is Hello 

String Buffer - String buffer is mutable class in java , which means if we try modify exiting object value it would get changed.

Class String Test
  {
      public static void main(String[] args)
              {
                   String s = new String("Hello");
                         s.append("World");
                     System.out.println(s);
               }
}

Here the Output would be HelloWorld 




Popular Posts

Recent Posts



Newsletter

Join our newsletter to get secret tips directly in your inbox!


*We Hate Spam!

Powered by Blogger.