cancel
Showing results for 
Search instead for 
Did you mean: 

Run KeywordTest from imported project

SOLVED
Highlighted
Community Hero

Run KeywordTest from imported project

Afternoon folks.  Back after a break with a new question.

Our organisation has a few products, developed by different teams.  Each product has had it's own development and testing.  This means each product has it's own project in TC.  The product I work on has dependencies on quite a few of our other products.  I work on a Web application, but it depends on setup in a Winforms application.  I need my KWTs to work in both, but I don't want to go redo all the work other developers/testers have already done.  How do I call a KWT from a imported project in one of my keyword tests.  I know for scripts, you need to duplicate it in some manner.  Will I have to recreate each test with the associated object mapping and aliases to my project, or is there a way to call the Keyword test from the imported project from a keyword test in mine.  I really would prefer not to have to duplicate the work other's have done and maintain changes on my end each time they modify a KWT on their end


-------------------------------------------------
Standard syntax disclaimers apply
Regards,
1 ACCEPTED SOLUTION

Accepted Solutions
Highlighted
Community Hero

Re: Run KeywordTest from imported project

You know, though, that as soon as you start converting/wrapping/scripting things that now you have something else to maintain that won't update when the original test does.  At that point you might as well just cut and paste it into your project and forget the sharing part.

 

In these cases I used to make a hybrid name mapping.  Create an empty project (to avoid stepping on your live one) and put your name mapping in there.  Merge it with the one from the shared test.  You can delete all the extra sections it adds except for what you need for that test.  Then backup the name mapping in your live test and put the hybrid one in and see if everything still runs.  It should be pretty close.

 

View solution in original post

4 REPLIES 4
Highlighted
Community Hero

Re: Run KeywordTest from imported project

If you are using a Project Suite to hold both your project and the imported one, then you can share tests between the projects without duplicating the code.

https://support.smartbear.com/testcomplete/docs/testing-with/creating/importing.html

 

You can try running them without doing anything else, but depending on the differences in your name mapping, you may need to merge yours with a copy of the one that the other project uses.  Be very careful doing that, backup both name mapping files first in case you want to back it out.

Highlighted
Community Hero

Re: Run KeywordTest from imported project

Thanks @Marsha_R 

 

I don't look forward to that excercise.  What I am aming for at present is to drag in a KWT from a referenced project into a KWT from my own project.  If you work inside your local project, you simply drag your KWT/add operation.  It's at this point where I would like to put in that KWT from the referenced project.  I'm not sure it can be done, but it's worth asking.  Perhaps The KWTs in the referenced project need to be converted to scripts so I can call the scripts from some sort of wrapper at least ?  Or perhaps I could call a KWT from a referenced project using aforementioned wrapper script ?


-------------------------------------------------
Standard syntax disclaimers apply
Regards,
Highlighted
Community Hero

Re: Run KeywordTest from imported project

You know, though, that as soon as you start converting/wrapping/scripting things that now you have something else to maintain that won't update when the original test does.  At that point you might as well just cut and paste it into your project and forget the sharing part.

 

In these cases I used to make a hybrid name mapping.  Create an empty project (to avoid stepping on your live one) and put your name mapping in there.  Merge it with the one from the shared test.  You can delete all the extra sections it adds except for what you need for that test.  Then backup the name mapping in your live test and put the hybrid one in and see if everything still runs.  It should be pretty close.

 

View solution in original post

Highlighted
Community Hero

Re: Run KeywordTest from imported project

Thanks, sounds like the most realistic approach


-------------------------------------------------
Standard syntax disclaimers apply
Regards,
New Here?
Join us and watch the welcome video:
Announcements
Join TechCorner Challenge!
Want a fun and easy way to learn TestComplete? Try solving weekly TechCorner challenges and get into the Leaderboard!

Challenge Status

How to execute remote test and obtain results via Test Runner REST API

Participate!

Comparing content of HTML table with Excel file data

Participate!

Compare HTML table with Excel file and correct data in the file

Participate!

Retrieve Data from a Web Page

Participate!
Top Kudoed Authors