Forum Discussion
Do you have the JScript code pre-conversion that you can share? It is interesting that, if you really didn't change that much, that the performance would take that much of a hit.
I noticed you're using the Scripting.FileSystemObject. Not that this is the cause, but you can achieve much of the same functionality using the objects built into TestComplete of aqFile and aqFileSystem. Rather than using external objects, you might get better performance using something "native" to TC.
I have tried using both methods - aqFile and the above. The performance is atrocious.
Here is our Jscript code -
var pathToTXT = ProjectSuite.Variables.FCINSTALLPATH+"\\Setup\\__createdb.log";
var logMethod = "Warning";
if(!aqFile.Exists(pathToTXT))
{
Log.Error(pathToTXT+" does not exist.");
return;
}
else
var openTXT = aqFile.OpenTextFile(pathToTXT, aqFile.faReadWrite, aqFile.ctANSI); //open createdb text file
var lineToBeRead;
var compare;
var secureRole;
var counter = 0;
openTXT.Cursor = 0;
while(!openTXT.IsEndOfFile())
{
lineToBeRead = openTXT.ReadLine();
compare = lineToBeRead.search("ORA-");
if(compare > -1)
{
secureRole = lineToBeRead.search("28405");
if(secureRole == -1) //This will ignore thie specific errror
{
if(logMethod == "Errors" || logMethod == "errors")
Log.Error("Line " + counter +": " + lineToBeRead);
if(logMethod == "Warnings" || logMethod == "warnings")
Log.Warning("Line " + counter +": " + lineToBeRead);
}
else
{
Log.Message("Line " + counter +": " + lineToBeRead);
}
}
counter++;
}
openTXT.Close();
- tristaanogre8 years agoEsteemed Contributor
Hrm.... yep, looks pretty much like the same code so, technically speaking, there's nothing code-wise that would account for the performance hit.
This seems to be a problem with the TC engine. Just to check, there has been no other environment changes between the two versions of the code? I'm assuming that the conversion is due to you changing from TC 11 to TC 12. Are you running on the same machine as you were before? There are no other processes running on the machine that could impact JavaScript performance?
If all this stuff checks out... best thing I can suggest is to open a support ticket with the SmartBear folks.- Blake_Bryce8 years agoOccasional Contributor
I did open a ticket - they got back to me saying they were able to replicate the issue and forwarded it to dev.
- tristaanogre8 years agoEsteemed Contributor
Yep... that means that someone things it's a legit problem and needs to confer with the developers to determine potential solutions, either as a patch or in some sort of suggestion for different code.
In my experience, usually you'll get something back by the next business day. At least they acknowledge that you've run across something problematic and that it needs some sort of corrective action.
Related Content
Recent Discussions
- 20 hours agodhundley