cancel
Showing results for 
Search instead for 
Did you mean: 

Can we add a test items into the project throgh script

Frequent Contributor

Can we add a test items into the project throgh script

Hi All,

 

I would like to know if there is any way where we can add test items into the project through script?

 

TIA.

 

Thanks,

Karthik K R

4 REPLIES 4
Community Hero

Re: Can we add a test items into the project throgh script

Hi,

 

Generally speaking, this is not possible.

If you really need it, you can create a stand-alone script that will process project .mds file and modify it. Then start TestComplete and trigger tests run. The above project file modification is absolutely on your own risk and, most probably, it will work for the given version of TestComplete only and will require modification for the next version as the internal structure of the project service files is not documented and is the subject to change pretty often.

Regards,
Alex
[Community Expert Group]
____
[Community Expert Group] members 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. Postings made by [Community Expert Group] members
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.
[Community Expert Group] signature is used with permission by SmartBear Software.
http://smartbear.com/forums/f83/t86934/community-experts/
================================
Frequent Contributor

Re: Can we add a test items into the project throgh script

Hi Alex.

 

Thanks for your suggestion. 

 

I really feel it will required lot of effort to do it work for adding test items into the project through modification of project.mds file. And I believe that is not a reliable solution as well.

 

It would be great if SmartBear itself is providing this option for addding test items through script. Can make it as a feature request.

 

Thanks,

Karthik K R

Community Hero

Re: Can we add a test items into the project throgh script

Agree with @AlexKaras... yes, you CAN do it... but I would not recommend it.  TestItems are what are executed by the test and are, in a sense, "compiled" into the test run when you click the "Run" button.  So, there's no built in way in TestComplete to modify or update the TestItems during the course of a test run.

 

If you have need of a more dynamic way of determining script/test execution, I would suggest you move away from using TestItems to determine test execution and start building your own custom framework structure which contains the logical decisions to determine what tests get run and when.


Robert Martin
[Community Expert Group]
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
Extensions available
Community Hero

Re: Can we add a test items into the project throgh script

@krkarthik_info Tell us what you want to accomplish by adding test items through a script.  How is this helpful to your testing?  Maybe someone here has another way to do the same thing.

New Here?
Join us and watch the welcome video:
Watch the new Interview
Top Kudoed Authors