locked
Can Web Performance Test work on AJAX or Javascript Project which will show only one URL for all the pages? RRS feed

  • Question

  • Hi there,

    I'm working on testing a AJAX and JavaScript Project which has several pages but all in the same URL. I need to test some attribute on the page or parameter past by AJAX or Javascript. Can Web Performance Test work to get what I want?

    Thanks,

    
    Wednesday, April 17, 2013 5:25 PM

Answers

  • Hello,

    Thank you for your post.

    Web performance test is used to test if a server responses correctly and the response is consistent with what we expected. And we test the response speed, the stability and scalability.

    The Web Performance Test Recorder records both AJAX requests and requests that were submitted from JavaScript, but  web test does not execute JavaScript. I am afraid that you can’t use web test to test parameter past by AJAX or JavaScript.

    Please see:

    Web Performance Test Engine Overview

    About JavaScript and ActiveX Controls in Web Performance Tests

    From the first link, “Client-side scripting that sets parameter values or results in additional HTTP requests, such as AJAX, does affect the load on the server and might require you to manually modify the Web Performance Test to simulate the scripting.”

    If you want to execute the function typically performed by script in web test, you need to accomplish it in coded web performance test or a web performance test plugin. Please see:

     How to: Create a Coded Web Performance Test

    How to: Create a Web Performance Test Plug-In

    I am not sure what the ‘some attribute on the page’ is. If you mean that you want to test those controls on the page, you can do coded UI test, which can test that the user interface for an application functions correctly. The coded UI test performs actions on the user interface controls for an application and verifies that the correct controls are displayed with the correct values. You can refer to this article for detailed information about code UI test:

    Verifying Code by Using Coded User Interface Tests

    Best regards,


    Amanda Zhu [MSFT]
    MSDN Community Support | Feedback to us
    Develop and promote your apps in Windows Store
    Please remember to mark the replies as answers if they help and unmark them if they provide no help.

    • Marked as answer by Amanda Zhu Tuesday, April 23, 2013 8:44 AM
    Thursday, April 18, 2013 6:37 AM

All replies

  • Hello,

    Thank you for your post.

    Web performance test is used to test if a server responses correctly and the response is consistent with what we expected. And we test the response speed, the stability and scalability.

    The Web Performance Test Recorder records both AJAX requests and requests that were submitted from JavaScript, but  web test does not execute JavaScript. I am afraid that you can’t use web test to test parameter past by AJAX or JavaScript.

    Please see:

    Web Performance Test Engine Overview

    About JavaScript and ActiveX Controls in Web Performance Tests

    From the first link, “Client-side scripting that sets parameter values or results in additional HTTP requests, such as AJAX, does affect the load on the server and might require you to manually modify the Web Performance Test to simulate the scripting.”

    If you want to execute the function typically performed by script in web test, you need to accomplish it in coded web performance test or a web performance test plugin. Please see:

     How to: Create a Coded Web Performance Test

    How to: Create a Web Performance Test Plug-In

    I am not sure what the ‘some attribute on the page’ is. If you mean that you want to test those controls on the page, you can do coded UI test, which can test that the user interface for an application functions correctly. The coded UI test performs actions on the user interface controls for an application and verifies that the correct controls are displayed with the correct values. You can refer to this article for detailed information about code UI test:

    Verifying Code by Using Coded User Interface Tests

    Best regards,


    Amanda Zhu [MSFT]
    MSDN Community Support | Feedback to us
    Develop and promote your apps in Windows Store
    Please remember to mark the replies as answers if they help and unmark them if they provide no help.

    • Marked as answer by Amanda Zhu Tuesday, April 23, 2013 8:44 AM
    Thursday, April 18, 2013 6:37 AM
  • Hello,

    Since we haven't heard from you for some time, I temporarily close this case. I mark useful reply as answer. If you have any concerns, please feel free to unmark it to reopen it or submit a new question.

    Thanks for your understanding.

    Best regards,


    Amanda Zhu [MSFT]
    MSDN Community Support | Feedback to us
    Develop and promote your apps in Windows Store
    Please remember to mark the replies as answers if they help and unmark them if they provide no help.

    Tuesday, April 23, 2013 8:44 AM
  • Amanda,

    can you confirm that AJAX and JavaScript is recoreded by the test recorder?  I don't see it in any of my tests, only HTTP Posts and Gets. 

    I know it doesn't execute any JavaScripts - it can't as the runner is using the IE Class not the actual browser.  there is no JavaScript runner in the IE Class.

    Of course, this makes the web tests very very limited since most, if not all new development is using AJAX or some non HTTP method for dynamic interaction.

    Peter Schumacher
    Campus Mgmt Corp

    Friday, April 26, 2013 1:17 PM
  • Hello,

    Sorry for my delay. I was on my vacation.

    Actually, Web Performance Test Recorder just can record both AJAX requests and requests that are submitted from JavaScript rather than AJAX and JavaScript controls (client-side scripting).

    For more information, please see:

    http://blogs.msdn.com/b/slumley/archive/2007/12/30/web-tests-work-at-the-http-layer.aspx

    So if your web site uses java script can you use VSTS web tests? Yes you can. When the web test is recorded, it is done so in a browser which is likely excecuting java script. So during record time java script will be executed. Before a request is submitted, java script will execute and can manipulate parameters. The recorder will record the values after they have been manipulated. During execution of the web test, the parameters being submitted will be the manipulated parameters.

    Best regards,


    Amanda Zhu [MSFT]
    MSDN Community Support | Feedback to us
    Develop and promote your apps in Windows Store
    Please remember to mark the replies as answers if they help and unmark them if they provide no help.

    Thursday, May 2, 2013 5:12 AM
  • I've been trying to run some performance tests against a SharePoint Online application, and it keeps returning an error message on playback that the browser is set to block Javascript when it attempts to access

    https://login.microsoftonline.com/login.srf

    I've been looking around to see if anyone else has found a solution around the problem of VS not running javascript, and some website have suggested that it might be handled using a web test plug in that mimics the behavior of the srf file to pass in the cookie. Will that work, or am I wasting my time researching that?

    If it would work, has anyone created that plug in already?

    Monday, January 12, 2015 10:06 PM