Forum Discussion

AshMan's avatar
AshMan
New Contributor
8 years ago

Performance issues after converting JScript project to JavaScript in TC 12

Hello All,

 

We run a Delphi desktop application and use TestComplete 12 for a series of automated tests using JScript scripts (no keyword tests). I have converted the JScript project to JavaScript and am experiencing (serious) performance issues after the conversion.

 

Surprisingly, I only needed to change a single line of code for the project to run in JavaScript (so far!):

from:    Project.Variables.VariableByName(pStrVariableName) = pObjValue;
to:         Project.Variables.$set("VariableByName", pStrVariableName, pObjValue);

 

The tests in the JavaScript project run fine with no errors but they take at least twice as long to run when compared to the exact ones in JScript. Is there any project setting I need to change?

 

The performance issue appears to be when comparing (many) fields on the TestedApp, actual value vs expected value. 

I changed  aqObject.CompareProperty(pStrExpectedVal, cmpEqual, pStrActualVal, false, lmNone) to equal(pStrExpectedVal,pStrActualVal) but this has not made any difference to the performance in JavaScript.

 

To give an idea of the speed degradation, comparing 33 fields (among some 'if Object.visible' statements and 2 x 2 second delays waiting for forms to load) took about 5 seconds in JScript but about 9 seconds in JavaScript.

 

Has anybody else experienced any speed issues with converted JavaScript projects in TestComplete 12?

 

Any help would be greatly appreciated!!!

 

7 Replies

  • Blake_Bryce's avatar
    Blake_Bryce
    Occasional Contributor

    I am seeing the same issue as well. I am in the process of converting our codebase to JavaScript but our smoketest performance has increased by 20min! I have not been able to find a solution - have you?

    • AshMan's avatar
      AshMan
      New Contributor

      Hey Blake,

       

      I raised a support case with the the Customer Care Team for this issue. After looking at my project, they acknowledged/confirmed the speed degradation in the converted JavaScript project and advised that there is no solution for it, for now. They may look into it in future releases.

       

      Some areas in JavaScript execute faster than JScript but overall, the JavaScript project works much slower for me. So my project remains in JScript!

       

       

      • Blake_Bryce's avatar
        Blake_Bryce
        Occasional Contributor

        Good to know. We made the decision yesterday afternoon not to convert to JavaScript. 

  • mburr's avatar
    mburr
    Occasional Contributor

    Definately slower. I sent in a report to SmartBear about this on 9/15/2016. Still no improvements in the latest version 12. Here is an excerpt of results from the report. 

     

     

    AVG time to iterate through 16 XML elements:  Jscript 18.6ms,  JavaScript 71.6ms,  Python 77.9ms

    AVG time to make 16 log messages: Jscript 48.4ms, JavaScript  354.2ms, Python 76.5ms

    AVG time per log: Jscript 3ms, JavaScript 22.1ms, Python 4.8ms

    AVG time to read the XML file into an object: Jscript ~8ms, JavaScript 28ms, Python 43.8ms

     

    I also noticed issues with using TestComplete UserForms with javascript. In addition, Sys.OleObject used to create a DOM object seems to have a lower limit of the number of child elements that can be read as compared to using ActiveXObject with jscript.

     

    We would like to use javascript as it follows a newer ECMAscript standard but will need to stay with jscript until SmartBear makes some improvements in using javascript.