LayoutTitle

Hoverable Dropdown

Thursday, July 1, 2021

Automation Testing Projects - Estimation Guidelines

 

Background:

Estimation helps you to estimate or guess. It provides you an approximate in numeric value; it could be number of person days or hour’s etc. It is a pre-planning activity on any type of automation projects, which helps or puts Manager or Lead in ease to manage the project and complete the activities on time as per the agreed estimation.

It helps project management if there are any deviations; revisit the estimation at any point in time during project management life cycle as per the agreed frequencies.

Project is typically has the major phases like requirements, planning, coding , testing and production; in these lines we will have scope changes, issues /risks, delay in time and resources unplanned leaves,  infrastructure/Environment outage etc.,. The outcome of the unexpected changes in any of these lines will have an impact on project. Hence, making good estimates is very crucial. Decision making on the estimations varies from the project to project. One should not do overestimate to overcome the obstacles, in fact it is a wrong approach.

In my experience, making estimation should be closure to actual means genuine / realistic and accurate. We cannot predict any issues that comes in between the project execution so one should have frequency parameters to revisit the estimations defined or agreed; it increases the transparency between the Client and the Vendor. Hence, we will produce estimates with highly optimistic mindset. Adhering to agreed estimation is very important to build a good reputation and relationship with the client and results to longer and stronger bonding.

Agreed frequency parameters, few examples:

1.       Change in scope

2.       Resource ramp up & down in size

3.       Change in Regression size

4.       Decrease in dependency on the teams


Introduction:

There are so many estimation techniques like Agile COCOMO, Poker, Three Point Estimation, Proxy Based Estimation; Wide band Delphi, Function Point Analysis and popular FP Variants in software testing but it is true that no estimation model exactly fits to the similar requirements too.

This document outlines and highlights to collect the basic information that is required to estimate the automation testing efforts / automation projects.

Here with summarizing the ways to collect the raw data for the estimation, the ways to map the requirement with the available data and estimating the efforts for the project.

NOTE: Do not go by the historical data and provide that estimation, as each project is unique. Historical data gives you an idea but do not rely on them. Always, suggest you to understand your project and strength of your team and other supporting teams (Example: infrastructure including tools and management support)

Touchpoints to consider while doing Estimation:

  1. Define the Regression Size (Ex: Number of Manual Test Cases)
  2. Define the size
    1. Manual Test Cases Count (Manual Test Cases Count = Regression Size - Automation Not Feasible)
    2. Automation Test Case Count (Automation Test Case Count = Regression Size – Automation Feasible Test Cases)
    3. Define the complexity for derived automation test cases

                                                               i.      Functionality Complexity (Complex, High, Medium & low)

                                                             ii.      Automation development Complexity (Complex, High, Medium & low)

    1. Automation Skillset (Resource Capability) (Expert, intermediate, novice & beginner)
    2. Automation code Re-usability percentage (NOTE: if the re-usability is less than 30%, I suggest not to automate such feature or module or project, which won’t give best ROI )

                                                               i.      Derive Existing Automation code Re-usability percentage

                                                             ii.      Derive Newly Automation code Re-usability percentage

    1. Development Effort – derive the development effort for one test case based on the following factors

                                                               i.      Code complexity

                                                             ii.      Functionality complexity

                                                           iii.      Resource skillset / experience

                                                           iv.      Technology of the application – efforts might varies again each of the following and percentage of code re-usage

1.       Web Services

2.       Web applications

3.       Mainframes

4.       Windows

5.       .Net

6.       Angular JS etc.

    1. Also, including the efforts for the following automation code dependencies

                                                               i.      Functionality understanding (KT)

                                                             ii.      Test Data creation

                                                           iii.      Automation Feasibility study (Analysis)

                                                           iv.      Clarifications delays

                                                             v.      Code Debugging & Dry run for few test runs (to validate code robustness)

                                                           vi.      Code reviews & corrections

                                                          vii.      Any other dependencies

                                                        viii.      Technical challenges if any

    1. Execution – if the automation execution time is less than manual execution then only consider the automation feasibility study prior to automation development.


Approach:

Automation Estimation - Provided simple 3 Points for easy understanding

Point 1: 

Grade the efforts required in hours to develop the single automation script among the resource capability; that you have in your team (Refer the below table). The Efforts required/script may vary from application to application. The given efforts are not industry standards, it should be derived from your historical information or experience

NOTE: Similarly, you can grade the efforts for single automation script execution to calculate the efforts


 Point 2: 

