Monday, July 29, 2019


       WebDriver drivernew FirefoxDriver();
                  (vs)
       FirefoxDriver drivernew FirefoxDriver();

WebDriver -> is an Interface
FirefoxDriver, ChromeDriver, IEDriver -> are classes

All the abstract methods of Webdriver interface are implemented in RemortWebDriver class which is extended by browser classes such as FirefoxDriver, ChromeDriver etc.,

In the above first statements we are creating objects for the browser class and casting it to WebDriver interface reference variable. 
In the statement FirefoxDriver driver =  new FirefoxDriver();,
The FirefoxDriver instance which gets created will be only able to invoke and act on the methods implemented by FirefoxDriver.. Using this statement, we can run our scripts only on Firefox Browser

To act with other browsers we have to specifically create individual objects as below:
ChromeDriver driver =  new ChromeDriver();
InternetExplorerDriver driver =  new InternetExplorerDriver();

To achieve we go for 
WebDriver driver =  new FirefoxDriver();
Whenever object is creating for the browser class and casting it to same driver reference variable
It helps you when you do testing on multiple browsers.
This is happening in dynamically run time. So that we can dynamic Polymorphism is applying here.
Question: How do you check whether a table data(values) is sorted or not? Sorting happens when clicking on Table Header(Ex: Name, which is a link).
Name
Venu
Avinash
Dharma
Answer:
We can take an array of String type as expected values and consider the column values which need to be verify are as actual values. Which can be resolved by below example.


import java.util.ArrayList;
import java.util.Collections;
import java.util.List;

public class CompareTwoLists {
       public static void main(String[] ar){
              List<String> expdValues = new ArrayList<String>();
              expdValues.add("venu");
              expdValues.add("avinash");
              expdValues.add("dharma");
              Collections.sort(expdValues);     //to arrange given list in sorting
             
              List<String> actValues = new ArrayList<String>();
              actValues.add("dharma");
              actValues.add("venu");
              expdValues.add("avinash");
              Collections.sort(actValues);
             
              if(expdValues.equals(actValues)){
                     System.out.println("Given Lists are Matched");
              }else{
                     System.out.println("Given lists are not matched");
              }
       }
}



Sunday, July 7, 2019

What is java?

Java is a programming language and a computing platform for application development.
It was first released by Sun Microsystem in 1995 and later acquired by Oracle Corporation in 2010.
In 2006 Sun started to make Java available under the GNU General Public License (GPL).
Lets see the phases of execution of a Java program:

  1. Writing of the program is of course done by java programmer
  2. Compilation of program is done by javac compiler, javac is the primary java compiler included in java development kit (JDK). It takes java program as input and generates java bytecode as output.
  3. In third phase, JVM executes the bytecode generated by compiler. This is called program run phase.
So, now that we understood that the primary function of JVM is to execute the bytecode produced by compiler. Each operating system has different JVM, however the output they produce after execution of bytecode is same across all operating systems. That is why we call java as platform independent language.
Note: To execute any java program, need to install the JDK

Why java language and its features?

Java is popular because of the following features:
  1. Simple programming language
  2. Object Oriented Language
  3. Distributed
  4. Robust
  5. Architecture Neutral or Machine Independent
  6. Portable
  7. Interpreted
  8. High Performance
  9. Multithreaded
  10. Dynamic



  1. Selenium 1 = Selenium Remote Control
  2. Selenium 2 = Selenium Webdriver, which combines elements of Selenium 1 and Webdriver.
  3. Selenium 3 = Selenium  1 + Selenium 2 (RC is deprecated and moved to legacy package)



What is Selenium:

Selenium is an Automation Testing Framework which automates web applications for testing purposes.
It is an open source and mainly used for automating functional tests and regression tests.

Note: It can be integrated with automation test tools such as Maven, Jenkins, & Docker to achieve continuous testing. It can also be integrated with tools such as TestNG, & JUnit for running test cases and generating reports.

Features of selenium:

