Topic
  • 6 replies
  • Latest Post - ‏2013-05-07T16:34:02Z by KMooney
rabbot
rabbot
8 Posts

Pinned topic Sync point in RPT8.2 using Custom Code

‏2012-12-02T11:36:59Z |
Hi,

Has anyone tried Sync point in RPT8.2 using Custom Code.Like All the Virtual users login server, then meeting at a common point and then firing requests to Server?.

Thanks,
Rabbot
Updated on 2012-12-10T18:47:32Z at 2012-12-10T18:47:32Z by KMooney
  • RobertoFdez
    RobertoFdez
    50 Posts

    Re: Sync point in RPT8.2 using Custom Code

    ‏2012-12-03T07:14:20Z  
    Hi Raboot,

    I haven't tried but it is very easy (only if you are using a single agent). Create a variable and store it in a shared memmory:

    //Set Shared Data
    IDataArea vda = tes.findDataArea(IDataArea.ENGINE);

    You can control the number of users active at once and check if the number is equal to the max number of users. In that case, continue execution, if not, wait and sleep, for example, 300 ms.

    Regards,
    Roberto.
  • KMooney
    KMooney
    283 Posts

    Re: Sync point in RPT8.2 using Custom Code

    ‏2012-12-06T17:56:30Z  
    There is no reason to implement a sync point in custom code when RPT support inserting a synchronization point directly into the workload and the RPT synchronization point does support multiple agents.
  • RobertoFdez
    RobertoFdez
    50 Posts

    Re: Sync point in RPT8.2 using Custom Code

    ‏2012-12-07T08:10:33Z  
    • KMooney
    • ‏2012-12-06T17:56:30Z
    There is no reason to implement a sync point in custom code when RPT support inserting a synchronization point directly into the workload and the RPT synchronization point does support multiple agents.
    Hi,

    Are you sure the SP support multiple agents? In my experience it doesn't.
  • KMooney
    KMooney
    283 Posts

    Re: Sync point in RPT8.2 using Custom Code

    ‏2012-12-10T18:47:32Z  
    Hi,

    Are you sure the SP support multiple agents? In my experience it doesn't.
    Yes, it works for multiple agents. Just checked that it is also still working find for version 8.3.

    Mixing synchronization points with loops sometimes catches people by surprise. Once a synchronization point has released any users "returning" to the sync point perhaps on subsequent iterations of a loop will pass right through the synchronization point.
  • performance tester
    performance tester
    2 Posts

    Re: Sync point in RPT8.2 using Custom Code

    ‏2013-05-07T13:52:09Z  
    • KMooney
    • ‏2012-12-10T18:47:32Z
    Yes, it works for multiple agents. Just checked that it is also still working find for version 8.3.

    Mixing synchronization points with loops sometimes catches people by surprise. Once a synchronization point has released any users "returning" to the sync point perhaps on subsequent iterations of a loop will pass right through the synchronization point.

    I don't think it works for all requirements like if you want to make users click on Register / Submit button at a time during schedule execution. We need to be insert custom code in script and prior to the page. Will you please help.

  • KMooney
    KMooney
    283 Posts

    Re: Sync point in RPT8.2 using Custom Code

    ‏2013-05-07T16:34:02Z  

    I don't think it works for all requirements like if you want to make users click on Register / Submit button at a time during schedule execution. We need to be insert custom code in script and prior to the page. Will you please help.

    Synchronization points can be inserted into tests but only between pages.  If you were to record using the Submit button here:

    http://www.w3schools.com/html/html_forms.asp

    the request for the submit does end up in the test as a separate page so you could put a synchronization point before it.

    If the request for the submit is inside a page you would have to use the split functionality to make it appear on a separate page.