Now, you Grade the complexity percentage from your Regression suite size and derive the test cases count by calculating rightly (Refer the below table). Here, the percentage may vary from organization to organization or application being tested. These percentages helps in deriving the test cases count itself.


Point 3: 

The above two table provides you required inputs to calculate the development efforts against resource capability. 

Here, given 5% as Buffer that includes technical challenges only. The Total Days required here is purely the development efforts. Additionally, you have to include the efforts required for the other automation activities listed below.

NOTE: Similarly, include the additional activities while doing calculation efforts for execution effort estimation as well.

     Calculation for your understanding

            Complex (Hrs.) = Test Cases Count [12] * Complex (Hrs.) [ 4 ] 

                                     = 48 (Complex (Hrs.)) for Expert Resource


A Typical Automation contains the following activities – Work Breakdown Structure (WBS)

1.       Feasibility Study (Analysis) – Here executing the manual test case at least once and verify the data management is easy and have no dependencies.

2.       Framework design and development

3.       Script Development

4.       Integration of re-usable components

5.       Self execution / Dry Run – to make sure functionality is working fine

6.       Code Review

7.       Execution Review

8.       Sign – Off

 

Benefits:


  1. Now we are able to communicate facts clearly with proper estimation model.
  2. Able to track and monitor the activities well.
  3. Finishing the activities on time with transparency.
  4. Able to display clearly and confidently to the Client if there is any deviation from the given timelines well in advance.


Summary:

Initially, identify the feasible test cases for automation. Understand the project requirement correctly and map with the estimation experience that you have and with the existing techniques that are available. Create your own estimation framework that makes you comfortable in tracking and monitoring the activities.

If we encounter any issues due to any cause in between the project execution, you can communicate and give clarity on the delays to direct & indirect stakeholders with estimation deviations with valid evidences.

This will help you to improve the existing approach and gives add value to the customer in the long run too.

Monday, May 24, 2021

New age of Test Automation - Role of Data Science (DS) and Artificial Intelligence (AI) to Software Testing


New age of Software Testing - in near Future

New age of Software Testing is moving towards various changes like the way new mobiles are pumping into market with new software's, features and styles (look & feel) and so on. In the similar spirit even in Software Testing we are witnessing the new changes and bringing new challenges with respect to the Test automation bootstep too.



To inline, with the speed market is growing, we testing family has to think or move towards in the same direction to compete with.

Hence, here I would like to portray my experiences and also how the new age of Testing Automation look like in near future. Hope you all would be ready to face these challenges in no time with compassion and readiness before the challenge falls as a requirement on your table.

The Problem Statement



Initially, the challenges would hit more on Test Automation as one would depend on the tools that are supporting in the current circumstances. As the requirements comes with more of unstructured data conditions the automation test coverages would drastically come down and the prominence of the automation might come down as there shall be more of manual intervention would require for the same repeated tasks is concern.


Data Science & Artificial Intelligence Role in Automation Testing

Background:

The Test automation is mostly running with the test coverage on the structed data requirements and with the new trends of technologies are throwing challenges as there would be a demand of enormous unstructured data requirements. 

Unlike data in traditional or early ages, the current and future style or format data is going to be very huge and un-structured and biggest challenge here is the sources of the data would be uncountable and would be pump in trillions of such data in a single fraction of time period.

For example, refer below:

1. Text files or batch files that with unlimited columns and with unlimited types and formats of data

2. PDF automation - background, foreground layouts, tabs, sections, duplicate data validations, similar content, image validations

3. OCR - check book validations, written check validations, movie validations, unreadable text validations, vision validations

The future automations might be in these format, with which current automation tools definitely would not cater these kinds of similar needs. 

                        

Hence, the necessity of changing the MIND SET is needed to cater our services in future as well - WIN-WIN mode of living.

What is Data Science?

Data Science, is not new to anyone who studied SSC in schooling days or Intermediate in college days. Just re-memorizing for the need of our future only. As said, above in the background section, Data Science helps us to take or make a wise decisions and correct predictions with the help of Statistics with which we can do our own causal analysis and solutions for the future benefits.  

What is Artificial Intelligence?

Using the available tools/algorithms/techniques and Machine Leaning (ML) and Deep Learning (DL) principles and with the helps of computer science intelligence, will come up with activities that human think and react that includes recognition, observation & learning.

What is our Role in Future !!!



