cancel
Showing results for 
Search instead for 
Did you mean: 

Using same Test in multiple Projects within a TestSuite

SOLVED
Highlighted
Frequent Contributor

Using same Test in multiple Projects within a TestSuite

I have the problem, that we have a Project Suite now with 2 Projects Hybridmanager and Datamanager and the 2 projects are only different in a couple of tests.

 

The UI itself is the same except for a few changes therefore I would need a couple of my keyword tests for both Projects and a couple of keyword tests specific for the specific project.

 

Is there a way to make keyword tests global, so I dont have to manually go through the process of getting the Namemapping for both projects even tho they are identically and instead just use the test in both projects? Copy Paste doesnt work either, sadly (or I dont know how)

 

best regards

1 ACCEPTED SOLUTION

Accepted Solutions
Highlighted
Contributor

Re: Using same Test in multiple Projects within a TestSuite

Please refer "Adding an existing keyword test" in Creating and Recording Keyword Tests. Hope that is what you are looking for.

View solution in original post

5 REPLIES 5
Highlighted
Contributor

Re: Using same Test in multiple Projects within a TestSuite

Please refer "Adding an existing keyword test" in Creating and Recording Keyword Tests. Hope that is what you are looking for.

View solution in original post

Highlighted
Community Hero

Re: Using same Test in multiple Projects within a TestSuite

Additionally, you can do the same with NameMapping... you can add an existing NameMapping file to a project so that you can use it in both.


Robert Martin
[Hall of Fame]
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
Vegas Thrill Rider
Extensions available
Highlighted
Frequent Contributor

Re: Using same Test in multiple Projects within a TestSuite

When adding the existing Namemapping am I able to manipulate the namemapping - as for the Hybridmanager there are a few things different than with the datamanager, even tho the test is the same, 1 or 2 items are different and when I change it it changes it in both namemappings.

 

Same for tests ... is there something like a hardcopy, which does not break my existing test when I add / remove something?

Highlighted
Community Hero

Re: Using same Test in multiple Projects within a TestSuite

Your request was to make test cases and namemapping global for both projects.  That means that they are shared between the two projects.  If you want to avoid having changes in one impact the other, then you don't want global test cases and name mapping, you want each project to have their own.

 

To be truthful, the BEST practice is the former... it's better to not have duplicated code/namemapping if you can avoid it because if something DOES change, with shared files, you only need to change it once.  What you're going to need to do is make your test cases and, perhaps, your NameMapping conditional (there is a conditional option in NameMapping) so that, depending upon what project you're running from, the tests are "smart" enough to account for it.


Robert Martin
[Hall of Fame]
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
Vegas Thrill Rider
Extensions available
Highlighted
Contributor

Re: Using same Test in multiple Projects within a TestSuite

You can create a new blank keyword test in the second project and copy and paste the required (or all) keyword test steps from an existing test in the first project. But as @tristaanogre said, it can become a maintenance nightmare pretty quicky.

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

Changing options from outside of TestComplete

Participate!

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!
Top Kudoed Authors