cancel
Showing results for 
Search instead for 
Did you mean: 

Using Project Scripts and Variables in other projects

SOLVED
Highlighted
Occasional Contributor

Using Project Scripts and Variables in other projects

Hi All

I've been tryong to read the Doc and they ate not making any sence...

I'm trying to implement TestRail into my tests...

 

So I have a Common Project Suite that has a TestRailProject with 2 Python scripts.

These Python scripts make use of Project declared Variables.

 

I now want to make use of this TestRail script (inc. varibles) in a different Project Suite.

How do I do this. ??

I was hoping to at to the Keywords UI 'Run Script Routine' and 'Set Variable Value' for my TestRail script and Varibles.

 

I have found that I can import the scripts per Project... but I have to do that for ALL Projects.... for 8 or so projects... errmmm..

These Imported scripts loose the referemnce to the original project Variable.... errrm...

 

So looking for recommended and workable ways of using out of project scripts & vars

 

Thanks in advance

( ?? does the beta 14.4 have improvements in this area ?? )

 

 

1 ACCEPTED SOLUTION

Accepted Solutions
Highlighted
Community Hero

Re: Using Project Scripts and Variables in other projects

https://support.smartbear.com/testcomplete/docs/testing-with/variables/collections/index.html

 

Variable hierarchy is this:

 

Project Suite > Project > Test

 

If you want to share a variable between many projects, then it needs to be a Project Suite variable.  If you want to share a variable between many tests within a project, then it needs to be a Project variable.

View solution in original post

5 REPLIES 5
Highlighted
Community Hero

Re: Using Project Scripts and Variables in other projects

https://support.smartbear.com/testcomplete/docs/testing-with/variables/collections/index.html

 

Variable hierarchy is this:

 

Project Suite > Project > Test

 

If you want to share a variable between many projects, then it needs to be a Project Suite variable.  If you want to share a variable between many tests within a project, then it needs to be a Project variable.

View solution in original post

Highlighted
Occasional Contributor

Re: Using Project Scripts and Variables in other projects

But I have a Project Suit with Common scripts.
I want to use those scripts in a different Project suite

 

I can import project into a suite.... and see those Varibles in that project..
However ....

1)  I can't use those Project Var in another Project... ie Set Var

2)  I can't use other project Scripts (python) in another Project... ie. Run Script Routine

 

What am I missing ??

 

Highlighted
Community Hero

Re: Using Project Scripts and Variables in other projects

As I said, if you want to share variables between two Projects, then the variables must be Project Suite variables.  In the screenshot here, your variables would need to be declared in Sandbox for both TestProject1 and TestProject2 to have access.

ProjectVariables.GIF

 

Community Hero

Re: Using Project Scripts and Variables in other projects

For sharing scripts and other items, refer to this:

https://support.smartbear.com/testcomplete/docs/working-with/managing-projects/project-items/sharing...

 

You may want to look into script extensions as is mentioned in the article.

Highlighted
Community Manager

Re: Using Project Scripts and Variables in other projects

Hi @ianrobinson , did you manage to resolve the issue? Please share Smiley Happy

 

Marsha, thank you for advice!



Sonya Mihaljova
Community and Education Specialist

 Join SmartBear Connect next April in Boston to meet with software development, API and testing experts from around the world! Get your ticket today!