Deploy Slave Project
Hi,
i've a distributed project integrated with TFS in order to execute test by Release (TestComplete v.14.71.275.7 x64).
Project is structured with a Master project and 2 Slave projects that has to work in the related host machine, each of them has a NetworkSuite item with property Deploy : Automatic (other properties available in the General panel are empty).
Test starts properly in debug mode by running network suite from ProjectSuite->Master, while from Release it returns the following error:
Cannot load the remote project. The project file XXXXXXXXXX.mds was not found on the remote computer. Please copy it manually there or modify the network suite's properties to deploy the project to the remote computer automatically
It seems the projects slave aren't copied to host machines once the test is triggered...
Any suggestion about?
I've seen there is following method to execute copy from code:
NetworkSuite.Hosts.ItemByName([HOST_NAME]).CopyProjectToSlave();
Is it necessary?
Thanks
Hi enriquebravo
Not sure if you have a dom object and/or node list, which has functions to get a node attribute, so I will assume all you have is a string to parse out the value.
This is a generic function that you can supply the desired string, two conditions that delineate/outline your search text, where to start looking on the desired string, and whether to consider case for the start and end strings. Please note that this does not provide any error trapping.
function stringParser(stringToSearch, startSearchString, endSearchString, startPosition, caseSensitive) { if (startPosition == null) startPosition = 0; if (caseSensitive == null) caseSensitive = false; var indexStartPosition = aqString.Find(stringToSearch, startSearchString, startPosition, false) + startSearchString.length; var indexEndPosition = aqString.Find(stringToSearch, endSearchString, indexStartPosition, false); return aqString.SubString(stringToSearch, indexStartPosition, indexEndPosition indexStartPosition); }
In your case you would supply the xPath as the stringToSearch, something like sectionContent- or Conent- and “]/ to delineate the number for the startSearchString and endSearchString. You can specify where to start on the string, zero is fine, and if you want it to be case sensitive (true) or not (false).
function test() { var xPath = "//*[@id=\"sectionContent-967\"]/div/slot/records-record-layout-row[5]/slot/records-record-layout-item[1]/div/div/div[2]"; var value = stringParser(xPath, "sectionContent-", "\"]/", 0, false); // returns 967 }
I hope this helps.
Regards