Ask a Question

Can anyone please help me with keyword driven framework using Python in TC

Rajesh2
Contributor

Can anyone please help me with keyword driven framework using Python in TC

Hello Everyone,

 

I am working in a Desktop application project using Python!!

 

1. Could anyone please help me with keyword driven framework using Python in TC?

2. I need to build a framework using keywords present in excel sheet. Should i use switch case or if else? 

3. I need to use keyword driven framework for navigating from panels/windows. So how to go about it? Please explain me with an example like Navigating from Gmail-Login to Inbox or Inbox to Sent items.

 

Please explain with example!!

 

Thanks and Regards,

3 REPLIES 3
tristaanogre
Esteemed Contributor

What you are asking is a lot more than just a few posts on a web forum.  Building a framework that uses keywords and data passed in from an Excel spreadsheet and making it robust enough to be able to navigate a complex application takes work.

 

Couple of tips for you from my experience, though:

 

1) Try to find a balance between granularity and broad test methods.  For example, you could go the extreme of having keywords like "CLICKBUTTON" or "ENTERTEXT" or "SELECTDROPDOWN" where you would just build a keyword test on general controls.  But that would take a lot of effort in making sure that you do control detection, etc.  But going to broad as  "RUNTESTCASE2" is too broad and doesn't allow for flexibility.  You should find some place in between that works for your particular skill set and the skills of the rest of your team

2) DDT is your friend.  Since you want to use Excel, read the articles on DDT.ExcelDriver that are in the help documentation.

3) Switch statements are going to be your better bet... but the more keywords you have, the bigger the switch statement.  It could get VERY large.  That's why I ended up using something more like data reflection.

 


Robert Martin
[Hall of Fame]
Please consider giving a Kudo if I write good stuff
----

Why automate?  I do automated testing because there's only so much a human being can do and remain healthy.  Sleep is a requirement.  So, while people sleep, automation that I create does what I've described above in order to make sure that nothing gets past the final defense of the testing group.
I love good food, good books, good friends, and good fun.

Mysterious Gremlin Master
Vegas Thrill Rider
Extensions available
shankar_r
Community Hero

If you start building some basic level of framework such as,

 

1. Setup test data sheet path and configure variables.

2. Do a Loop using DDT in-order to use each row data to validate your AUT.

3. Create bunch of Common of functions which will help you to do the UI actions.

 

Once you start doing some basic level of work then you automatically find a way to enhance your Framework.

 

I'm having good idea on Data-Driven framework but this is all i got Keyword Driven.


Thanks
Shankar R

LinkedIn | CG-VAK Software | Bitbucket | shankarr.75@gmail.com

“You must expect great things from you, before you can do them”

Extension Available

@Rajesh2you are lucky. you can refer this post https://community.smartbear.com/t5/TestComplete-General-Discussions/Framework-example-from-TestCompl...

 

This post having all you wanted.


Thanks
Shankar R

LinkedIn | CG-VAK Software | Bitbucket | shankarr.75@gmail.com

“You must expect great things from you, before you can do them”

Extension Available

cancel
Showing results for 
Search instead for 
Did you mean: