SPONSORS:






User Tag List

Thanks Thanks:  0
Likes Likes:  0
Dislikes Dislikes:  0
Results 1 to 5 of 5

Thread: Any ideas?

  1. #1
    Member
    Join Date
    Sep 2006
    Posts
    41
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    Any ideas?

    Hi,

    Basically I have a script which everytime, loads up a web app, logs in, and then does various things in the web app before the transaction finishes. As you know the virtual user will then do this script over and over until it has done the number of transactions I've set it to run with or i manually stop the test.

    What I am trying to avoid the script doing is logging in every single time as this is creating un-realistic amounts of logins within the system. In a normal day a user would only really log in once and then log out having done a good stint of work. Can anyone suggest a way this can be done in QALoad? I basically want the VU to login and then do the 'meaty' part of the script over and over for all the data in my datapool but all on that single login.

    I can't help but feel that there must be an easy way of doing this but I am at a loss as to how to do it.

    If anyone can suggest anything to me?

    Cheers.

  2. #2
    Senior Member
    Join Date
    Nov 2000
    Location
    Michigan, USA
    Posts
    840
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    Re: Any ideas?

    You need to move the begin and end Transaction to inside the login/logout. But it is not that simple in QALoad due to they way Compuware implemented it. [img]/images/graemlins/ooo.gif[/img]

    What version of QALoad are you using? If prior to 5.6, are you using visual scripting or c scripts? The specifics depend on this.

    Depending on the web app, you may want to make sure that the navigation and required parameters are all in place. The easiest way to do this is, right before recording the logout, navigate to the first page that is right after login. I can explain more if you require it.

    I can say, in visual navigator, you will have to create an editable script file (.cpp) because when you move the transaction end up, it also moves up the clean up commands which kill that user's session. In this case, you want to leave the Clear() functions where they are, and move up the RESTART_TRANSACTION_BOTTOM() and END_TRANSACTION() commands. The help actually explains this (see bottom of this post for topics).

    In the c scripts, it is more complicated because you need to free the array elements that the script uses for dynamic data, and set them to NULL (just as the script does at the current end of transaction - don't move them, copy them). But then you need to make sure all required elements have data for the first page in the loop transaction loop. So you may need to insert the DO_Get__ commands that are before the first page. My version of help (for QALoad 5.6) doesn't list anything for the c scripts looping, though I have some of those looped currently from 5.5.1 SP2.

    Also, you need to consider the datapool file read - if you are using data for pages inside the loop, you will need to have a read in the loop.

    note: you can insert the begin/end transaction at record time, but for what you are trying to do - use the same logged in user - you will still need to modify the script as mentioned

    Really depends on the website implementation and the style of QALoad scripts... "Transaction looping" can be non-trivial in some situations (using QALoad anyway). [img]/images/graemlins/tongue.gif[/img]

    See these items in QALoad help:
    Looking at a Transaction Loop.
    Moving the Transaction Loop Statements
    A problem is a difference between what is perceived and what is desired, that
    we want to reduce
    (Dewey 1933)

  3. #3
    Member
    Join Date
    Nov 2007
    Location
    California
    Posts
    66
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    Re: Any ideas?

    I don't know if this is even possible, but follow along here:

    1. Record a login script that only logs in to the first page and "ends."
    2. Somehow grab the session ID and store it in a persistent variable that can then be passed in to the other scripts that do the work (can this be done?)
    3. record a logout script
    4. maybe edit the login script's .cpp file to remove the end of it that does the "cleanup."
    5. in Conductor, specify that you want the login script to have 1 transaction total and run at the beginning, and do the same for the logout script, but at the end (is this part possible?)

    I don't know if this stuff is even possible to tell you the truth. I'm new to QALoad and am not yet very familiar with the limitations.

    Aside from that, I would say immediately you may just want to create very long scripts... Instead of logging in and doing one transaction then logging out, log in and do 10 transactions and log out. That would cut your logins/logouts down tremendously, but the scripts would obviously be harder to create and maintain.

  4. #4
    Senior Member
    Join Date
    Nov 2000
    Location
    Michigan, USA
    Posts
    840
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    Re: Any ideas?

    It is possible to chain scripts by including them as functions, but you would have to deal with passing variables and objects that are not documented. In the end, it is easier to just record the login/logout.

    No matter how you slice it, you have to work with the .cpp scripts for almost every option for transaction looping in the current versions of QALoad (at least for WWW middleware, I've not used any other myself). [img]/images/graemlins/mad.gif[/img]

    BTW, if anyone ever does get chained scripts to work, please post the how to here because it would be great. [img]/images/graemlins/smile.gif[/img]

    I've only used QALoad, LoadRunner, and OpenSTA. OpenSTA (and its commercial successor, QTest from Quotium) is the only load test tool I know of that natively supports chaining scripts together. Sure wish other companies would add this feature...
    A problem is a difference between what is perceived and what is desired, that
    we want to reduce
    (Dewey 1933)

  5. #5
    Member
    Join Date
    Jul 2007
    Posts
    32
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Total Downloaded
    0

    Re: Any ideas?

    Hi,

    I used cpp as well as c sripts.In the C++ Scripts, you can move the begin transaction and restart transaction_top after login check point and end transaction, restart_transaction_bottome before logout check point in C++.

    In C, Just Move Begin transaction,Do_Set transactionstart after login check point and end transaction before logout.
    here you need to do one more thing, assigning NULL to variables code should be moved before end transaction.

    In both case, read the datapool inside the loops

 

 

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Search Engine Optimisation provided by DragonByte SEO v2.0.36 (Pro) - vBulletin Mods & Addons Copyright © 2016 DragonByte Technologies Ltd.
Resources saved on this page: MySQL 10.00%
vBulletin Optimisation provided by vB Optimise v2.6.4 (Pro) - vBulletin Mods & Addons Copyright © 2016 DragonByte Technologies Ltd.
User Alert System provided by Advanced User Tagging v3.2.8 (Pro) - vBulletin Mods & Addons Copyright © 2016 DragonByte Technologies Ltd.
vBNominate (Lite) - vBulletin Mods & Addons Copyright © 2016 DragonByte Technologies Ltd.
Feedback Buttons provided by Advanced Post Thanks / Like (Pro) - vBulletin Mods & Addons Copyright © 2016 DragonByte Technologies Ltd.
Username Changing provided by Username Change (Free) - vBulletin Mods & Addons Copyright © 2016 DragonByte Technologies Ltd.
BetaSoft Inc.
Digital Point modules: Sphinx-based search
All times are GMT -8. The time now is 07:47 PM.

Copyright BetaSoft Inc.