Forum Discussion

sagarkumar97's avatar
sagarkumar97
New Contributor
7 years ago

Speedup Execution needs to be done for hybrid framework. anu suggestions on how it can be done

In my current hybrid framework designed for web testing here is the process flow:

  

A) Excel Sheets to Store Test Case Flow & Test Case Data

B) Function Library:

First and foremost, function library will store the information about what all keywords are available in your framework and how they are mapped to different functions.

 

C)Start Test Script/Driver Script - Used DDT method to read data from excel file

Test Complete test cases are used to just initiate or drives the execution. It will contain the code that

will just call the function library(Keywords). After this, the function library will take charge and execute the test cases.

 

 

  • In my current hybrid framework designed for web testing here is the process flow:

      

    A) Excel Sheets to Store Test Case Flow & Test Case Data

    B) Function Library:

    First and foremost, function library will store the information about what all keywords are available in your framework and how they are mapped to different functions.

     C)Start Test Script/Driver Script - Used DDT method to read data from excel file

    Test Complete test cases are used to just initiate or drives the execution. It will contain the code that

    will just call the function library(Keywords). After this, the function library will take charge and execute the test cases.

    • tristaanogre's avatar
      tristaanogre
      Esteemed Contributor

      You've basically described the general outline of many different framework development structures.  I do something very similar using CSV files (I prefer CSV over Excel because the file format is more portable...but the concept is the same).  

       

      HOWEVER.... without knowing the specifics of the code that you're running with your various drivers and excel file reads, how you're making the decisions for executing keywords, etc...  Really can't give you much directed help.

       

      One thing that I did in my framework about a year ago... I used to drive the keywords with a switch statement (mine was written in JavaScript).  The more keywords I added, the bigger the switch statement got... and I started seeing performance degredation.  So... what I ended up doing is using a data reflection technique where the data that said, "Execute Keyword X" would pass that keyword to a routine that would instantiate a class named "X" and call an "execute" method on that class.  This removed my massive switch statement and sped up my code.  The back end became a bit more involved with needing to use a script extension to instantiate the classes, etc., but it worked out very well.

       

      Now... this is just a suggestion that worked for me... but it may not apply to you.  Again... without more detail, all we can do is guess.

      • sagarkumar97's avatar
        sagarkumar97
        New Contributor

        Thank you for your suggestions.

         

        Need more info regarding here. When you say -"Execute Keyword X" would pass that keyword to a routine that would instantiate a class named "X" and call an "execute" method on that class", where/how exactly you  decide which type of class needs to be instantiated for the given value of X.