Designing Hybrid Framework in Automation (Part-2) – User friendly Tech help

We have already discussed the implementation part of our Hybrid Framework(Part 1),Now we are going to focus on the the new enhancements that we have introduced while converting our keyword driven framework to hybrid framework.

n

New Capabilities:-
n   1. Data drive the test (Parameterization)meaning running the same test case with varying set of data.

nFor this we implemented the concept of HLookup in Excel
nMost crucial factor is taking our test data from from “Data” sheet of Excel.
nn

Example: – Incase we wont to Launch “chrome” browser, in the “Value column” i.e. F3 cell of the sheet(Keyword) we would fetch data from “Data” sheet of our excel by using the following formula:-

n
nNote:- n

    n

  • we have used cell F2 ( named as STARTROW) to change the test data, like incase we want to run the test case for both browsers(IE and Chrome) we would change its value to 2, else we can mark it as 3 for running our test case only on chrome browser.
  • n

  • Further we have created Name Manager (of Excel) to set the range of “DATASHEET” .
  • n

n

          2.Error handling with user having flexibility to take screenshots incase of errors

n

In the properties of test case(open test in UFT to set Properties), user can set the value NO or Yes based on the preference whether screenshots are required or not.

nPath: – Screenshot are saved in the word document at following location
nn

Note: – We have placed the corresponding code in “Word” library of the test case.
n
n        3.Email options to send run status mail after execution

n

We have created a basic template structure of email to inform stakeholders for the run results (Please enhance this feature as per your requirements)

n

Code: – Email library of the test case contains the code

n

Note: – We have used outlook object for this purpose
n

n

Before using this feature please change the To and CC email id’s inside “fn_StopTest” (inside FrameworkRun library).

nn

        4.  Code optimization with driver scripts just contains the call to triggering function

n

          5.Better structuring of code into function libraries like Word,Email,Excel

nThis part is just extension of above point(4) .
n
nWe have segregated our code into logical divisions by creating appropriate libraries.
nn

       6. Improvement in error reporting through UFT result viewer.

n

Our result viewer contains improvement in reporting.

n

Note: – We thought of creating Executionlogs for the run rather than using result viewer of UFT by using notepad file or any text editor ( we might be working on this in future.)
n
nUFT Tutorials
nLearn Selenium

Was this article helpful?
YesNo

Similar Posts