Forum Discussion
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.
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.
- sagarkumar977 years agoNew 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.
- tristaanogre7 years agoEsteemed Contributor
I created a Script Extension that, given a class name, instantiates an object with that class. There are some requirements that go along with that concerning how the class code is created, required methods and properties on the class, etc.,
Check out the readme at https://bitbucket.org/tristaanogre/tabledrivenframework for how I did it.- shankar_r7 years agoCommunity Hero
Another article about the same.
I have created a post some time back on this topic, you checkout that.
Also, there is a article on the saem.
https://smartbear.com/learn/automated-testing/introduction-to-data-driven-testing/
https://support.smartbear.com/testcomplete/docs/testing-with/data-driven/index.html
Related Content
- 9 years ago
- 4 years ago
- 11 years ago
- 11 years ago
Recent Discussions
- 2 days ago