Automation Testing, would require our experiences and change of mind set to serve the future needs of Software Testing requirements as family working together for ever by competing with the market in any circumstances. Its a WIN-WIN or GIVE & TAKE policy one should not forget and it is a continuous learning should always remember and educate same to our NEAREST & DEAREST as well.






Monday, May 10, 2021

Wednesday, February 10, 2021

Headless Browser using Selenium & Java

1. What is Headless Browser?

    Executing the tests on background without viewing the execution on any Browser that you desired to.

2. How Headless Browser helps QA?

    Helps in the executing the tests in a Non-UI mode i.e., Selenium Headless Browser

3. Is Headless Brower supports widely available Browsers like Chrome or Firefox etc?

    Latest versions of SeleniumWebDriver 3 & 4, supports headless versions of real browsers                     like Chrome, Firefox, and Edge

 4. Limitations of Headless Browser?

        1. Page load issues

        2. Sync

        3. Tracing the defects of the application

        4. UI validations like page align, background colors etc

5. How Java helps in Headless Browser?

    HtmlUnitDriver is a Java based implementation of Selenium WebDriver based on HtmlUnit, without     a GUI.

6. Headless Browser Maven Dependency!! 

    <!-- https://mvnrepository.com/artifact/org.seleniumhq.selenium/selenium-htmlunit-driver -->

        <dependency>

            <groupId>org.seleniumhq.selenium</groupId>

            <artifactId>selenium-htmlunit-driver</artifactId>

            <version>2.52.0</version>

        </dependency>

NOTE: Version may vary based on the selenium version you are using.


7. Ways to implement in the Selenium Code using Java!

    1. Using HtmlUnitDriver, which is the default usage. Refer the Example 1.

    2. Using widely used browsers. Refer the Example 2.


Example 1: Using the HtmlUnitDriver()

    import org.openqa.selenium.htmlunit.HtmlUnitDriver;

     public class headlessBrowserDemo {

     public static void main(String[] args) {        

            HtmlUnitDriver htmlUnitDriver = new HtmlUnitDriver();        

            htmlUnitDriver.get("https://google.com/"); 

           System.out.println("Title of the page is = " + htmlUnitDriver.getTitle());        

        }

    }


Example 2: Using the ChromeDriver()

    import org.openqa.selenium.htmlunit.HtmlUnitDriver;

    import org.openqa.selenium.WebDriver;

    import org.openqa.selenium.chrome.ChromeDriver; 

    public class headlessBrowserDemo {

     public static void main(String[] args) {        

            System.setProperty("webdriver.chrome.driver","C:\\Users\\chromedriver.exe");

    ChromeOptions options = new ChromeOptions();

    options.setHeadless(true);

    WebDriver driver=new ChromeDriver(options);        

            driver.get("https://google.com/"); 

           System.out.println("Title of the page is = " + driver.getTitle());        

        }

    }





Tuesday, February 9, 2021

How to solve Stale Element Reference exception in Selenium Webdriver

What is Stale Element?

Means a Stale element points to any of the GUI Object, which is not present any more.

What is the main Cause?

When an GUI Object was in DOM initially, later point in time during that Object become stale as it might not have present in Document Object Model (DOM).

How to catch stale elements/objects?

Using StaleElementReferenceException. This exception is cuases whenever an element is not present in the DOM, or deleted.

Are there any ways to handle? Yes, below are options to resolve the Stale elements.

1.     Page refresh and verifying again for the same element/object.

2.     Implement using Exception Handling method

3.     Use the point 2 using Iteration/loop statement based on the application behavior

4.     Explicit wait

 

Example for point 1:

       //refresh page

      driver.navigate().refresh();


Example for point 2:

       WebElement staleEle = driver.findElement(By.id("UserName"));
       try{
             staleEle.sendKeys("Selenium");
          }catch(StaleElementReferenceException e){
         staleEle = driver.findElement(By.id("UserName"));
         staleEle.sendKeys("Selenium");
         }


Example for point 3:

       
    for(int i =0;i<=3; i++){
        WebElement staleEle = driver.findElement(By.id("UserName"));
               try{
                     staleEle.sendKeys("Selenium");
                  }catch(StaleElementReferenceException e){
             staleEle = driver.findElement(By.id("UserName"));
             staleEle.sendKeys("Selenium");
         }
}


Example for point 4: 

WebDriverWait wait= new WebDriverWait(driver, 10);

      wait.until(ExpectedConditions.presenceOfElementLocated(By.id("UserName")));