Forum Discussion

rastech1's avatar
rastech1
Occasional Contributor
14 years ago

check points and wait methods in load test with scripting

Hi,

I just want to understant proper way of running a load test with scripting. First of all, I will tell why I need it.



Just using visual test editor can not handle everything. Some responses has to be checked in order to continue next request.



When I searched I found that post named "Is it possible to insert property check points or script routines in the task."

And the given answer is

""HTTP load testing operates with the http(s) protocol only and does not involve user interface of the tested application. Thus it is of no use to use UI functions like WaitAliasChild() during load test."



I dont understant, so in order to insert a checkpoint, do I have to use user interafce ? Cant I use some checkpoint inside somewhere in the script ?



another question is, in an smartbear article is it wrritten that



// Wait until the results are loaded: "http://www.google.com/search?hl=en&q=TestComplete&btnG=Google+Search"

  w.Wait();



So, "Wait until the results are loaded" ensures that previous request loaded ?



3 Replies

  • Hi Rasim,
     



    I dont understant, so in order to insert a checkpoint, do I have to use user interafce ?
     

     

    Yes, checkpoints are only used in functional tests. In load testing, you can use the approach described in the Checking Server Response help topic.
     



    another question is, in an smartbear article is it wrritten that
     

    // Wait until the results are loaded: "http://www.google.com/search?hl=en&q=TestComplete&btnG=Google+Search" 


      w.Wait();


    So, "Wait until the results are loaded" ensures that previous request loaded ?

     

    You're confusing functional testing and load testing here. The Wait method is only used in functional testing. The method checks the state of the web browser which is the tested application in this case and does not work with HTTP traffic directly. In load testing, TestComplete itself acts as a browser.
  • rastech1's avatar
    rastech1
    Occasional Contributor
    Allen thank you for answer, but I am stil very confused on some points.



    Response and Request event handlers are for comparsion of bodies.



    Event if it is a load test, there must be some mechanism to control sceneria in the test.



    Let me clarify my question, During loas test;



    for some requests (especially for login.aspx POST request in my test)



    I want it to run a this request if only previous request loaded.



    or



    I want it to run a request if only previous requests (or the request I wanted) response header status code is the one I desired (same as in the task)



    .

    As far as I know, even if it is a load test, there must be some mechanism to control sceneria in the test.



    If the requests are send one after another without no control mechanism, this is just using the target server, not sure if the users following proper way.



    A good example of this is redirection mechanism, I think somehow redirect mechanism can not catch-up test tools speed.

    and this is a situation that will not occur in real world. In real world, users cant send further requests if they can not pass login operation.



    And remember, I am just doing a Load test, this is not a Stress Test,



    I want to simulate simultanoue users at the same time in the web application, I am not testing concurrent users for just a request.



    I hope ı have told my problem you well. 



    And for event handlers, can I use them in order to go step by step in a load test ? If so can you provide me a example script ?



  • Hi Rasim,





    Unfortunately, the task you described is not supported by the current version of TestComplete - a load test is not supposed to be controlled form script. However, we will consider implementing the features you mentioned.