Selenium is popular because of the below features:
  1. Selenium is an Open-Source.
  2. Selenium supports multiple languages like Java, C#, python, Ruby, Perl, Php, Java script.
  3. Supports multiple browsers like IE, Chrome, Firefox, Safari, Opera etc., (cross browser testing)
  4. Supports multiple Operating Systems like Windows, Mac, Linux etc., (Cross platform testing)
  5. Selenium supports for mobile platforms android and iOS
  6. Supports parallel test execution
  7. It can be integrated with other automation tools such as Maven, Jenkins and Docker etc.,
  8. Can be integrated with test management tools such as Jira and ALM

Limitations of Selenium:

Below are the limitations with selenium but we can we can overcome these using some integration tools:
  1. Selenium does not support automation testing for desktop applications
  2. We should know at least one of the supported programming languages
  3. Selenium does not have any inbuilt reporting capability
  4. It does not have built-in Object Repository
  5. It is not possible to perform testing on images
  6. Since Selenium is open source software, you have to rely on community forums to get your technical issues resolved


What is Test Automation:
Test Automation or Automation Testing is a method of automating execution of tests and then 
compares actual test results with predicted or expected results using special software.
                                                                  (or)
Test automation means using a software tool to run repeatable tests against the application to be
tested.

Advantages of Automation Testing:

  1. Faster execution and rapid feedback to developers
  2. Supports regression testing.
  3. Frequent execution and gives accurate results.
  4. Lesser Investment in Human Resources (Better ROI)
  5. Disciplined documentation of test cases
  6. Customized defect reporting
  7. Running tests anytime, anywhere un-attended
  8. Better Test Coverage
  9. Support for Agile and extreme development methodologies
Tools used for Automation Testing:
Below are some of the tools used for Test Automation
  1. Selenium (Open Source or Free ware) - Owned by Thougtworks
  2. UFT (Unified Functional Testing) (formerly QTP) (Commercial) – Owned by HP
  3. RFT (Rational Functional Tester)(Commercial) - Owned by IBM
  4. TestComplete (Commercial) – Owned by SmartBear Software
  5. Ranorex (Commercial) – Owned by Ranorex



Manual testing is a testing process that is carried out manually(executing test cases) in order to find defects without the usage of tools or automation scripting.
It is the most primitive of all testing types and helps find bugs in the software system.
Manual Testing does not require knowledge of any testing tool.
Advantages of Manual Testing:
  • Faster execution and rapid feedback to developers
  • Supports regression testing.
  • Frequent execution and gives accurate results.
  • Lesser Investment in Human Resources (Better ROI)
  • Disciplined documentation of test cases
  • Customized defect reporting.
  • Running tests anytime, anywhere un-attended.
  • Better Test Coverage.
  • Support for Agile and extreme development methodologies
Limitations of Manual Testing:
  • More people are required.
  • More tedious. (Tiresome, As repeating thing get tired)
  • More time is consumed.
  • Can’t be repeated so easily.
  • Concurrency is missing. (i.e. all the users cannot give request at the same instant of time)

What is Software Testing:
Software Testing is a process of verifying or validating an application with the intention of finding bugs or defects.
This can be done through either manually or using automation tool.
Definition of a Defect
It is a deviation from the requirement specification. (difference between expected result and actual result)

Importance of Software Testing:
  • It is an essential since it makes sure of the Customer’s reliability and their satisfaction in the application.
  • It is very important to ensure the Quality of the product. Quality product delivered to the customers helps in gaining their confidence.
  • Testing is required for an effective performance of software application or product.
  • It is important to ensure that the application should not result into any failures because it can be very expensive in the future or in the later stages of the development.







      selenium-repo by venu

      Blog helps to a student or IT employee to develop or improve skills in Software Testing.
      For Online Classes Email us: gadiparthi122@mail.com

      Followers

      About Me

      My photo
      Hyderabad, Andhra Pradesh, India
      I am Automation Testing Professional. I have completed my graduation in B.Tech (Computers) from JNTU Hyderabad and started my career in Software Testing accidentally since then, I passionate on learning new technologies

      Contact Form

      Name

      Email *

      Message *

      Popular Posts