Sunday, 28 February 2016

Angular JS Protractor Installation process - Tutorial Part 1


                     Protractor, formally known as E2E testing framework, is an open source functional automation framework designed specifically for Angular JS web applications. It was introduced during Angular JS 1.2 as a replacement of the existing E2E testing framework. The Protractor automation tool is also recommended by Angular JS for scenario testing

 Features of the Protractor:
  1. Built on the top of Web driver JS and Selenium server
  2. Introduced new simple syntax to write tests
  3. Allows running tests targeting remote addresses
  4. Can take advantage of Selenium grid to run multiple browsers at once
  5. Can use Jasmine or Mocha to write test suites
 Protractor is a wrapper (built on the top) around Selenium Web Driver, so it contains every feature that is available in the Selenium Web Driver. Additionally, Protractor provides some new locator strategies and functions which are very helpful to automate the Angular JS application. Examples include things like: waitForAngular, By.binding, By.repeater, By.textarea, By.model, WebElement.all, WebElement.evaluate, etc.


Prerequisites

1. Node Js :

 Protractor is a Node.js program. To run Protractor, you will need to have Node.js installed
 https://nodejs.org/en/

 Verify Installation
To verify your installation, please type in the command
  npm --version

2. Installing Protractor :

For this project, the Protractor framework is being used and configured on a Windows environment. Below are the steps for installation:
  
Open the command prompt and type in the following command to install protractor globally.
       
npm install –g protractor
Install Protractor Locally
You can install protractor locally in your project directory. Go to your project directory and type in the following command in the command prompt:
   npm install protractor
Verify Installation
To verify your installation, please type in the command
    Protractor --version
If Protractor is installed successfully then the system will display the installed version. Otherwise you will have to recheck the installation.

3. Installing JDK :

 To run Protractor, you will need to have Node.js installed
http://www.oracle.com/technetwork/java/javase/downloads/

Verify Installation
To verify your installation, please type in the command
 java -version 

4. Setting Up the Selenium Server :

The webdriver-manager is a helper tool to easily get an instance of a Selenium Server running. Use it to download the necessary binaries with:
webdriver-manager update
Now start up a server with:  
webdriver-manager start 
This will start up a Selenium Server and will output a bunch of info logs. Your Protractor test will send requests to this server to control
a local browser. You can see information about the status of the server at
http://localhost:4444/wd/hub.
       
Now By default your node should be installed in your user directory and open up "Cmd"

Example :
C:\Users\BrahmiP\AppData\Roaming\npm\node_modules\protractor\example>protractor
 conf.js




Tuesday, 4 August 2015

What is the alternate way to send text in textbox of webpage with out using sendKeys() method ?

Note- Use Javascript to send text.
syntax-

((JavascriptExecutor)driver).executeScript("document.getElementById('attribute value of id').value='text which you want to pass'");

ex-
import java.util.concurrent.TimeUnit;
import org.openqa.selenium.JavascriptExecutor;
import org.openqa.selenium.WebDriver;
import org.openqa.selenium.firefox.FirefoxDriver;

public class WithoutSendKeys {
public static void main(String[] args) {
WebDriver driver = new FirefoxDriver();
driver.manage().timeouts().implicitlyWait(10, TimeUnit.SECONDS);
driver.get("https://accounts.google.com/ServiceLogin?sacu=1&scc=1...");
((JavascriptExecutor)driver).executeScript("document.getElementById('Email').value='sanjay'");
}
}

How to check whether the selectbox is singleListbox or multipleListBox.


Script Code-

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

public class MultipleListBox {
    public static void main(String[] args) {
        WebDriver driver = new FirefoxDriver();
        driver.get("C:\\selenium\\Selenium_web.html"); 
/*here the url is my personal page, you can try for any url which has such scenario or you can develop your own html page having the above html code.*/
        System.out.println(driver.findElement(By.xpath("//select[@id='mdd']")).getAttribute("multiple")); // this will print true, which means it is multipleListBox
        System.out.println(driver.findElement(By.xpath("//select[@id='sdd']")).getAttribute("multiple"));//

// this will print null, which means it is singleListBox       
    }
}

How do I identify and click on hidden element present on web page?

 HTML :
------------------
 
<input id="reporting" class="main" type="checkbox" title="reporting" onclick="enableRadioButtons('reporting', 'reportingHidden', 'reportingCheck')"/>Reporting</td>


 SELENIUM CODE:

