Hello!
It is possible, however, I guess it isn't a good practice.
Checkout this article: TestItems Object
Here is the link's example:
function Test()
{
var i, TestItems, Count;
// Obtains the collection of project test items
TestItems = Project.TestItems;
// Defines the total number of test items in the project
Count = TestItems.ItemCount;
// Iterates through the project’s test items
for (i = 0; i < Count; i++)
ProcessTestItem(TestItems.TestItem(i));
}
function ProcessTestItem(ATestItem)
{
// Posts the test item name
Log.AppendFolder(ATestItem.Name);
// If the test item contains child items, iterates through them
for (var i = 0; i < ATestItem.ItemCount; i++)
ProcessTestItem(ATestItem.TestItem(i));
Log.PopLogFolder();
}
I prefer to call USEUNIT on a script, specify the name of the script file from where I want to inherit the functions for. And call all in one script file.
Like this:
//USEUNIT BD_UTIL
function test()
{
// BD_UTIL's function
connectar();
}
or like this:
function test()
{
// BD_UTIL's function
BD_UTIL.connect();
}
But when everything is ready, I use the Project TestItems normally.
Hope it helps.