Forum Discussion

AAN's avatar
AAN
Contributor
13 years ago

Can you get performance testing out of Test complete 9?

Just wondering can you set up Performance testing out of TC 8 and 9?



5 Replies

  • AlexKaras's avatar
    AlexKaras
    Icon for Champion Level 2 rankChampion Level 2
    Hi Aneez,



    The answer depends on the requirements of what should be tested and what is needed to be measured.
  • AAN's avatar
    AAN
    Contributor
    Hi Alex,



    Perofrmance testing I want TC to do is to



    a) Time it takes to load forms e.g. logging in to the application and double clicking on a project to open a risk summary can take far too long (is there a way I can measure this).



    b). Going from Risk Summary to Correspondence in the application (time it takes).



    c). Uploading multiple photographs. 



    d). Time it takes to load users / roles in Security.



    I want to be able to measure times and is there a way that I can use TC to do this and to also find any bottlenecks in the performance runs?





    With Kind Regards,

    A.  

  • AlexKaras's avatar
    AlexKaras
    Icon for Champion Level 2 rankChampion Level 2
    Hi Aneez,



    Yes, this is possible with the use of the HISUtils.StopWatch object (http://support.smartbear.com/viewarticle/27989/).

    The code is like this:

    StopWatchObj :=
    HISUtils.StopWatch;

    StopWatchObj.Start;

    // Open form here and wait until it is opened

    StopWatchObj.Stop;

    Log.Message(AQString.Format('Time to open form %s is %s', strFormName, StopWatchObj.ToString), StopWatchObj.ToString);



    Note, that using above approach you will measure time it takes to open this or that form from the end-user point of view.

    For the exact measurements of time spent in different code functions you should use profiling tool (like AQtime - http://smartbear.com/products/qa-tools/application-performance-profiling).
  • AAN's avatar
    AAN
    Contributor
    Hi Alexie,



    Thanks for that answer.



    You gave me the code (below)



    Do I need to input this into Test Complete some how as I couldn't find any simple way to use Stop Watch in TC.



    I also found another answer that pointed me to profiling and AQTime but I wansn't sure what the intended purpose in those were? Are you abel to explain in lamen's / simple terms what the end outcome of this integration with TC should do for me?



    The code is like this:



    StopWatchObj := HISUtils.StopWatch;



    StopWatchObj.Start;



    // Open form here and wait until it is opened



    StopWatchObj.Stop;



    Log.Message(AQString.Format('Time to open form %s is %s', strFormName,

    StopWatchObj.ToString), StopWatchObj.ToString);













  • AlexKaras's avatar
    AlexKaras
    Icon for Champion Level 2 rankChampion Level 2
    Hi Aneez,



    Yes, the provided code is for TestComplete and in order to use it you must install HISUtils extension (File | Install Extension...) that is provided with TestComplete.



    The difference between measurements done with TestComplete and AQTime profiler is that with TestComplete only you will be able to say: "Well, it takes 15 seconds to open form A. Obviously, this is too much, but I have no idea why it takes that long. Maybe developers can do something to speed things up".

    With AQTime your speech might be like this: "I measured time it takes form A to open and it appeared to be 15 seconds. Then I profiled it with AQTime and it showed that function A requires 6 seconds, function B requires 4 seconds and function C requires 2 seconds. All other functions executed while opening form A consume 3 seconds in total and worth no attention now. Maybe developers can refactor functions A, B and C so that they consume not more than 5 seconds in total? This will give us the total time to open form A equal to 8 seconds which satisfies our requirements".



    I.e. with TestComplete you can measure how long does it take to do some UI-related action, but can say nothing about internals of the action.

    With profiler you can measure how much time is spent in this or that function/line of code.