Help? How to run load tests with dynamic parameters in 2014.2

16 posts, 1 answers
  1. Gregory
    Gregory avatar
    15 posts
    Member since:
    Oct 2013

    Posted 19 Jun 2014 Link to this post

    I am trying to run a load test in version 2014.2.  The issue I am currently having is, the application submits an authorization token (which is pulled from the product's database) for just about everything.  This token changes each time a user logs in to the web page.  Since it is randomly generated, there is no way for me to put a bunch of tokens in a datasheet and bind to the load test.  Currently, the load tests gets a lot of 403 - Forbidden errors, which is understandable.

    I am fairly new to Load Testing with test studio.  Is there a better way to do this?  I am recording a new session and capturing the HTTP traffic (as opposed to running an existing functional test).  Maybe I'm just doing something wrong.

    Thanks in advance!
  2. Cody
    Admin
    Cody avatar
    3360 posts

    Posted 24 Jun 2014 Link to this post

    Hello Gregory,

    The key thing to keep in mind about Test Studio load tests is that they operate directly at the HTTP level. With this in mind we need to understand exactly where in the HTTP request this authorization token is put.

    It would also be good to know how it works normally in a web browser. How does the web browser get the current token in order to echo it back on subsequent requests? Obviously the web browser can't make direct SQL queries to obtain it. So how would it do it? Knowing this we should be able to adapt the load test to be able to replicate this behavior.

    Regards,
    Cody
    Telerik
     
    The New Release of Telerik Test Studio Is Here! Download, install,
    and send us your feedback!
  3. Gregory
    Gregory avatar
    15 posts
    Member since:
    Oct 2013

    Posted 24 Jun 2014 in reply to Cody Link to this post

    Cody,

    Thank you for the response.  After reading through various other posts, I think that data-driving the PUT for the username and password may give me the end product I was looking for (actually simulating several users performing varying actions).  However, after recording a new session and selecting all found dynamic targets, it seems it is not seeing the username and password fields as dynamic (I do not get the expected Bind Unique User Info).  What I am seeing is a Content field on the PUT which has the following:

    Content
    Username=Jane.Doe%40email.com&Password=Test1&CaptchaChallenge=&CaptchaResponse=

    Is there a way to data-drive the Username and Password parameters from a datasheet without the Bind Unique User Info options?  I have re-recorded the session several times and Test Studio never lists this as a Dynamic Target.

    Again, thank you for your help!
  4. Cody
    Admin
    Cody avatar
    3360 posts

    Posted 24 Jun 2014 Link to this post

    Hi Gregory,

    Is there a way to data-drive the Username and Password parameters from a datasheet without the Bind Unique User Info options?

    In short, no. Did you already attach a data source (e.g. an Excel file) to the load test? Parameters that can be data bound will only show up when the test is actively bound to a data source. Without an active data source you will only see available Dynamic Targets show up.

    What I am seeing is a Content field on the PUT...

    Would you mind sending me a copy of your load test (the .tstest file on disc) so I can have a look? Then I can tell you with 100% whether or not we can support it. We do support anything that is a keyword=value format. What we cannot do is data drive the host portion of the URL or values that are not in a keyword=value format. "Username=Jane.Doe" sounds like something we should be able to data drive, but I need to actually see the whole HTTP request in the load test before I can be certain.

    Regards,
    Cody
    Telerik
     
    The New Release of Telerik Test Studio Is Here! Download, install,
    and send us your feedback!
  5. Gregory
    Gregory avatar
    15 posts
    Member since:
    Oct 2013

    Posted 25 Jun 2014 in reply to Cody Link to this post

    Cody,

    Attached is a copy of the load test.  The test is has been bound to a datasheet, which I will also include.  I think the issue is, that for some reason, it does not see the username and password as a unique target.  Hopefully it's just user error.

    Thanks so much for your help!
  6. Cody
    Admin
    Cody avatar
    3360 posts

    Posted 27 Jun 2014 Link to this post

    Hello Gregory,

    Thank you for the load test. Normally we are able to data bind the WebForm data. I am confused why Test Studio is not allowing it in this case. I've passed on the question to development. I'll update you when I have a response.

    Regards,
    Cody
    Telerik
     
    The New Release of Telerik Test Studio Is Here! Download, install,
    and send us your feedback!
  7. Gregory
    Gregory avatar
    15 posts
    Member since:
    Oct 2013

    Posted 30 Jun 2014 in reply to Cody Link to this post

    Cody,

    Thank you for your response and for your help.  I will wait to hear from you and the developers!
  8. Cody
    Admin
    Cody avatar
    3360 posts

    Posted 30 Jun 2014 Link to this post

    Hello Gregory,

    Ok, we did figure out why, but you may not like the answer. We only support databinding for POST's. Your application is using a PUT for the logon. If you can change this to a POST instead you'll be able to data bind it in a Test Studio load test.

    I also added a feature request for adding the ability to databind a PUT request.

    Regards,
    Cody
    Telerik
     
    The New Release of Telerik Test Studio Is Here! Download, install,
    and send us your feedback!
  9. Gregory
    Gregory avatar
    15 posts
    Member since:
    Oct 2013

    Posted 01 Jul 2014 in reply to Cody Link to this post

    Cody,

    Once again, thank you for the help.  I got the developers to change the PUT to a POST, but I am seeing the same behavior as far as the session record not recognizing the field as dynamic and giving me the data binding option.  Any other suggestions?  (Stupid question coming) Could it possibly be something to do with the control they used or some way they coded something?
  10. Cody
    Admin
    Cody avatar
    3360 posts

    Posted 02 Jul 2014 Link to this post

    Hi Gregory,

    Did you recreate your load test once the POST became implemented? Test Studio won't recognize the change in the old load test.

    If you did re-record your load test, please send it to me for analysis.

    Could it possibly be something to do with the control they used or some way they coded something?

    I can see where one might think that but very unlikely. Remember a Test Studio load test works down at the low level HTTP request/response level. At this lever there is no UI, no controls. Only requests going out with parameters and response coming back from the web server.

    Regards,
    Cody
    Telerik
     
    The New Release of Telerik Test Studio Is Here! Download, install,
    and send us your feedback!
  11. Gregory
    Gregory avatar
    15 posts
    Member since:
    Oct 2013

    Posted 21 Jul 2014 in reply to Cody Link to this post

    Cody,

    Thank you for your help again.  I am attaching the newest copy of my load test.  The developers changed the log-in to a POST, but it seems as though identification is still an issue. 

    Please let me know if you need anything else!
  12. Answer
    Cody
    Admin
    Cody avatar
    3360 posts

    Posted 22 Jul 2014 Link to this post

    Hi Gregory,

    Looking good! Now you just need to take the next step and finish data binding your test. Here's a demonstration video how to do it:
    http://screencast.com/t/LRpSIh9cAi0s

    Regards,
    Cody
    Telerik
     
    The New Release of Telerik Test Studio Is Here! Download, install,
    and send us your feedback!
  13. Gregory
    Gregory avatar
    15 posts
    Member since:
    Oct 2013

    Posted 25 Jul 2014 in reply to Cody Link to this post

    Cody,

    You are AWESOME!  Your video showed me exactly what I was going wrong after the devs changed the call to POST.

    Thanks so much for all your help!!
  14. Cody
    Admin
    Cody avatar
    3360 posts

    Posted 25 Jul 2014 Link to this post

    Hi Gregory,

    Excellent! Thank you for the update.

    Regards,
    Cody
    Telerik
     
    The New Release of Telerik Test Studio Is Here! Download, install,
    and send us your feedback!
  15. Shelley
    Shelley avatar
    2 posts
    Member since:
    May 2014

    Posted 12 May 2015 Link to this post

    I can't access the screencast above http://screencast.com/t/LRpSIh9cAi0s 

     

    I was hoping to watch it if you still have it available.

  16. Cody
    Admin
    Cody avatar
    3360 posts

    Posted 12 May 2015 Link to this post

    Hi Shelley,

    Sorry about that. My Screencast.com account was getting too full. I had to delete some old videos to make room for new ones.

    Let me know if you still need assistance.


    Regards,
    Cody
    Telerik
     
    The New Release of Telerik Test Studio Is Here! Download, install,
    and send us your feedback!
Back to Top