Test case best practises
Test case best practises
I'm still fairly new to using TestComplete and I have a question. I have searched to find an answer and honestly maybe my Google skills are poor of late but I couldn't find a definitive answer.
I have been using our trial of TestComplete while we have been organising purchasing it and I have created multiple sections in a project each to hook into various different systems we use.
My question is around writing and executing a test case. I have seen 2 obvious ways of doing this, 1 is from the overall suite level where you can add a step, and then child steps to that etc etc and also to create another script file which has all the test cases inside as functions, each calling other functions step by step.
Is there any typical or recommended way or formatting all of the steps of a test case using this software?
My personal preference corresponds to the first option mentioned by you: when it is possible, I try to organize tests via Test Items and their parent-child hierarchy. ( @prashantmohan: there is still a room for improvement of this useful functionality to make it even more handy and useful.)
Main reasons for this:
-- With the properly crafted test code, it is possible to manually put the tested application into required state and then start execution of the relevant test item(s) without the necessity to modify source code (comment out functions that must be skipped);
-- If some test step is implemented as a function with parameters (even with all default ones), it is not possible to start such function from code editor window. But it is possible to create a test item that calls this function and start it from the Test Items window;
-- It is possible to start execution of some subtree of test items either from the command line or via COM. Again, without the necessity to modify test code sources;
-- It is possible to have personalized state of Test Items if test project is opened in the Shared Mode (https://support.smartbear.com/testcomplete/docs/working-with/teamwork/sharing-projects.html) (@prashantmohan: This functionality seems to be broken in the last versions of TestComplete but I really believe that it will be restored.)
/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.