locked
How to get rid of "404 Error - The resource cannot be found" failed requests in a web test.

    Question

  •  

     I am using VS Team System 2008 for my .net based CRM application.

    After recording a webtest, while I replay the same, I'm getting "404 Not Found" error in all the requests.

    The failed requests look like "http://test01/Corp/ISRes.axd?F%2fISCore.js%2f305000409 " or

    " http://test01/Corp/ISRes.axd?D%2fWebDialogBox.js%2f20200710 "


    Interesting part is that , the over all status of the request is "Passed" but when I expand the failed request , there are a lot of 404 Not found errors present in the expanded tree view.

    Thanks for any useful suggestion.

    Monday, November 10, 2008 9:55 PM

Answers

All replies

  • I believe what you see are dependent requests. Please reference FAQ for more information about dependent requests.

     

    Visual Studio determine whether a request is passed or failed by several factors. One of them is to check if actual HTTP code of a request match its Expected HTTP Status Code. By default, Visual Studio expects HTTP 200(OK) for every request. Is some scenario, we might expect the web server return an error for a particular request. For example, for an unauthorized request, we expected to get HTTP 403 (forbidden) code, and we set Expected HTTP Status Code to 403. See Masking a 404 error in a dependent request for more information.


    Please mark the replies as answers if they help and unmark them if they provide no help.
    Thursday, November 13, 2008 8:40 AM
  • Hi Bill,

    Thanks for your response. But the suggested step did not help.

    I have around 8-10 failed dependent requests in each primary request. All the dependent request have one thing in common. All are .axd requests containing .js (e.g., http://development/Corp/ISRes.axd?F%2fISCore.js%2f305000409 )

    I am seeing atleast 10 failed ISRes.axd requests when I expand a primary request. Does it mean that I have to add 10 separate dependent requests to each failed primary request in the webtest and set the status code to 404 . It's a bit cumbersome. But still I did that and it did not work.

    One more thing to share, I have also edited the registry settings with the following code to filter out the .axd requests. Still these dependent .axd requests get recorded in my webtest.

    Windows Registry Editor Version 5.00

    [HKEY_CURRENT_USER\Software\Microsoft\VisualStudio\9.0\EnterpriseTools\QualityTools\WebLoadTest]
    "WebTestRecorderMode"="exclude"
    "ExcludeMimeTypes"="image;application/x-javascript;application/x-ns-proxy-autoconfig;text/css"
    "ExcludeExtensions"=".axd"

    Thursday, November 13, 2008 3:34 PM
  • Another options is to filter these requests out prior to fetching them.  Here is a blog post that explains the process.  You do not need to use a coded test.  You can also use a WebtestPlugin: http://blogs.msdn.com/densto/pages/webtestrequest-dependentrequests-collection.aspx

    I answered a similar question in this post: http://social.msdn.microsoft.com/Forums/en-US/vstswebtest/thread/3ce73d42-8677-44b5-8a68-38c598b37620
    Blog - http://blogs.msdn.com/slumley/default.aspx
    • Marked as answer by Bill.Wang Monday, November 17, 2008 7:46 AM
    Thursday, November 13, 2008 7:35 PM
    Moderator
  • Thanks Slumley,

    Looks like this is the last and best possible option to get rid of the .axd requests.

    But I am not a programming guy and very very novice.

    I need step by step instruction to write a webtest plugin. The steps described in the MSDN forum is good for an experienced user but not useful to me.

    I would really appreciate if a highly experienced person like you can outline the steps (starting from creating a class library) with few screenshots regarding the required plugin.

    Thanks a ton for your time.

    Friday, November 14, 2008 3:20 PM
  • Ansuman

    Please reference How to: Create a Web Test Plug-In for more information. You can start from it.


    Please mark the replies as answers if they help and unmark them if they provide no help.
    Monday, November 17, 2008 7:46 AM
  • Bill

    Instead of writing a plugin, I opted for an easier solution.

    I set the Parse Dependent Requests option to "FALSE" for each of the failed requests.

    Now I'm not getting the failed .axd requests anymore. My webtest is getting passed.

    Am I missing something??

     

    Monday, November 17, 2008 9:51 PM