NisHera
7 years agoValued 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!
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!
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.
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.