----------------------
JavaScriptExecutor js= javaScriptExecutor(driver);
js.executescript("onclick="enableRadioButtons('reporting', 'reportingHidden', 'reportingCheck')");

Print the name of friends with the status like one is online, busy, idle or offline in gmail chat.

Note- Please give the gmail id and password while runtime. (after pressing ctrl+f11).

import java.util.List;
import java.util.Scanner;
import java.util.concurrent.TimeUnit;
import org.openqa.selenium.By;
import org.openqa.selenium.NoSuchElementException;
import org.openqa.selenium.WebDriver;
import org.openqa.selenium.WebElement;
import org.openqa.selenium.firefox.FirefoxDriver;

public class GmailOnlinePeople {

public static void main(String[] args) {
    WebDriver driver;
    Scanner in = new Scanner(System.in);
    System.out.println("Enter the gmail id: ");
    String emailId = in.next();
    System.out.println("Enter the pass: ");
    String pass = in.next();
 
    driver = new FirefoxDriver(); //open firefox browser
 
    //login to gmail
    driver.get("http://www.gmail.com");
    driver.manage().window().maximize();
    driver.manage().timeouts().implicitlyWait(40,TimeUnit.SECONDS);
    driver.findElement(By.name("Email")).sendKeys(emailId);
    driver.findElement(By.name("Passwd")).sendKeys(pass);
    driver.findElement(By.name("signIn")).click();
    String name="";
    //friends with available status
    try {
        List<WebElement> available = driver.findElements(By.xpath("//tr[td[img[contains(@alt,'Available')]]]//td[2]/span[1]"));
        System.out.println("number of friends with available status in the gmail chat: "+available.size());
        if(available.size()!=0){
            System.out.println("Name of the friends with Available status: ");
        }
        for (int i=0; i <available.size(); i++)
        {
            name = available.get(i).getAttribute("textContent");
            System.out.println((i+1)+") "+name);
        }
    } catch (NoSuchElementException e) {
        System.out.println("No one is there with available status.");
    }
   
  //friends with busy status in the gmail chat
    try {
        List<WebElement> busy = driver.findElements(By.xpath("//tr[td[img[@alt='Busy']]]//td[2]/span[1]"));
        System.out.println("number of friends with busy status in the gmail chat: "+busy.size());
        if(busy.size()!=0){
            System.out.println("Name of the friends with busy status: ");
        }
        for (int i=0; i <busy.size(); i++)
        {
            name = busy.get(i).getAttribute("textContent");
            System.out.println((i+1)+") "+name);
        }
    } catch (NoSuchElementException e) {
        System.out.println("No one is with busy status.");
    }
   
  //friends with idle status
    try {
        List<WebElement> idle = driver.findElements(By.xpath("//tr[td[img[@alt='Idle']]]//td[2]/span[1]"));
        System.out.println("number of friends with idle status in the gmail chat: "+idle.size());
        if(idle.size()!=0){
            System.out.println("Name of the friends with idle status: ");
        }
        for (int i=0; i <idle.size(); i++)
        {
            name = idle.get(i).getAttribute("textContent");
            System.out.println((i+1)+") "+name);
        }
    } catch (NoSuchElementException e) {
        System.out.println("No one is with idle status.");
    }
   
  //friends with offline status
    try {
        List<WebElement> offline = driver.findElements(By.xpath("//tr[td[img[@alt='Offline']]]//td[2]/span[1]"));
        System.out.println("number of friends offline in the gmail chat: "+offline.size());
        if(offline.size()!=0){
            System.out.println("Name of the friends offline: ");
        }
        for (int i=0; i <offline.size(); i++)
        {
            name = offline.get(i).getAttribute("textContent");
            System.out.println((i+1)+") "+name);
        }
    } catch (NoSuchElementException e) {
        System.out.println("No one is offline.");
    }
    driver.close();
}
}

Wednesday, 22 July 2015

How to make the web driver to wait for page to refresh before executing another test

code:
 
public void waitForPageLoaded(WebDriver driver) {

     ExpectedCondition<Boolean> expectation = new
ExpectedCondition<Boolean>() {
        public Boolean apply(WebDriver driver) {
          return ((JavascriptExecutor)driver).executeScript
            ("return document.readyState").equals("complete");
        }
      };

     Wait<WebDriver> wait = new WebDriverWait(driver,30);
      try {
              wait.until(expectation);
      } catch(Throwable error) {
              assertFalse("Timeout waiting for
       Page Load Request to complete.",true);
      }
 } 

Friday, 19 June 2015

Difference Between get() and navigate() in Selenium

Get v/s Navigate :-
"navigate().to()" and "get()" do exactly the same thing. Only thing is that incase of "get" selenium would wait for the page to fully load before executing the next line of code.

Also "navigate" interface further exposes the ability to move backwards and forwards in your browser's history.

Object Repository in Selenium

Unlike QTP/UFT, Selenium does not offer the default implementation for  object repository. In QTP things are really straightforward, just object spy the controls and add to object repository, and further with the blessings of intellisense feature in its IDE, utilize them easily in writing scripts.

But how we can achieve the same in selenium??..
It can be done by using Properties file feature of Java. Lets begin with some basic explanation.

What is Object Repository?

Object Repository is a centralized location where we can store objects information, it acts as interface between Test script and application in order to identify the objects during the execution.

We always recommend using external file for object repository rather than hard coding the objects and its properties directly into our code. Why this??? As it reduces the maintenance  effort and provides positive ROI, for example say any of the object properties change within our application under test, we can easily change it in external object repository file, rather than searching and doing updates  for that object individually in the code.

Principle:-
A basic object repository can be implemented as a collection of key-value pairs, with the key being a logical name identifying the object and the value containing unique objects properties used to identify the object on a screen. For this, we will use a .properties file in Java which is a basic collection of key-value pairs.

Creating Properties File in Eclipse:-

Step1:-
Right click on the Package in the solution Explorer of Eclipse-> New ->Other


Creating Properties file in Eclipse
Adding New File in Eclipse

Or 
Right click on the Package in the solution Explorer of Eclipse-> New ->File (In this case Step-2 below is not required)


Create new file in eclipse
New ->File in Eclipse

Step2:-
General ->File ->Click Next


New file wizard in Eclipse
New Wizard in Eclipse
Step3:-
Give name to the file with .properties extension (Say OR_Gmail_Login.properties) ->Click Finish
Properties file in Java Eclipse
Naming Properties File in Eclipse


Note:- 
We generally create each properties file for every single page and capture all the UI elements present on the page and use it as per the needs.


Adding Key/value Pairs in Properties File:-

Before adding our objects into object repository, let’s outline a simple scenario that we will be automating in Selenium:-

1. Launch Gmail login page.
2. Fill the Username & Password fields and click on Submit button

After creating our empty properties file, now we need to add our elements, in the form of key and Value pairs.
For Example:-

Gmail.LoginPage.txtPassword -> Key
Passwd->Value

Note: - In Value property we have taken the Locator and its value, which will be used to identify our control. As password field, is getting uniquely identified by ID field so we have taken that value.


Properties file with objects in Selenium
Properties File in Java



Code:-
package OR;

import java.io.File;
import java.io.FileInputStream;
import java.io.FileNotFoundException;
import java.io.IOException;
import java.util.Properties;
import java.util.concurrent.TimeUnit;

import org.openqa.selenium.By;
import org.openqa.selenium.WebDriver;
import org.openqa.selenium.WebElement;
import org.openqa.selenium.firefox.FirefoxDriver;

public class PropertiesFile {
  public static void main(String[] args)  {
   //Creating the File Object
   File file = new File("D:\\Automation\\Selenium\\MyCode\\FirstSeleniumCode\\src\\OR\\OR_Gmail_Login.properties");
   //Creating properties object
   Properties prop = new Properties();
  //Creating InputStream object to read data
   FileInputStream objInput = null;
   try {
    objInput = new FileInputStream(file);
    //Reading properties key/values in file
    prop.load(objInput);
    //Closing the InputStream
    objInput.close();
    } catch (FileNotFoundException e) {
     System.out.println(e.getMessage());   
     
    } catch (IOException e) {
   System.out.println(e.getMessage());
  }
   //Creating the driver instance
   WebDriver driver = new FirefoxDriver();
   //Adding wait
   driver.manage().timeouts().implicitlyWait(20, TimeUnit.SECONDS);
   //Launching the GMAIL page
   driver.get(prop.getProperty("Gmail.URL"));
   //Entering the UserName
   WebElement element = driver.findElement(By.id(prop.getProperty("Gmail.LoginPage.txtUserName")));
   element.sendKeys("uftHelp@gmail.com");
   //Entering the Password
   element = driver.findElement(By.id(prop.getProperty("Gmail.LoginPage.txtPassword")));
   element.sendKeys("uftHelp");
   //Clicking the SignIn button
   element = driver.findElement(By.id(prop.getProperty("Gmail.LoginPage.btnSignIn")));
   element.click();
   System.out.println("Test Scenario Completed!!");
   //Destroying the driver object
   //driver.close();

  }
}

Thursday, 5 March 2015

Resizing a web element using movebyoffs

Genarally when ever we want to change the size of an element we do with the help of mouse manually. Now we will see to resize / change the size of an element using webdriver actions class with moveByOffset which moves the mouse position from its current position by the given offset.
Below are the simple steps thats needs to be followed for the below example:-
Step 1: Open the URL
Step 2: Wait for the element that you want to resize. (Make sure if there are any frames then we need to shift to the frame and then perform operation).
Step 3: We will define a method using which we need to pass web element and the coordinates to the method.

Friday, 10 October 2014

Selecting a date from Datepicker using Selenium WebDriver

Calendars look pretty and of course they are fancy too.So now a days most of the websites are using advancedjQuery Datepickers instead of displaying individual dropdowns for month,day,year. :P
If we look at the Datepicker, it is just a like a table with set of rows and columns.To select a date ,we just have to navigate to the cell where our desired date is present.

Step 1:  Here I am taking Sample Website "http://www.cleartrip.com/"
step 2:  Here we can able to select date whatever we want( This is pure dynamic)
step 3:  Here I am Implementing all my logic in 'genericDatePicker()' Method. This method i am   passing date(date format should be dd/mm/yyyy).
step 4: Here First I am Clicking Calendar field and then i am getting Month/Year.
Step 5: I have written Enum method(I am assigning Number to every Month)
Step 6: After that I am calculating total months.
Step 7: Finally I am Clicking the Date From DatePicker..

Here is a sample code on how to pick a 26/10/2016..

  1. package com.utility;

    import java.util.List;

    import org.junit.After;
    import org.junit.Before;
    import org.junit.Test;
    import org.openqa.selenium.By;
    import org.openqa.selenium.WebDriver;
    import org.openqa.selenium.WebElement;
    import org.openqa.selenium.firefox.FirefoxDriver; 
  2. public class RedBus {
      WebDriver driver;
    @Before
    public void setUp() throws Exception {
    driver = new FirefoxDriver();
    driver.get("http://www.cleartrip.com/");
    driver.manage().window().maximize();
    }

    @Test
    public  void datePicker(){
    genericDatePicker("26/09/2016");  //date format should be dd/mm/yy
    }

    public  void genericDatePicker(String inputDate){
    /* CLicking the Date Feild*/
    WebElement ele =driver.findElement(By.id("DepartDate"));  
    ele.click();
    /*Here we are getting Month and Year */
    String month = driver.findElement(By.xpath("//div[@class='monthBlock first']/div[1]//span[1]")).getText();
    String year = driver.findElement(By.xpath("//div[@class='monthBlock first']/div[1]//span[2]")).getText();
    System.out.println("Application month : "+month + " Year :"+year);
    int monthNum = getMonthNum(month);
    System.out.println("Enum Num : "+monthNum);
    String[] parts = inputDate.split("/");   // Here I am Spliting Our Input String Value
    //Here I am Implementing the Logic
    int noOfHits = ((Integer.parseInt(parts[2])-Integer.parseInt(year))*12)+(Integer.parseInt(parts[1])-monthNum);
    System.out.println("No OF Hits "+noOfHits);
    for(int i=0; i< noOfHits;i++){
    driver.findElement(By.className("nextMonth ")).click();
    }
    /* selecting the month div*/
    List<WebElement> cals=driver.findElements(By.xpath("//div[@class='monthBlock first']//tr"));
    System.out.println(cals.size());
    /*iterating the "tr" list*/
    for( WebElement daterow : cals){
    /*getting the all "td" s*/
    List<WebElement> datenums = daterow.findElements(By.xpath("//td"));
    /*iterating the "td" list*/
    for(WebElement date : datenums ){
    /* Checking The our input Date(if it match go inside and click*/
    if(date.getText().equalsIgnoreCase(parts[0])){
    date.click();
    break;
    }
    }
    }
    }

    // This method will return Month Number
    public  int getMonthNum(String month){
    for (Month mName : Month.values()) {
    if(mName.name().equalsIgnoreCase(month))
    return mName.value;
    }
    return -1;
    }

    // Here I am Creating Enum Method(I am assigning Number to every Month)
    public enum Month {
    January(1), February(2), March(3), April(4), May(5), June(6) , July(7), August(8), September(9), October(10), November(11),December(12);
    private int value;

    private Month(int value) {
    this.value = value;
    }

    }

      @After
    public void tearDown() throws Exception {
    driver.quit();
    }


    }

Wednesday, 8 October 2014

Handling dynamically generated ids in selenium webdriver

Step 1: Here I am trying to automate testing of a webpage that contains list of items. User input item is selected and is deleted. Here, I need to select BR2 and delete that item.

<div id="virtual_domains-content">
    <div class="columns">
        <div class="left-column">
            <h2>Virtual Domains</h2>
                <div class="search-row">
                    <div class="box scrolling list-editable">
                        <div id="virtual_domains-list" class="list-view">
                            <div id="virtual_domains-list-11" class="list-item-view">
                                <div class="content"> BR1</div>
                            </div>
                            <div id="virtual_domains-list-35" class="list-item-view">
                                <div class="content"> BR2</div>
                            </div>
                        </div>
                    </div>

Step 2:In the above code  contains class name.So,I am using  class name.

List<WebElement> list =driver.find_element_by_class_name("list-item-view");
for(WebElement option : list){
    System.out.println(option.getText());
    if(option.getText().equals("BR2")) {
        option.click();
        break;
    }

}

Wednesday, 24 September 2014

As a QA Analyst or software tester, how are you held accountable for the work you are doing?

We developed a checklist. 

1. Do you have Business Requirements documentation? 
2. Has there been a Business Requirements walk through? 
3. Have requirements been signed off? 
4. Is there a Functional Design Document? 
5. Has there been a Functional Design Review 
6. Do you have test plan? 
7. Have you had a test plan review? 
With peers? 
With developers? 
With Business Group? 
8. Has the code been reviewed? 
9. Have smoke tests been completed to accept code into test? (Entrance criteria) 
10. Is testing complete? 
11. Are there open defects? 
12. Do you meet the exit criteria? 
13. Have you had a results verification review? 
Who performed the review 
14. Was the timeline met? 
If no, specify reasons and state action plan 
15. Is the Deployment Plan ready? (MOP) 
16. Is the Deployment Validation Plan ready? 
17. Has the Deployment been completed? 
18. Was the Deployment successful? 
19. Have you archived project documentation?

Friday, 19 September 2014

High level Test process for a company with no formal processes.

My high level test process would include the following: 

1. Inquire - what should you test - ie access the requirements, product, design, etc. 
2. Intent - what will you test and how will you test it, plan your testing 
3. Implement - develop and execute your testing 
4. Inform - analyze, access, and inform others of your test results and recommendations 
5. Iterate - perform steps 1 - 4 as often as is appropriate and feasible given the SDLC 
6. Integrate - perform steps 1 - 5 within the context of the SDLC 
7. "Review - make sure you're doing the right things and doing them the right way by frequently (constantly?) 
8. Inspire - inspire others to embrace quality practices into their roles (as you do in yours) 
9. Integrity - ensure that you perform your tasks and role with professionalism and courtesy

Monday, 4 August 2014

Connecting to DataBase using Selenium WebDriver


Web Driver cannot directly connect to Database. You can only interact with your Browser using Web Driver. For this we use JDBC("Java Database Connectivity").The JDBC API is a Java API for accessing virtually any kind of tabular data.The value of the JDBC API is that an application can access virtually any data source and run on any platform with a Java Virtual Machine.In simplest terms, a JDBC technology-based driver ("JDBC driver") makes it possible to do Five things:

1.Load Jdbc driver
Class.forName("com.mysql.jdbc.Driver");

2.Establish a connection with a data source
Connection con =DriverManager.getConnection(dbUrl, userName, password);

3.create Statement Object
Statement stmt = con.createStatement();

4.Send queries and update statements to the data source
ResultSet rs = stmt.executeQuery(query);

5.Process the results
while(rs.next()){

String uName = rs.getString(1);
}

Example Program:

package com.dbconectin;
mport java.sql.Connection;
import java.sql.DriverManager;
import java.sql.ResultSet;
import java.sql.SQLException;
import java.sql.Statement;
import org.junit.After;
import org.junit.Before;
import org.junit.Test;

public class dbConnection {

@Test
public void test() throws ClassNotFoundException, SQLException 
{
try{
//Connection Url
String dbUrl = "jdbc:mysql://localhost:3306/companydb_manf";
//Give Username
String userName ="root";
//Give Password
String password ="root";
//Give Db query
String query = "select * from sr_agritech_estimation_labor where user_id='manager';";

//Load mysql JDBC driver
Class.forName("com.mysql.jdbc.Driver");
//Get connection to Db
Connection con =DriverManager.getConnection(dbUrl, userName, password);
//Create Statement Object
Statement stmt = con.createStatement();

//Send Sql query to Db

ResultSet rs = stmt.executeQuery(query);

//While loop to get all data
while(rs.next()){
String uName = rs.getString(1);
String uName1 = rs.getString(2);
String uName2 = rs.getString(3);
String uName3 = rs.getString(4);
String uName4 = rs.getString(5);
System.out.println(uName);
System.out.println(uName1);
System.out.println(uName2);
System.out.println(uName3);
System.out.println(uName4);
System.out.println("-----------------------");
}
//close db connection
con.close();
}catch (Exception e) {
// TODO: handle exception
e.printStackTrace();
}

}


}

I guess every one can understand.....;)

Tuesday, 1 July 2014

How To Create And Run JUnit Test Suit For WebDriver Test - Step By Step

If you are planning to perform regression testing of any application using webdriver then obviously there will be multiple test cases or test classes under your webdriver project. Example - There are 2 junit test cases under your project's package. Now if you wants to run both of them then how will you do it? Simple and 
easy solution is creating JUnit test suite. If your project has more than 2 test cases then you can create test suite for all those test cases to run all test cases from one place.
Step 1 - Create new project and package
Create new project in eclipse with name = junitproject and then add new package =
   com.practice.testsuite under your project. 
Step 2 - Create 1st Test Case
Now create JUnit test case under com.practice.testsuite package with class name =
   Junit1 as bellow.
package com.practice.testsuite;
import org.junit.Test;
import org.openqa.selenium.WebDriver;
import org.openqa.selenium.firefox.FirefoxDriver;
public class junittest1 { WebDriver driver = new FirefoxDriver();
public class Junit1 {
 WebDriver driver;
  @Test
  public void f() {
  driver = new FirefoxDriver(); 
  driver.get("https://www.facebook.com/");
  driver.manage().window().maximize();
  driver.quit();
  }
}
Step 3 - Create 2nd test case
Same way, Create 2nd test class with name = Junit2 under package = junitpack as bellow.
package com.practice.testsuite;
import org.junit.Test;
import org.openqa.selenium.WebDriver;
import org.openqa.selenium.firefox.FirefoxDriver;
public class junittest1 { WebDriver driver = new FirefoxDriver();
public class Junit2 {
 WebDriver driver;
   @Test
  public void f() {
    driver = new FirefoxDriver(); 
   driver.get("https://www.google.com/");
   driver.manage().window().maximize();
   driver.quit();
  }
  @Test
  public void f() {
  driver = new FirefoxDriver(); 
  driver.get("https://www.facebook.com/");
  driver.manage().window().maximize();
  driver.quit();
  }
}

Step 4 - Create test suite for both test cases
Now we have 2 test cases(Junit1.java and jJunit2.java) under package = com.practice.testsuite.
To create test suite, Right click on com.practice.testsuite package folder and Go to -> New -> Other -> Java -> Junit ->  Select 'JUnit Test Suite'
package com.practice.testsuite;
import org.junit.runner.RunWith;
import org.junit.runners.Suite;
import org.junit.runners.Suite.SuiteClasses

@RunWith(Suite.class)
@SuiteClasses({Junit1.class,Junit2.class})
public class JunitSuite {

}

Step 5- Running test suite
 When you run JunitSuite test suite, eclipse will run both test cases (Junit1 and Junit2) one by one. When execution completed, you will see  output lines in console.



Angular JS Protractor Installation process - Tutorial Part 1

                     Protractor, formally known as E2E testing framework, is an open source functional automation framework designed spe...