Ask a Question

design patterns with TC

NisHera
Valued Contributor

design patterns with TC

Hi,

Is anybody out there using design patterns with TC to develop framework? (other than POM)

if so I would like to know what you used and pros, cons and practical challenges.

thanks!

5 REPLIES 5
Novari-QA
Frequent Contributor

We had to develop our own pattern. If interested I could go into more detail. 

We essentially build it around OOP. Seperating the website or application into objects that is easily understood by the user. For example: we have an object called LoginPage.  This login page has objects such as "username", "Password" and "Login"  Login is a set of actions to achieve the result. Its focus isn't to test, rather than to hold actions the user can user in order to get to the test.

NisHera
Valued Contributor

what you describe is page object pattern/modle or POM. 

POM and advance POM are common in test frameworks.

DDT and object factories are inbuilt in TC.

 

I would like to know how and why if anybody using decorators, strategies iterators etc. 

basically SW engineering principles  and also may be things like BDD.

Hi,

 

DDT and object factories are inbuilt in TC.

TestComplete's Object Browser, optionally, combined with Aliases, represents POM implementation.

 

if anybody using decorators, strategies iterators etc.

I believe that somebody might use them...

My points:

-- TC is just a tool that helps you do your job. I think that it is quite reasonable if you use your tool the way that is convenient for you and for your current activity (and that does not violate safety rules if we talk about industrial tools). And not in the way that others usually use this tool;

-- It is not bad if you are aware about possible ways of how the tool can be used and aware about conveniences and inconveniences of this or that way. With this awareness you can consider if something can be improved in the way of how you use the tool in order to do your current job 'better';

-- You know that 'better' is not an absolute definition and always is a tradeoff and thus your decision on how the tool will be used is based on the thorough pros and cons analysis based on your current situation but not blindly following some recommendation from dozen thick books. Just because this generic recommendation might have disadvantages that matter for your current situation.

 

Regards,
  /Alex [Community Hero]
____
[Community Heroes] are not employed by SmartBear Software but
are just volunteers who have some experience with the tools by SmartBear Software
and a desire to help others. Posts made by [Community Heroes]
may differ from the official policies of SmartBear Software and should be treated
as the own private opinion of their authors and under no circumstances as an
official answer from SmartBear Software.
The [Community Hero] signature is used with permission by SmartBear Software.
https://community.smartbear.com/t5/custom/page/page-id/hall-of-fame
================================
NisHera
Valued Contributor

well, I'm looking for other possibilities, simply looking beyond the tool. 

As you says " aware about possible ways of how the tool can be used".

 

Just proficiency in tool doesn't make you a craftsman.  

tristaanogre
Esteemed Contributor

It certainly is an interesting idea.  I haven't played with any of those design patterns myself.  I might need to make a personal project out of them to see if there's something that I can use.  I, also, would like to hear if others have tried.

 

It does, though, seem to be similar to making a nuclear powered can-opener though.  It would be cool and fun to do some of those fancy patterns in building automated tests... but not sure how much ROI would be spent in using them versus the KISS principle.  


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
cancel
Showing results for 
Search instead for 
Did you mean: