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

20 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
    3354 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
    3354 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
    3354 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
    3354 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
    3354 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
    3354 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
    3354 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
    3354 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!
  17. Carmen Hoyos
    Carmen Hoyos avatar
    2 posts
    Member since:
    May 2007

    Posted 22 Nov 2018 in reply to Cody Link to this post

    Hi Cody

    We have the same problem that Gregory had and we can not access the link and the video to see the solution.
    Please, could you send me this info updated?

    Thanks!!!

  18. Elena Tsvetkova
    Admin
    Elena Tsvetkova avatar
    1048 posts

    Posted 23 Nov 2018 Link to this post

    Hello Carmen,

    Thank you for contacting us. Since you are referring a forum post which targets quite an old version of Test Studio, I am afraid the missing video cannot be restored.

    Nevertheless, as far as I understand you are facing troubles with configuring the dynamic parts in the http requests captured in a load test. If this is the case, Test Studio provides you the ability to choose dynamic targets which are automatically detected or set custom dynamic targets. Additionally, if the generated by the application token is not automatically detected, you will need to identify the step in which response the token is set and use it as a source one to add the custom dynamic target. 

    I hope the above information is helpful to you. If this is not the case however, I will need some additional details about the issue you are experiencing in order to assist you further. For example:
    - what are the exact requirements on your side? 
    - how is the token listed in the response of the http request - header, part of the body, etc.? 
    - is it listed as an automatically detected dynamic target? 
    - are you able to create a custom dynamic target which passes the token value to the necessary steps? 

    Along with all that information it will be very helpful if you share a sample load test you have struggles with - that way I will be able to explore the details on my end and provide a specific solution about the concrete issue. 

    As a side note, you may also prefer to open a private support ticket on the issue if you are not eager to share the above information publicly.

    I am looking forward to your reply.

    Regards,
    Elena Tsvetkova
    Progress Telerik
     
    The New Release of Telerik Test Studio Is Here! Download, install,
    and send us your feedback!
  19. Carmen Hoyos
    Carmen Hoyos avatar
    2 posts
    Member since:
    May 2007

    Posted 26 Nov 2018 in reply to Elena Tsvetkova Link to this post

    Hello Elena

    Thanks for your reply. In our case, we try to bind the post data with a data source (excel). 

    In the next to images, you can see that we have a "load test" binding with a data source.

    https://drive.google.com/file/d/1hbAhX8uUEwVZIpMgLuz0eBaUBG0NOxrp/view?usp=sharing
    https://drive.google.com/file/d/1ypyrZZzm7GOCmFG2rZYKjTRQhv_pLNxk/view?usp=sharing

    and we want to bind the "post data" in the body of the request with the data source (to have the possibility to include different clientID). Maybe we have to bind the JSON complete, and it will not be a problem.

    https://drive.google.com/file/d/1ivLWFE201aS8T2-ohZfkaRtQlDllNfHn/view?usp=sharing

    We thought the dynamic target is not a solution for us.

    Thank in advanced
  20. Elena Tsvetkova
    Admin
    Elena Tsvetkova avatar
    1048 posts

    Posted 28 Nov 2018 Link to this post

    Hello Carmen,

    Thank you for the shared details. 

    To be able to data drive using an external source any dynamic target in a request. As far as I understand that POST data is not automatically detected as a dynamic target and this is why you will need to manually add it as such. Here is described how you could how to add a custom target. So, please include the POST data as a dynamic target and then data drive the field with the necessary column from the Excel file. Please note it should contain the whole string for the POST data and not only the clientID

    Then, although you will be able to data bind the request and the dynamic target for the specific case, I suspect you will face another misbehavior, which we have recently identified as a missing functionality. Currently Test Studio is able to send POST data if the requests expect multipart-formdata and urlencoded application type. As far as I could see from the screenshots the requests generated by the web page under test, the application type is  in Json format and still the execution will fail. 

    The good news on the topic is that the functionality will be implemented in our next official release planned for the beginning of the next year. Here you could double check the public event for the case. 

    Please let me if I have misunderstood you or there is anything else I could be helpful with. 

    Thanks. 

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