Maximizing TestComplete to build efficient scripts
We're starting to increase the number of people handling TestComplete scripts in our company and I just wanted to read/know about how people develop their cases in TestComplete. I came across this interesting post (https://community.smartbear.com/t5/TestComplete-General-Discussions/Non-standard-ways-of-using-TestComplete-for-building-test-cases/m-p/133021#M24816) from long ago and would like to have more insights/suggestions from what people do since I'm pretty sure the userbase of the tool has increased over the years.
As a background, we are currently using a data driven approach to testing, one test case scenario is one row in a data loop. Basically an actual test case accepts one set of test data and does actions based on those. So far it's been working great for us. We build small keyword tests that does one specific job similar to a function described in the post I have indicated above.
It makes it easier to make new scenarios/test cases for new features that comes in; drag and drop keyword tests that have been developed before, make new ones to do actions/checkpoints for new feature and voila a new regression case for the new feature is born. Before I hand this off and share this practice to more people in the team I have a few questions which I've had difficulty answering by myself and wanted to get people's opinions. So here they are:
1. Is it more efficient to make smaller keyword tests (as granular as possible, i.e one to fill up the subject field of an email reply) rather than making midsize keyword tests (i.e. one keyword test that fills up subject, body, signature, recipeints of an email reply)? This question leads to a long term dilemma I've been having with our project, is it better to have 10 KWTs each one doing small parts with no overlap of scope or is it better to have 1 KWTs doing a big chunk of work?
2. Is scripting more efficient than using KWTs? I've read some posts/approaches where they use KWTs to handle data, leveraging the data driven loops and data tables one can inject inside a KWT but the building blocks of test cases are all scripts, basically a KWT calling scripts per step. Right now we're leaning heavily on making KWTs the building blocks but having someone with scripting experience make complement scripts that "empowers" the KWTs.
3. Is there a proper way of making test data tables? We've been slowly moving away from 100 column tables where each of those columns are used to have both checkpoint data and configuration data needed to determine a scenario. The way we've been doing it the past few months was to split the big data table to smaller ones having specifc purpose for each (i.e. one for user info/permissions, one for languages available, etc.) and using "keys" from the main table to look for the necessary content in the smaller tables.
If there are other posts that have discussed this, I would be interested in knowing about them. Thanks!
Here's my take on that:
Selenium, while good, you have to do EVERYTHING in code... I mean, EVERYTHING. Object identification, building classes, wrapping things for a unit test to include in some testing tool, etc. EVERYTHING.
ObjectIdentifciation -> NameMapping
Classes -> Code units/KWT
Unit tests -> Test items, projects, etc
Reports/Logs -> TestComplete logging
A lot of the stuff you have to do manually in Selenium, TestComplete has built in.
Other advantage: Selenium is web only. So, if you need to mix your tests between Desktop, API, Mobile, and Web, you need multiple tools. TestComplete allows you to do ALL of them in one tool...or incorporate a few other tools into that one tool. That Web Store that I mentioned above? That was half of the pipeline of a ticket transaction. There were reports, fulfillment, access control scanning, etc., done by other application platforms including desktop, kiosk, and mobile. So, TestComplete allowed an all-in-one tool.
Finally... Selenium is open source... which means that if you need support... well, you can hope you find the right guy in the right forum who knows what they're doing. TestComplete has this space and their own dedicated customer service staff.
Again.. my opinion... others may vary but hopefully this helps in your decision processing.