seamless e2e automation on interdependent...

of 12 /12
Seamless E2E Automation on Interdependent Systems (An Automation approach to accomplish E2E testing in a time bound format) Pranoy Sanyal (Author) Software Engineer Testing Sheetal Sivadas (Co- Author) Software Engineer Testing Pratap Mysore Narasimha Raju (Co- Author) Test Automation Architect

Author: truongkhuong

Post on 27-Aug-2018

225 views

Category:

Documents


0 download

Embed Size (px)

TRANSCRIPT

  • Seamless E2E Automation on Interdependent

    Systems (An Automation approach to accomplish E2E testing in a time bound format)

    Pranoy Sanyal (Author) Software Engineer Testing Sheetal Sivadas (Co- Author)

    Software Engineer Testing Pratap Mysore Narasimha Raju

    (Co- Author)

    Test Automation Architect

  • Abstract

    At this time most of the organizations have adopted to Agile/DevOps and

    the biggest challenge for QA team is to complete various types of testing

    in a time bound approach. In a time where E2E manual testing itself is a

    challenge due to time differences across globe, data & team dependencies

    we have gone a step ahead and come up with an E2E automation strategy

    for Inter Dependent systems.

    In system and regression test automation, we always have an alternate of

    using mock up test data which makes it comparatively easier than

    E2E/IST scenarios that depends on real time test data.

    Subsequently, our article Seamless E2E Automation on Interdependent Systems talks about an approach of automating E2E testing that we have implemented to save time, effort and increase the

    efficiency and productivity using UFT Tool. Here even though we dont have any hold on the data flow between upstream/downstream systems,

    we are able to extract the runtime test data and continue with E2E testing.

    This approach can be implemented for systems where data storage is done

    through structural database.

    This article describes the automation process in detail and the

    beneficiriaries are all who perform testing in a simulation environment.

  • Introduction

    With an evaluation of Software industry, we have come a long way in the

    software development process. As a result, now most organizations have

    adopted new development methodology such as Agile/DevOps which

    demands for a time bound approach in order to deliver the quality product

    within specific time frame, the responsibility of a Test Engineer is also

    increased in terms of ensuring the efficiency and quality of deliverables by

    validating the requirements while perform various testing in a very short

    period of time. In order to keep up the momentum QA teams moved

    forward from manual approach to an automation approach.

    Automation approach is easier for Functional Testing (System and

    Regression) whereas, E2E/Inter System Testing is a complex task

    because it deals with the run time data, it also have dependencies such as

    readiness of applications involved, availability of SMEs etc., thus to

    overcome these dependencies we came up with an approach of Seamless E2E Automation on Interdependent Systems.

    In this approach we used UFT to launch our application and get going

    with the E2E test scenarios. It also has database connectivity for fetching

    the run time data and verifies it in GUI of applications under test.

    Alongside it will trigger an Email to the respective application SMEs with

    the validation data for verification purpose.

    There are different types of database available in the market which we can

    adopt to store the data. Among that our organization uses the structured

    oracle database.

  • E2E Automation Plan

    In this approach we have used the Data Driven Framework with a BDD

    approach which will pull the test data from the Feature File, using the

    Function library.

    This framework basically consists of a Driver Script which will read the

    scenarios from the Feature File and execute the corresponding function

    from the Function Library. The execution result will be stored in our

    system Temp folder as QTPrintlog.txt.

  • Architecture of E2E Automation

    Here in the above architecture we are invoking the driver script using UFT

    which in turn call the Feature file and function library in order to launch

    the application and database, later as we move ahead based on the

    features/scenarios the comparison between Runtime test data and

    Expected values will be done. Once the data matches with each other we

    will retrieve the run time data and trigger mails to all users with the same

    result.

  • Connecting Database using BDD approach

    The feature file needs to be stored with .feature extension and function

    library need to be stored as .vbs. Feature file will be written in Gherkin

    language i.e. Given, When, Then format, sample feature file is as shown

    in the screen shot below.

    The driver script will read the feature file line by line and match the same

    with the function library. We need to make sure that for each line there

    should be one function added, the Given, When, Then need to be added as

    comment before the function starts. Here is an example to put more light

    on it. Ex: to launch the application

    '[Given the user is on app login dialog]

    Function GivenUserIsOnappLoginDialog()

    'function to verify user is in login dialog

    End Function

    '[When user enter password "Password" click on OK button]

    Function WhenuserenterpasswordclickonOKbutton(pwd)

    'user enters user name and password for login

    End Function

    '[Then User should be in APP Application Page]

    Function ThenUsershouldbeinApplicationPage()

    'function to verify user logged in the application

    End Function

  • Sample Function Library Screen shot is as shown below

    The driver script reads the Scenario from feature file to connect with

    Database is as mentioned below

    Scenario: User wants to validate the data from DB

    Given the user logged in DB

    When execute query for expected outcome in DB

    Then user able to fetch data successfully

    Associated Functions

  • After executing sample query we can get the run time data as shown in the

    screen shot for better understanding

    select request_id ,wfms_status from OTTO.dispatch_data_xref_hist where request_id in ( select request_id

    from (select request_id , row_number() over (order by acknowledge_time desc) as seqnum from OTTO.dispatch_data_xref_hist

    ) where seqnum = 1);

    Using above query we are retrieving runtime data based on unique

    keyword.

    First half of the query will sort the run time data to get the recent job performed as a unique Key, which will be useful for later validations.

    In second half, using this unique Key we retrieve the run time data and also save for cross validation in application UI.

    The Script will inject SQL Query continuously, to monitor any change in the run time test data, when changes occur it will notify the

    SMEs.

  • Cross validation in Application GUI

    Once run time data is fetched from the database script will trigger mails to

    all SMEs of the applications under test, also it will cross validate it in our

    application GUI.

    Later, after execution completes run result (Pass/Fail) stored in our system

    temp folder as QTPrintlog.txt as shown in screen shot below, with

    Pass/Fail/Pending status

  • Conclusion

    The major role and responsibility of QA team is to certify the

    productivity and efficiency of any product by performing various

    test methodologies in a time bound approach, among which Inter

    System testing is a prime key to ensure the compatibility of any

    application during the data flow between interdependent systems.

    Manual E2E testing approach itself depends on many factors like

    time differences across globe, data & team dependencies which

    force the QA team to perform the Risk based Testing.

    Seamless E2E Automation on Interdependent Systems is a vision to automate the Inter System Testing and Flow through

    Testing while we use structured data storage, which will help us to

    monitor continuously the dynamic run time data, also notify the

    users about the progress.

    Ultimately it saves our time, manual effort and increases the

    efficiency and productivity, by continuous validations of run time

    data with the expected one.

  • Reference

    http://www.testnbug.com/

    https://unmesh.me/2012/10/18/

    https://stackoverflow.com/questions/15091849/how-to-use-oracle-order-by-and-rownum-correctly

    http://www.testnbug.com/https://unmesh.me/2012/10/18/https://stackoverflow.com/questions/15091849/how-to-use-oracle-order-by-and-rownum-correctlyhttps://stackoverflow.com/questions/15091849/how-to-use-oracle-order-by-and-rownum-correctly

  • About the Author:

    Pranoy Sanyal is a proficient Software Test Engineer at CenturyLink

    who works on manual and automation testing. He supports the QA team

    by providing promising solutions. He has work experience of 4 years in

    Testing Domain and also good knowledge on Automation tool (UFT).

    Being working with a legacy product of CenturyLink

    As QA Teams facing many challenges with Inter System Testing or Flow

    through Testing, he came up with an approach as published in this paper.

    About the Co-Authors:

    Pratap Mysore Narasimha Raju working at CenturyLink in the role of

    Test Automation Architect and handling a team of 15 members.

    He is an avant-garde, pioneering and committed test Project lead. He has

    got wide range of experience in automation tools from open source to

    commercial, web based, desktop and API and backend applications. He

    has a strong executive leadership, negotiating and communicating skills

    and is capable of providing authoritative guidance and advice to his

    fellow-mates. Has been following and participating in STC since 2010.

    Sheetal Sivadas, an ardent Software Test Engineer at CenturyLink

    works on manual and Automation testing. Have work experience of 1 year

    in the agile environment. She is interested in learning emerging concepts

    in testing and is working with a legacy product of CenturyLink.